13#ifndef ML_PROCESS_ALL_PAGES_HANDLER_H
14#define ML_PROCESS_ALL_PAGES_HANDLER_H
23#include <ThirdPartyWarningsDisable.h>
24#include <boost/unordered_map.hpp>
25#include <ThirdPartyWarningsRestore.h>
61 virtual const char*
getName() {
return nullptr; }
103 boost::unordered_map<MLint, SubImage> _bufferedImages;
137 boost::unordered_map<MLint, std::vector<SubImage> > _bufferedImages;
Base class for the calculation of pages of an output image (PagedImage) of a Module.
A ProcessAllPages handler that offers ordered tile delivery on any number of input images.
void calculateOutputSubImage(SubImage *outputSubImage, SubImage *inputSubImages, UserThreadData *) override
internal method, do not re-implement
void calculateOutputImageProperties(PagedImage *image) override
Re-implement this method to specify the virtual output image's datatype/size/page extent.
virtual MLErrorCode processTiles(SubImage *images)=0
Re-implement this method to do the processing, return ML_RESULT_OK if processing should go on,...
SubImageBox calculateInputSubImageBox(int, const SubImageBox &outputSubImageBox) override
Re-implement this method to specify the input image box for the input images By default,...
OrderedProcessAllPagesHandler()
A ProcessAllPages handler that offers ordered tile delivery on a single input image.
virtual MLErrorCode processTile(const SubImage &image)=0
Re-implement this method to do the processing, return ML_RESULT_OK if processing should go on,...
void calculateOutputImageProperties(PagedImage *image) override
Re-implement this method to specify the virtual output image's datatype/size/page extent.
virtual SubImageBox calculateInputSubImageBox(const SubImageBox &outputSubImageBox)
Re-implement this method to specify the input image box for the input image with index == _inputIndex...
OrderedSingleInputProcessAllPagesHandler(int inputIndex=0)
SubImageBox calculateInputSubImageBox(int inputIndex, const SubImageBox &outputSubImageBox) override
internal method, do not re-implement
void calculateOutputSubImage(SubImage *outputSubImage, SubImage *inputSubImages, UserThreadData *) override
internal method, do not re-implement
Class which represents an image, which manages properties of an image and image data which is located...
Base class for handlers that are used for the Module::processAllPages facility.
virtual void calculateOutputImageProperties(PagedImage *)
Calculates the (temporary and virtual) output image's properties, which by default has the properties...
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 your...
virtual const char * getName()
Returns the name of the handler.
virtual bool wantsProgressUpdates()
Returns if the handler want to receive progress updates via updateProgress()
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Base class for thread local data that is passed to CalculateOutputImageHandler::calculateOutputSubIma...
MLint32 MLErrorCode
Type of an ML Error code.
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...