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
 Reimplement this method to perform 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
 Reimplement this method to specify the virtual output image's data type/size/page extent.
 
SubImageBox calculateInputSubImageBox (int, const SubImageBox &outputSubImageBox) override
 Reimplement this method to specify the input image box for the input images.
 
void calculateOutputSubImage (SubImage *outputSubImage, SubImage *inputSubImages, UserThreadData *) override
 Internal method, do not reimplement!
 
- Public Member Functions inherited from ml::ProcessAllPagesHandler
virtual bool wantsProgressUpdates ()
 Returns whether the handler wants to receive progress updates via updateProgress().
 
virtual void updateProgress (double)
 Called in regular intervals if 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 ()
 Creates 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 subimages and the page tiling seen 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()

Reimplement this method to perform 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: