13#ifndef ML_MODULE_BACKGROUND_TASK_H
14#define ML_MODULE_BACKGROUND_TASK_H
23class ProcessAllPagesHandler;
#define MLBACKGROUNDTASKS_EXPORT
void clear()
Removes all entries from the container.
An asynchronous tile request. This is copyable!
An asynchronous process all pages request. This is copyable!
ImagingBackgroundTask(void *owner)
ImagePropertyExtensionContainer & getImagePropertyContainer()
Permits access to the container for user image properties.
double getInputImageMinVoxelValue(int index=0) const
Returns the minimum voxel value of the input image at index.
~ModuleBackgroundTask() override
void setStatusString(const std::string &status) override
void setProgressField(FloatField *field)
MLDataType getInputImageDataType(int index=0) const
Returns the data type of the input image at index.
AsyncTileRequest requestTile(int inputImageIndex, const SubImageBox &box, MLDataType type, const ScaleShiftData &shift=ScaleShiftData(), int getTileFlags=ImagingBackgroundTask::UseMemoryManager)
ModuleBackgroundTask(Module *module, FloatField *progressField=nullptr, StringField *statusField=nullptr)
void setProgress(float progress) override
ProcessAllPagesRequest requestProcessAllPages(ProcessAllPagesHandler *handler, const SubImageBox &box=SubImageBox())
bool hasValidInputImage(int index=0) const
Returns whether the input image at index is valid and thus its properties can be requested.
ImageVector getInputImagePageExtent(int index=0) const
Returns the page extent of the input image at index.
double getInputImageMaxVoxelValue(int index=0) const
Returns the maximum voxel value of the input image at index.
ProcessAllPagesRequest requestProcessAllPages(const SubImageBox &box=SubImageBox())
void setStatusField(StringField *field)
virtual bool shouldCancelOnInputImageChange(int) const
const MedicalImageProperties & getInputImageProperties(int index=0) const
Returns the image properties of the input image at index.
AsyncTileRequest requestTileWithExternalBuffer(int inputImageIndex, const SubImageBox &box, MLDataType type, const ScaleShiftData &shift, ManagedSubImage *externalBuffer, int getTileFlags=ImagingBackgroundTask::ExternalBuffer)
ImageVector getInputImageExtent(int index=0) const
Returns the extent of the input image at index.
int getNumInputImages() const
Returns the number of input images.
PagedImageProperties extends the MedicalImageProperties with the page extent.
const ImageVector & getPageExtent() const
Returns the page extent.
PagedImageProperties(const PagedImage &pagedImage)
TScaleShiftData< MLdouble > ScaleShiftData
Double version of TScaleShiftData for maximum reasonable precision.
TSubImageBox< MLint > SubImageBox
Defines the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.