ML Reference
mlModule.h
Go to the documentation of this file.
1 // **InsertLicense** code
2 //-------------------------------------------------------------------------
10 //-------------------------------------------------------------------------
11 #ifndef __mlModule_H
12 #define __mlModule_H
13 
14 // ML-includes
15 #include "mlInitSystemML.h"
16 #include "mlRuntimeSubClass.h"
17 #include "mlBasics.h"
18 #include "mlBase.h"
20 #include "mlFields.h"
21 #include "mlFieldContainer.h"
22 
23 #include "mlModuleInterfaces.h"
25 #include "mlPagedImage.h"
26 
27 #include <mlMetaProfilePtr.h>
28 
29 
32 #define ML_ADD_FIELD(NAME_P, TYPE_P, VALUE_P) \
33 (static_cast<TYPE_P##Field*> (this->getFieldContainer()->addField(NAME_P, #TYPE_P, VALUE_P)));
34 
35 
37 
38 // Namespace ML. It is recommended that all ML classes and modules are in this
39 // name space to avoid collisions with types of other libraries.
40 ML_START_NAMESPACE
41 
42 // ML-classes
43 class SubImage;
44 class PagedImage;
45 class ProcessAllPagesHandler;
46 #ifdef ML_DEPRECATED
47 class BaseOp;
48 class DummyOp;
49 #endif
50 
51 //-------------------------------------------------------------------------
54 
151 //-------------------------------------------------------------------------
153 {
154 
155  //---------------------------------------------------------------------------
157  //---------------------------------------------------------------------------
158  friend class Host;
159  friend class PagedImage;
160  friend class PageRequest;
161  friend class TileRequest;
162  friend class ModuleCalculateOutputImageHandler;
163  friend class State;
164  friend class ClassicHost;
165 
167 
168 public:
169  typedef void (*DiagnosisModuleStackCallback)(void*);
170 
171  //---------------------------------------------------------------------------
173 
174  //---------------------------------------------------------------------------
175 
184 public: Module(int numInputImages, int numOutputImages);
185 
191 public: virtual ~Module();
193 
194 
195 
196  //---------------------------------------------------------------------------
198 
199  //---------------------------------------------------------------------------
200 
207 protected: void setOutputImageInplace(MLint outputIndex=0, MLint inputIndex=0);
208 
212 protected: void unsetOutputImageInplace(MLint outputIndex=0);
213 
218 public: MLint getOutputImageInplace(MLint outputIndex=0) const;
219 
220 
221 
227 protected: void setBypass(MLint outputIndex=0, MLint inputIndex=0);
228 
232 public: MLint getBypass(MLint outputIndex=0) const;
233 
237  NO_THREAD_SUPPORT = PagedImage::NO_THREAD_SUPPORT,
238  MULTITHREADED = PagedImage::MULTITHREADED,
239  IO_THREAD = PagedImage::IO_THREAD,
240 
241  ML_CALCULATEOUTPUTSUBIMAGE_ON_STD_TYPES = PagedImage::MULTITHREADED,
242  ML_CALCULATEOUTPUTSUBIMAGE_ON_ALL_TYPES = PagedImage::MULTITHREADED,
243 #ifdef ML_DEPRECATED
244  CALC_OUTSUBIMAGE_ON_STD_TYPES = PagedImage::MULTITHREADED,
245  CALC_OUTSUBIMAGE_ON_ALL_TYPES = PagedImage::MULTITHREADED
246 #endif // ML_DEPRECATED
247  };
248 
251 protected: void setThreadSupport(THREAD_SUPPORT supportMode);
252 
255 public: THREAD_SUPPORT getThreadSupport() const;
256 
257 
261 protected: void permitRecursiveHandleNotifications(bool enable);
262 
265 public: bool areRecursiveHandleNotificationsPermitted() const;
266 
272 public: MLint getHandleNotificationEntryCounter() const;
273 
275 
276 
277  //---------------------------------------------------------------------------
279 
280  //---------------------------------------------------------------------------
282 public: enum PERMITTED_TYPES {
286  ONLY_STANDARD_TYPES = ONLY_SCALAR_TYPES,
287  FULLY_OPERATIONAL = ONLY_DEFAULT_TYPES,
288  MINIMUM_OPERATIONAL = ALL_REGISTERED_TYPES
289 };
290 
306 protected: void setVoxelDataTypeSupport(PERMITTED_TYPES permTypes);
307 
311 public: PERMITTED_TYPES getVoxelDataTypeSupport() const;
312 
315 public: bool isSupportedVoxelDataType(MLDataType dt) const;
317 
318 
319  //---------------------------------------------------------------------------
321 
322  //---------------------------------------------------------------------------
323 
328 public: std::string whoAmI(bool withInstanceName=true) const;
330 
331 
332 
333 
334  //---------------------------------------------------------------------------
336 
337  //---------------------------------------------------------------------------
338 
340 public: enum INPUT_STATE {
341  DISCONNECTED = 0, //<! defines that the input is disconnected. In the case of handleInput, this means that the input image can not be updated to a valid image.
342  CONNECTED_BUT_INVALID = 1, //<! defines that the input is connected but has no valid data.
343  CONNECTED_AND_VALID = 2, //<! defines that the input is connected and valid.
344  CONNECTED_BUT_NEEDS_UPDATE = 3, //<! defines that the input is connected and needs to be updated via updateImageProperties(). After the update it may either become CONNECTED_AND_VALID or CONNECTED_BUT_INVALID.
345 #ifdef ML_DEPRECATED
346  OPEN = DISCONNECTED, //<! \deprecated, use DISCONNECTED
347  UNDEFINED_CLOSED = CONNECTED_BUT_INVALID //<! \deprecated, use CONNECTED_BUT_INVALID
348 #endif
349 };
350 
352 public: enum INPUT_HANDLE {
353  INVALIDATE = 0, //<! Used as return value of handleInput() to indicate that the given input is not allowed to be invalid and the output images of the module should be invalidated without calling calculateOutputImageProperties().
354  ALLOW_INVALID_INPUT = 2, //<! Used as return value of handleInput() to indicate that the given input is allowed to be invalid. calculateOutputImageProperties() will be called and getInputImage() for that input index will return NULL.
355 #ifdef ML_DEPRECATED
356  REDIRECT_TO_DUMMY_OP = 1, //<! Deprecated flag to indicate that an invalid input should be redirected to the DummyOp module.
357 #endif
358 };
359 
387 public: virtual INPUT_HANDLE handleInput(int /*inputIndex*/, INPUT_STATE /*state*/) const { return INVALIDATE; }
388 
396 public: INPUT_STATE getInputState(MLint index);
397 
402 public: INPUT_STATE getUpdatedInputState(MLint index);
404 
405 
406 
407  //---------------------------------------------------------------------------
409 
410  //---------------------------------------------------------------------------
411 
412 public:
414  InputConnectorField* getInputImageField(MLint i) const;
416  OutputConnectorField* getOutputImageField(MLint i=0) const;
417 
419  MLint getNumInputImages() const;
420 
422  MLint getNumOutputImages() const;
423 
425  PagedImage* getOutputImage(MLint outputIndex=0) const;
426 
430  InputConnectorField* addInputImage(const char* name = NULL);
431 
436  OutputConnectorField* addOutputImage(const char* name = NULL);
437 
438  //---------------------------------------------------------------------------
453  //---------------------------------------------------------------------------
454 public: PagedImage* getInputImage(MLint inputIndex, bool getReal=false) const;
455 
456  //---------------------------------------------------------------------------
467  //---------------------------------------------------------------------------
468 public: PagedImage *getUpdatedInputImage(MLint inputIndex, bool getReal=false);
469 
471 
472 
473 
474  //---------------------------------------------------------------------------
476 
477  // These functions are identical to those from
478  // Host::getDefaultHost() and are
479  // wrapped here for convenience and to avoid direct accesses
480  // to the host and to avoid includes of mlHost.h.
481  // See mlHost.h for documentation.
482  //---------------------------------------------------------------------------
483 public:
484 
487  static MLErrorCode getTile(PagedImage* image,
488  SubImageBox loc,
489  MLDataType datatype,
490  void** data,
491  const ScaleShiftData &scaleShiftData=ScaleShiftData()) ML_RETURN_VALUE_SHOULD_BE_USED;
492 
496  static MLErrorCode getTile(PagedImage* image,
497  SubImage &subimg,
498  const ScaleShiftData &scaleShiftData=ScaleShiftData()) ML_RETURN_VALUE_SHOULD_BE_USED;
499 
502  static MLErrorCode updateImageProperties(PagedImage* image) ML_RETURN_VALUE_SHOULD_BE_USED;
503 
505  static void freeTile(void* data);
506 
508  static void updateProgress(const char* info1, const char* info2);
509 
511  static bool shouldTerminate();
512 
514  static Field* getPressedNotifyField();
515 
526  static void adaptPageExtent (ImageVector& pageExtent,
527  MLDataType imageType,
528  const ImageVector& newImgExtent,
529  const ImageVector& oldImgExtent,
530  const ImageVector& pageUnit = ImageVector(0),
531  const ImageVector& minPageExtent = ImageVector(0),
532  const ImageVector& maxPageExtent = ImageVector(0));
533 
535 
536  //---------------------------------------------------------------------------
538 
539  //---------------------------------------------------------------------------
540 
547  static std::string getVoxelValueAsString(PagedImage* image,
548  const ImageVector& position,
549  MLErrorCode* errorCode=NULL,
550  const std::string& errorResult="");
552 
553 
554 
555  //---------------------------------------------------------------------------
557 
558  //---------------------------------------------------------------------------
559 
588 protected: virtual CalculateOutputImageHandler* createCalculateOutputImageHandler(PagedImage* outputImage);
589 
605 protected: virtual void calculateOutputImageProperties(int outputIndex, PagedImage* /*outputImage*/) { calculateOutputImageProperties(outputIndex); };
606 
609 protected: virtual void calculateOutputImageProperties(int /*outputIndex*/) {};
610 
617 protected: virtual SubImageBox calculateInputSubImageBox(int /*inputIndex*/,
618  const SubImageBox& outputSubImageBox,
619  int /*outputIndex*/)
620  {
621  return outputSubImageBox;
622  };
623 
638 protected: virtual void calculateOutputSubImage(SubImage *outputSubImage, int outputIndex, SubImage *inputSubImages);
639 
641 
642  //---------------------------------------------------------------------------
644 
645  //---------------------------------------------------------------------------
646 
654 protected: virtual void provideCustomPage(int /*outputIndex*/, const SubImageBox& /*pageBox*/, MLMemoryBlockHandle& /*resultPage*/) {};
655 
657 
658  //---------------------------------------------------------------------------
660 
661  //---------------------------------------------------------------------------
698 public: MLErrorCode processAllPages(int outputIndex = -1,
699  SubImageBox region = SubImageBox()) ML_RETURN_VALUE_SHOULD_BE_USED;
700 
705 public: MLErrorCode processAllPages(ProcessAllPagesHandler& handler,
706  SubImageBox region = SubImageBox()) ML_RETURN_VALUE_SHOULD_BE_USED;
707 
711 public: MLErrorCode processMissingPages(int outputIndex = 0,
712  SubImageBox region = SubImageBox()) ML_RETURN_VALUE_SHOULD_BE_USED;
714 
715 
716 
717  //---------------------------------------------------------------------------
719 
720  //---------------------------------------------------------------------------
721 
723 public: void clearOutputImage(MLint i=0);
725 
727 public: MLMetaProfilePtr& getMetaProfile() const;
728 
729 
730 
731 public:
732  static void setCallbacksForDiagnosisModuleStack(DiagnosisModuleStackCallback pushCallback, DiagnosisModuleStackCallback popCallback)
733  {
734  pushModuleForDiagnosis = pushCallback;
735  popModuleForDiagnosis = popCallback;
736  }
737 
738  //---------------------------------------------------------------------------
740 
741  //---------------------------------------------------------------------------
744 protected: void handleNotificationOff();
745 
748 protected: void handleNotificationOn();
749 
751 protected: bool isHandleNotificationOn();
753 
754 
755  //---------------------------------------------------------------------------
757 
758  //---------------------------------------------------------------------------
759 
761 public: bool isInputImageField(Field* field) const;
762 
764 public: void touchOutputImageFields() const;
765 
769 public: inline FieldContainer* getFieldContainer() { return this; }
770 
774 public: inline const FieldContainer* getFieldContainer() const { return this; }
775 
790 protected: virtual void handleNotification(Field* /*field*/) {}
791 
795 public: virtual void beginSaveFields() {}
796 
800 public: virtual void endSaveFields() {}
802 
805 protected: virtual void handleNotificationInternal(Field* field, FieldSensor::Strength strength);
806 
807 
808  //---------------------------------------------------------------------------
810 
811  //---------------------------------------------------------------------------
813 public: static size_t getNumModules();
814 
816 public: static Module* getModule(size_t index);
817 
819 public: static MLint findModuleIndex(Module& module);
820 
823 public: static void destroyModule();
825 
827 
828 
830 private: void setWasVisited(bool flag) { _visitedFlag = flag; }
831 
833 private: bool wasVisited() { return _visitedFlag; }
834 
836 
837 private:
838  //-----------Private methods:
842  bool _addBaseOp(Module& module);
843 
847  MLint _removeBaseOp(Module& module);
848 
849 
850  //-----------Private members:
852  std::vector <OutputConnectorField*> _outputConnectorFields;
853 
855  std::vector <InputConnectorField*> _inputConnectorFields;
856 
858  THREAD_SUPPORT _threadSupport;
859 
866  MLint _handleNotificationEntryCounter;
867 
871  bool _permitRecursiveHandleNotifications;
872 
874  bool _visitedFlag;
875 
877  PERMITTED_TYPES _permittedTypes;
878 
883  MLint _handleNotificationBlockCounter;
884 
886  mutable MLMetaProfilePtr _metaProfilePtr;
887 
889  static std::vector<Module*> _instantiatedModules;
890 
891  static DiagnosisModuleStackCallback pushModuleForDiagnosis;
892  static DiagnosisModuleStackCallback popModuleForDiagnosis;
893 
900 
901 public:
904 
905  virtual InputConnectorField* addInputConnector(const char* name, Module* module, MLint i);
908 
911  virtual OutputConnectorField* addOutputConnector(const char* name, Module* module, MLint i);
912 
914 
915 #ifdef ML_DEPRECATED
916 
918 
919 
920 public:
921 
924 protected: void setMemoryOutputControl(MLint outputIndex, bool manually);
925 
928 public: bool getMemoryOutputControl(MLint outputIndex) const;
929 
930 
933  static inline ML_DEPRECATED std::string getVoxelValueAsString(Module &op,
934  MLint outIdx,
935  const ImageVector &pos,
936  MLErrorCode *errCode=NULL,
937  const std::string &errResult="")
938  {
939  return getVoxelValueAsString(op.getOutputImage(outIdx), pos, errCode, errResult);
940  }
943  static ML_DEPRECATED MLErrorCode getTile(Module* op,
944  MLint outIndex,
945  SubImageBox loc,
946  MLDataType datatype,
947  void** data,
948  const ScaleShiftData &scaleShiftData=ScaleShiftData()) ML_RETURN_VALUE_SHOULD_BE_USED;
951  static ML_DEPRECATED MLErrorCode getTile(Module* op,
952  MLint outIndex,
953  SubImage &subimg,
954  const ScaleShiftData &scaleShiftData=ScaleShiftData()) ML_RETURN_VALUE_SHOULD_BE_USED;
957  static ML_DEPRECATED MLErrorCode updateImageProps(Module* op, MLint outIndex) ML_RETURN_VALUE_SHOULD_BE_USED;
960  static ML_DEPRECATED MLErrorCode updateImageProperties(Module* op, MLint outIndex) ML_RETURN_VALUE_SHOULD_BE_USED;
963  ML_DEPRECATED BaseOp* getInOp(MLint i, bool getReal=false) const;
966  ML_DEPRECATED MLint getInOpIndex(MLint i, bool getReal=false) const;
969  inline ML_DEPRECATED MLint getOutImgInplace(MLint outIndex=0) const { return getOutputImageInplace(outIndex); }
970 
973  ML_DEPRECATED static void getInInfos(const BaseOp &op,
974  MLint i,
975  bool getReal,
976  bool *isValidInputRet,
977  BaseOp **inOpRet,
978  PagedImage **inImgRet,
979  MLint *inOpIndexRet);
980 
983  inline ML_DEPRECATED MLint getInputNum() const { return getNumInputImages(); }
986  inline ML_DEPRECATED MLint getOutputNum() const { return getNumOutputImages(); }
989  inline ML_DEPRECATED PagedImage* getOutImg(MLint i=0) const { return getOutputImage(i); }
992  inline ML_DEPRECATED PagedImage* getInImg(MLint i, bool getReal=false) const { return getInputImage(i, getReal); }
995  inline ML_DEPRECATED PagedImage* getUpdatedInImg(MLint i, bool getReal=false) { return getUpdatedInputImage(i, getReal); }
996 
1006  ML_DEPRECATED PagedImage* getNonDummyUpdatedInImg(int inIndex);
1007 
1010  inline ML_DEPRECATED static void adaptPageExt (ImageVector &pageExt,
1011  MLDataType imgType,
1012  const ImageVector &newImgExt,
1013  const ImageVector &oldImgExt,
1014  const ImageVector &pageUnit = ImageVector(0),
1015  const ImageVector &minPageExt = ImageVector(0),
1016  const ImageVector &maxPageExt = ImageVector(0))
1017  {
1018  adaptPageExtent(pageExt, imgType, newImgExt, oldImgExt, pageUnit, minPageExt, maxPageExt);
1019  }
1022  inline ML_DEPRECATED void clearOutImg(MLint i=0) { clearOutputImage(i); }
1025  inline ML_DEPRECATED InputConnectorField* getInField(MLint i) const { return getInputImageField(i); }
1028  inline ML_DEPRECATED OutputConnectorField* getOutField(MLint i=0) const { return getOutputImageField(i); }
1031  inline const FieldContainer* getConstFieldContainer() const { return getFieldContainer(); }
1034  inline ML_DEPRECATED static size_t getNumBaseOps() { return getNumModules(); }
1037  ML_DEPRECATED static BaseOp* getBaseOp(size_t idx);
1040  inline ML_DEPRECATED static MLint findBaseOpIndex(Module &op) { return findModuleIndex(op); }
1043  inline ML_DEPRECATED static void destroyBaseOp() { destroyModule(); }
1044 
1045 
1046 protected:
1047 
1050  inline ML_DEPRECATED void setOutImgInplace(MLint outIndex=0, MLint inIndex=0) { setOutputImageInplace(outIndex, inIndex); }
1053  inline ML_DEPRECATED void unsetOutImgInplace(MLint outIndex=0) { unsetOutputImageInplace(outIndex); }
1054 
1056 
1057 #endif // ML_DEPRECATED
1058 
1059 };
1060 
1061 #ifdef ML_DEPRECATED
1062 
1064 #define calcOutImageProps calculateOutputImageProperties
1067 #define calcInSubImageBox calculateInputSubImageBox
1070 #define calcOutSubImage calculateOutputSubImage
1073 #define typedCalcOutSubImage typedCalculateOutputSubImage
1076 
1077 #if defined(WIN32) && defined(ML_WARN_DEPRECATED)
1078 #pragma deprecated("calcOutImageProps", "calcInSubImageBox", "calcOutSubImage", "typedCalcOutSubImage")
1079 #endif
1080 
1081 #ifndef DOXYGEN_SHOULD_SKIP_THIS
1082 
1088 template<typename CauseAnErrorIfNotSpecified>
1089 class calcInSubImageProps_has_been_removed_from_the_ML {
1090 };
1091 
1093 #define calcInSubImageProps(a,b,c) calcInSubImageProps() { calcInSubImageProps_has_been_removed_from_the_ML; };
1094 
1095 #endif
1096 
1097 // disable deprecation warnings
1098 #ifdef _MSC_VER
1099 #pragma warning(push)
1100 #pragma warning(disable : 4996 )
1101 #endif
1102 
1106 {
1107 public:
1108  BaseOp(int numInputImages, int numOutputImages):Module(numInputImages, numOutputImages)
1109  {};
1110 
1112 };
1113 
1114 // re-enable deprecation warnings
1115 #ifdef _MSC_VER
1116 #pragma warning(pop)
1117 #endif
1118 
1120 
1121 #endif // ML_DEPRECATED
1122 
1123 
1124 ML_END_NAMESPACE
1125 
1126 #endif //of __mlModule_H
1127 
1128 
INPUT_HANDLE
See documentation of handleInput.
Definition: mlModule.h:352
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:692
virtual void beginSaveFields()
Called before all fields data contents of this modules are saved.
Definition: mlModule.h:795
Base class for the calculation of pages of an output image (PagedImage) of a Module.
static std::string getVoxelValueAsString(Module &op, MLint outIdx, const ImageVector &pos, MLErrorCode *errCode=NULL, const std::string &errResult="")
Definition: mlModule.h:933
INPUT_STATE
See documentation of handleInput.
Definition: mlModule.h:340
Class representing general ML objects that support import/export via strings (setPersistentState() an...
virtual SubImageBox calculateInputSubImageBox(int, const SubImageBox &outputSubImageBox, int)
Called by the Host to determine which input image region (tile) of input inputIndex is required to ca...
Definition: mlModule.h:617
Classic ML host used internally to calculate getTile and processAllPages requests.
Definition: mlClassicHost.h:35
virtual void endSaveFields()
Called after saving all field contents of this module.
Definition: mlModule.h:800
TScaleShiftData< MLdouble > ScaleShiftData
Double version of TScaleShiftData for maximum reasonable precision.
#define ML_DEPRECATED
Definition: mlMacros.h:40
The Host is the central image processing class in the ML.
Definition: mlHost.h:119
OutputConnectorField * getOutField(MLint i=0) const
Definition: mlModule.h:1028
Strength
Enumeration type describing the strength of notifications.
Definition: mlFieldSensor.h:39
Derives a set of classes from the class Field, like StringField, IntField (and many more) for unified...
STL namespace.
void clearOutImg(MLint i=0)
Definition: mlModule.h:1022
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field)...
BaseOp(int numInputImages, int numOutputImages)
Definition: mlModule.h:1108
Class which represents an image, which manages properties of an image and image data which is located...
Definition: mlPagedImage.h:66
#define ML_DISALLOW_COPY_AND_ASSIGN(className)
Macro to make a copy constructor and assignment private, to avoid copying and assigning of macros...
Definition: mlMacros.h:17
const FieldContainer * getConstFieldContainer() const
Definition: mlModule.h:1031
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
Definition: mlTypeDefs.h:576
PagedImage * getUpdatedInImg(MLint i, bool getReal=false)
Definition: mlModule.h:995
static size_t getNumBaseOps()
Definition: mlModule.h:1034
FieldContainer * getFieldContainer()
Returns a pointer to the container of all the module's fields.
Definition: mlModule.h:769
MLint32 MLErrorCode
Type of an ML Error code.
Definition: mlTypeDefs.h:826
PagedImage * getOutputImage(MLint outputIndex=0) const
Returns output image outputIndex. The index needs to be in the range [0, getNumOutputImages()-1].
Base class for handlers that are used for the Module::processAllPages facility.
Defines system-specific macros for this project/DLL.
virtual void calculateOutputImageProperties(int)
Definition: mlModule.h:609
void unsetOutImgInplace(MLint outIndex=0)
Definition: mlModule.h:1053
#define MLEXPORT
To export symbols from a dll/shared object, we need to mark them with the MLEXPORT symbol...
MLint getInputNum() const
Definition: mlModule.h:983
< The image can only be calculated from the main thread
Definition: mlPagedImage.h:72
< The calculation of the image data can be called from multiple threads
Definition: mlPagedImage.h:73
static void destroyBaseOp()
Definition: mlModule.h:1043
The strong handle of a MLMemoryBlock.
Defines the class ProcessAllPagesHandler.
A TileRequest either represents the input sub image that is needed by a PageRequest or if it is a roo...
Definition: mlTileRequest.h:42
const FieldContainer * getFieldContainer() const
Returns a constant pointer to the container of all the module's fields.
Definition: mlModule.h:774
Base class for all fields used in the ML.
Definition: mlField.h:65
PagedImage * getOutImg(MLint i=0) const
Definition: mlModule.h:989
THREAD_SUPPORT
Enumerator deciding whether and which type of multithreading is supported by this module...
Definition: mlModule.h:236
PERMITTED_TYPES
See documentation of setVoxelDataTypeSupport.
Definition: mlModule.h:282
void setOutImgInplace(MLint outIndex=0, MLint inIndex=0)
Definition: mlModule.h:1050
static MLint findBaseOpIndex(Module &op)
Definition: mlModule.h:1040
Defines the class InSubImageProps which is a simple container for some properties which can be define...
MLint getOutputNum() const
Definition: mlModule.h:986
Field to encapsulate a pointer to an input connector which represents a module input.
Definition: mlFields.h:1122
InputConnectorField * getInField(MLint i) const
Definition: mlModule.h:1025
virtual void handleNotification(Field *)
Called when any field data in the field container of this module is modified.
Definition: mlModule.h:790
This file defines macros, which are inserted in classes to declare and implement additional class mem...
virtual void provideCustomPage(int, const SubImageBox &, MLMemoryBlockHandle &)
This method allows a Module to provide its own pages to the Host for the outputIndex output image...
Definition: mlModule.h:654
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field)...
ML_LINEAR_ALGEBRA_EXPORT typedef TImageVector< MLint > ImageVector
Defines the standard ImageVector type which is used by the ML for indexing and coordinates.
static void adaptPageExt(ImageVector &pageExt, MLDataType imgType, const ImageVector &newImgExt, const ImageVector &oldImgExt, const ImageVector &pageUnit=ImageVector(0), const ImageVector &minPageExt=ImageVector(0), const ImageVector &maxPageExt=ImageVector(0))
Definition: mlModule.h:1010
TSubImageBox< MLint > SubImageBox
Define the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...
Field to encapsulate a pointer to an output connector which represents a module output.
Definition: mlFields.h:1067
Base class for an image processing module of the ML.
Definition: mlModule.h:152
PagedImage * getInImg(MLint i, bool getReal=false) const
Definition: mlModule.h:992
#define ML_ABSTRACT_CLASS_HEADER(className)
Same like ML_ABSTRACT_CLASS_HEADER_EXPORTED with a non existing export symbol.
Contains the class PagedImage which represents an fragmented image which manages properties of an ima...
< The calculation of the image data can be called from a designated IO thread
Definition: mlPagedImage.h:74
Includes the basic ML stuff, like Vectors a small message output macro and singleton for the MLLinear...
virtual INPUT_HANDLE handleInput(int, INPUT_STATE) const
This method may be reimplemented to enable support for invalid input images on the module...
Definition: mlModule.h:387
virtual void handleNotificationInternal(Field *, FieldSensor::Strength)
Called when field has changed.
A PageRequest represents the request for the calculation of a single page of a PagedImage.
Definition: mlPageRequest.h:27
virtual void calculateOutputImageProperties(int outputIndex, PagedImage *)
Set properties of output image outputImage with output index outputIndex.
Definition: mlModule.h:605
This class manages/represents a rectangular 6d image region which is organized linearly in memory...
Definition: mlSubImage.h:68