|
Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
The OclImageFilter is the topmost class for all filter which take images as input. More...
#include <mitkOclImageFilter.h>


Public Member Functions | |
| void | SetInput (mitk::OclImage::Pointer image) |
| SetInput SetInput Set the input image (as mitk::OclImage). More... | |
| void | SetInput (mitk::Image::Pointer image) |
| SetInput Set the input image (as mitk::Image). More... | |
Public Member Functions inherited from mitk::OclFilter | |
| void | AddSourceFile (const char *filename) |
| Add a source file from the resource files to the OpenCL shader file list. Multiple files can be added to the list. More... | |
| void | SetCompilerFlags (const char *flags) |
| Set specific compilerflags to compile the CL source. Default is set to nullptr; example: "-cl-fast-relaxed-math -cl-mad-enable -cl-strict-aliasing". More... | |
| virtual bool | IsInitialized () |
| Returns true if the initialization was successfull. More... | |
| virtual unsigned long | GetDeviceMemory () |
| Returns the amount of global memory of the used device in bytes. More... | |
| virtual | ~OclFilter () |
| Destructor. More... | |
Protected Member Functions | |
| OclImageFilter () | |
| virtual | ~OclImageFilter () |
Protected Member Functions inherited from mitk::OclFilter | |
| OclFilter () | |
| Constructor. More... | |
| OclFilter (const char *filename) | |
| Constructor ( overloaded ) More... | |
| void | SetWorkingSize (unsigned int locx, unsigned int dimx, unsigned int locy=1, unsigned int dimy=1, unsigned int locz=1, unsigned int dimz=1) |
| Set the working size for the following OpenCL kernel call. More... | |
| bool | ExecuteKernel (cl_kernel kernel, unsigned int workSizeDim) |
| Execute the given kernel on the OpenCL Index-Space defined by the local and global work sizes. More... | |
| bool | ExecuteKernelChunks (cl_kernel kernel, unsigned int workSizeDim, vcl_size_t *chunksDim) |
| Execute the given kernel on the OpenCL Index-Space defined by the local and global work sizes, but divide it into chunks of dimension chunksDim. More... | |
| bool | ExecuteKernelChunksInBatches (cl_kernel kernel, unsigned int workSizeDim, vcl_size_t *chunksDim, vcl_size_t batchSize, int waitTimems) |
| Execute the given kernel on the OpenCL Index-Space defined by the local and global work sizes, but divide it into chunks of dimension chunksDim and wait between batches of batchSize chunks a time of waitTimems milliseconds. More... | |
| bool | Initialize () |
| Initialize all necessary parts of the filter. More... | |
| void | CompileSource () |
| Compile the program source. More... | |
| void | SetSourcePreambel (const char *preambel) |
| Add some source code on the beginning of the loaded source. More... | |
| virtual us::Module * | GetModule ()=0 |
| Get the Module of the filter. Needs to be implemented by every subclass. The filter will load the OpenCL sourcefiles from this module context. More... | |
| void | LoadSourceFiles (CStringList &SourceCodeList, ClSizeList &SourceCodeSizeList) |
| Helper functions that load sourcefiles from the module context in the Initialize function. More... | |
Protected Attributes | |
| mitk::OclImage::Pointer | m_Input |
| short | m_CurrentType |
Protected Attributes inherited from mitk::OclFilter | |
| const char * | m_ClCompilerFlags |
| String that contains the compiler flags. More... | |
| cl_program | m_ClProgram |
| The compiled OpenCL program. More... | |
| cl_command_queue | m_CommandQue |
| Command queue for the filter. More... | |
| std::string | m_FilterID |
| Unique ID of the filter, needs to be specified in the constructor of the derived class. More... | |
| const char * | m_Preambel |
| source preambel for e.g. #define commands to be inserted into the OpenCL source More... | |
| CStringList | m_ClFiles |
| List of sourcefiles that will be compiled for this filter. More... | |
| bool | m_Initialized |
| status of the filter More... | |
| vcl_size_t | m_LocalWorkSize [3] |
| The local work size fo the filter. More... | |
| vcl_size_t | m_GlobalWorkSize [3] |
| The global work size of the filter. More... | |
Additional Inherited Members | |
Protected Types inherited from mitk::OclFilter | |
| typedef std::vector< const char * > | CStringList |
| typedef std::vector< vcl_size_t > | ClSizeList |
The OclImageFilter is the topmost class for all filter which take images as input.
The input image can be intialized via an oclImage or an mitk::Image. This makes it possible to create a filter pipeline of GPU-based filters and to bind this part into the CPU (ITK) filter pipeline.
Definition at line 34 of file mitkOclImageFilter.h.
|
protected |
Definition at line 17 of file mitkOclImageFilter.cpp.
References FILTER_SHORT, and m_CurrentType.
|
protectedvirtual |
Definition at line 23 of file mitkOclImageFilter.cpp.
| void mitk::OclImageFilter::SetInput | ( | mitk::OclImage::Pointer | image | ) |
SetInput SetInput Set the input image (as mitk::OclImage).
| image | The image in mitk::OclImage. |
Definition at line 27 of file mitkOclImageFilter.cpp.
References image, and m_Input.
Referenced by mitk::OclBinaryThresholdImageFilter::SetInput().
| void mitk::OclImageFilter::SetInput | ( | mitk::Image::Pointer | image | ) |
SetInput Set the input image (as mitk::Image).
| image | The image in mitk::Image. |
Definition at line 32 of file mitkOclImageFilter.cpp.
References m_CurrentType, m_Input, MITK_DEBUG, and mitk::OclImage::New().
|
protected |
Current (last used) image pixel type
Definition at line 58 of file mitkOclImageFilter.h.
Referenced by mitk::OclImageToImageFilter::GetBytesPerElem(), mitk::OclImageToImageFilter::InitExec(), OclImageFilter(), and SetInput().
|
protected |
The input image
Definition at line 55 of file mitkOclImageFilter.h.
Referenced by mitk::OclImageToImageFilter::GetGPUOutput(), mitk::OclImageToImageFilter::GetOutput(), mitk::OclImageToImageFilter::GetOutputType(), mitk::OclImageToImageFilter::InitExec(), and SetInput().