MeVisLab Toolbox Reference
mlModuleInterfaces.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2009, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_MODULE_INTERFACES_H
14 #define ML_MODULE_INTERFACES_H
15 
16 #include "mlSubImageBox.h"
17 
18 // Namespace ML. It is recommended that all ML classes and modules are in this
19 // name space to avoid collisions with types of other libraries.
20 ML_START_NAMESPACE
21 
22 // ML-classes
23 class SubImage;
24 class PagedImage;
25 
27 typedef void CalculateOutputImagePropertiesCB(void* userData, PagedImage* outImage);
28 
31 {
32 public:
33  virtual ~UserThreadData() {};
34 };
35 
51 public:
54 
59  virtual SubImageBox calculateInputSubImageBox(int /*inputIndex*/, const SubImageBox& outputSubImageBox)
60  {
61  return outputSubImageBox;
62  };
63 
73  virtual void calculateOutputSubImage(SubImage *outputSubImage, SubImage *inputSubImages, UserThreadData* userThreadData) = 0;
74 
80  virtual UserThreadData* createUserThreadData() { return nullptr; }
81 };
82 
83 ML_END_NAMESPACE
84 
85 #endif
Base class for the calculation of pages of an output image (PagedImage) of a Module.
virtual UserThreadData * createUserThreadData()
Create the thread local user data for a thread.
virtual ~CalculateOutputImageHandler()
Destructor.
virtual void calculateOutputSubImage(SubImage *outputSubImage, SubImage *inputSubImages, UserThreadData *userThreadData)=0
Calculate page outputSubImage of output image given the input image tiles in array inputSubImages.
virtual SubImageBox calculateInputSubImageBox(int, const SubImageBox &outputSubImageBox)
Called by the host to determine which input image region (tile) of input inputIndex is required to ca...
Class which represents an image, which manages properties of an image and image data which is located...
Definition: mlPagedImage.h:70
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Definition: mlSubImage.h:75
Base class for thread local data that is passed to CalculateOutputImageHandler::calculateOutputSubIma...
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol.
void CalculateOutputImagePropertiesCB(void *userData, PagedImage *outImage)
Callback for the calculation of the output image properties for outputImage.