MeVisLab Toolbox Reference
ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm > Class Template Reference

ClusterHandler that is used to provide slice-by-slice data to the cluster algorithm. More...

#include <mlClusterAlgorithm.h>

Inheritance diagram for ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm >:
ml::OrderedProcessAllPagesHandler ml::ProcessAllPagesHandler ml::CalculateOutputImageHandler

Public Member Functions

 ClusterHandler (ClusterAlgorithm< CLUSTERVOXELTYPE, DerivedAlgorithm > *algorithm)
 
void setParameters (bool useMask, MLDataType type)
 Stores all parameters that are needed to call the algorithm.
 
void calculateOutputImageProperties (PagedImage *image) override
 Calculates the (temporary and virtual) output image's properties, which by default has the properties of input image 0.
 
SubImageBox calculateInputSubImageBox (int inputIndex, const SubImageBox &outputSubImageBox) override
 Called by the host to determine which input image region (tile) of input inputIndex is required to calculate a certain output image region (page) of output image.
 
MLErrorCode processTiles (SubImage *images) override
 Re-implement this method to do the processing, return ML_RESULT_OK if processing should go on, otherwise return the appropriate error code.
 
MLErrorCode getErrorCode () const
 
- Public Member Functions inherited from ml::OrderedProcessAllPagesHandler
 OrderedProcessAllPagesHandler ()
 
void calculateOutputImageProperties (PagedImage *image) override
 Re-implement this method to specify the virtual output image's datatype/size/page extent.
 
SubImageBox calculateInputSubImageBox (int, const SubImageBox &outputSubImageBox) override
 Re-implement this method to specify the input image box for the input images By default, it returns outputSubImageBox for all inputs.
 
void calculateOutputSubImage (SubImage *outputSubImage, SubImage *inputSubImages, UserThreadData *) override
 internal method, do not re-implement
 
- Public Member Functions inherited from ml::ProcessAllPagesHandler
virtual bool wantsProgressUpdates ()
 Returns if the handler want to receive progress updates via updateProgress()
 
virtual void updateProgress (double)
 Called in regular intervals when wantsProgressUpdates() == true.
 
void install (PagedImage *outImg)
 Installs the handler on the PagedImage (which is typically called by the ML Host, do not call it yourself!)
 
virtual const chargetName ()
 Returns the name of the handler.
 
- Public Member Functions inherited from ml::CalculateOutputImageHandler
virtual ~CalculateOutputImageHandler ()
 Destructor.
 
virtual UserThreadDatacreateUserThreadData ()
 Create the thread local user data for a thread.
 

Additional Inherited Members

- Protected Attributes inherited from ml::OrderedProcessAllPagesHandler
PagedImage_image
 

Detailed Description

template<typename CLUSTERVOXELTYPE, typename DerivedAlgorithm>
class ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm >

ClusterHandler that is used to provide slice-by-slice data to the cluster algorithm.

Definition at line 65 of file mlClusterAlgorithm.h.

Constructor & Destructor Documentation

◆ ClusterHandler()

Member Function Documentation

◆ calculateInputSubImageBox()

SubImageBox ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm >::calculateInputSubImageBox ( int ,
const SubImageBox & outputSubImageBox )
inlineoverridevirtual

Called by the host to determine which input image region (tile) of input inputIndex is required to calculate a certain output image region (page) of output image.

Default is that a region with position and location of outputSubImageBox is requested from input image inputIndex.

Reimplemented from ml::CalculateOutputImageHandler.

Definition at line 105 of file mlClusterAlgorithm.h.

References mlrange_cast().

◆ calculateOutputImageProperties()

void ml::ClusterHandler< CLUSTERVOXELTYPE, DerivedAlgorithm >::calculateOutputImageProperties ( PagedImage * )
inlineoverridevirtual

Calculates the (temporary and virtual) output image's properties, which by default has the properties of input image 0.

Note
Since this handler is called from Module::processAllPages(), the output image will NOT allocate any page data. It is merely used to define the properties of the input sub images and the page tiling that one sees in calculateOutputSubImage().

Reimplemented from ml::ProcessAllPagesHandler.

Definition at line 85 of file mlClusterAlgorithm.h.

References ml::ImageProperties::getImageExtent(), MLint8Type, mlrange_cast(), ml::PagedImage::setDataType(), ml::PagedImage::setImageExtent(), ml::PagedImage::setInputSubImageDataType(), ml::PagedImage::setInputSubImagesAreReadOnly(), and ml::PagedImage::setPageExtent().

◆ getErrorCode()

◆ processTiles()

Re-implement this method to do the processing, return ML_RESULT_OK if processing should go on, otherwise return the appropriate error code.

Implements ml::OrderedProcessAllPagesHandler.

Definition at line 117 of file mlClusterAlgorithm.h.

References mlrange_cast().

◆ setParameters()

Stores all parameters that are needed to call the algorithm.

Definition at line 79 of file mlClusterAlgorithm.h.

References mlrange_cast().

Referenced by ml::ClusterAlgorithm< CLUSTERVOXELTYPE, DerivedAlgorithm >::calcClustersForSlices().


The documentation for this class was generated from the following file: