28 #pragma warning(disable : 4263)
47 DoNotCompile = 0x00000001,
48 IsInplace = 0x00000002,
49 UseOnlySigned = 0x00000004,
50 UseOnlyDouble = 0x00000008,
51 UseOnlyFloat = 0x00000010,
52 UseOnlyInt = 0x00000020,
53 IsKernelModule = 0x00000040,
54 IsLevelSetModule = 0x00000080,
55 HasFeatureImage = 0x00000100,
56 IsImageFilter = 0x00000200,
57 IsImageMetric = 0x00000400,
58 IsTransform = 0x00000800,
59 IsInterpolator = 0x00001000,
60 IsOptimizer = 0x00002000,
61 IsSource = 0x00004000,
62 UseMemBufInput0 = 0x00008000,
63 UseMemBufInput1 = 0x00010000,
64 UseMemBufInput2 = 0x00020000,
67 NonScalarInput = 0x00100000,
68 NonScalarOutput = 0x00200000,
69 ConvertsPointSet = 0x00400000,
70 UsesComplex = 0x00800000,
71 UsesSCSL = 0x01000000,
72 SuppressGetParams = 0x02000000,
73 ClampOutputValues = 0x04000000,
74 AutoGetInputMinMax = 0x08000000,
75 SetOutputMinMax = 0x10000000,
76 UsesTensor = 0x20000000,
77 UsesCVVectors = 0x40000000,
78 UnUsedMask01_01 = 0x80000000
83 UsesImgDimVecOut = 0x00000001,
84 Uses2OutComps = 0x00000002,
85 Uses3OutComps = 0x00000004,
86 Uses4OutComps = 0x00000008,
87 Uses6OutComps = 0x00000010,
88 Uses8OutComps = 0x00000020,
89 Uses16OutComps = 0x00000040,
92 UsesGlobalPageExt = 0x00000200,
93 UsesImgDimVecIn = 0x00000400,
94 UseFlatKernel = 0x00000800,
95 UsesNonScalarIntConversion = 0x00001000,
96 IdSizedInBox0 = 0x00002000,
97 IdSizedInBox1 = 0x00004000,
98 IdSizedInBox2 = 0x00008000,
99 UnknownMask2_16 = 0x00010000,
100 UnknownMask2_17 = 0x00020000,
101 UnknownMask2_18 = 0x00040000,
102 UnknownMask2_29 = 0x00080000,
103 UnknownMask2_20 = 0x00100000,
104 UnknownMask2_21 = 0x00200000,
105 UnknownMask2_22 = 0x00400000,
106 UnknownMask2_23 = 0x00800000,
107 UnknownMask2_24 = 0x01000000,
108 UnknownMask2_25 = 0x02000000,
109 UnknownMask2_26 = 0x04000000,
110 UnknownMask2_27 = 0x08000000,
111 UnknownMask2_28 = 0x10000000,
112 UnknownMask2_39 = 0x20000000,
113 UnknownMask2_30 = 0x40000000,
114 UnknownMask2_31 = 0x80000000
286 const std::string &
str=
"Number of parameter should be ");
321 unsigned int _configMask1;
324 unsigned int _configMask2;
Base class for all fields used in the ML.
Class to implement much functionality used in ML modules wrapping filters.
MLTypeInfos * getInSubImageTypeInfos()
Returns the pointer to the information struct of the input data type; this pointer is valid or NULL o...
ITKModuleAddOnConfigs2
Configuration bits for configMask2 in ITKModuleAddOns constructor.
void postGetFilterParams()
Does Module::getFilterParams stuff on end of function.
ITKModuleAddOnConfigs1
Configuration bits for configMask1 in ITKModuleAddOns constructor.
static void printVector(const char *str, const ImageVector &vec)
Prints the passed string and then the parameters of the vector vec to the ML output.
void setInSubImageProperties(int outIndex, PagedImage &outImg)
Sets input subimage properties at end of Module::calculateOutputImageProperties.
unsigned int getConfigMask2()
Returns configuration mask 2.
MLDataType getOutputSubImageDataType(int outIndex=0)
Returns the current output buffer data type for non scalar filters.
void preConstructorStuff()
Adds functionality to constructor of _module directly after construction.
void preActivateAttachments()
Does Module::activateAttachments stuff on start of function.
MLTypeInfos * getOutSubImageTypeInfos(int outIndex=0)
Returns the pointer to the information struct of the output data type; this pointer is valid or NULL ...
static void packSubImg(SubImage &subImg, const SubImageBox &imgBox)
Reformat the data buffer of subimage subImg.
void postCalcOutImageProps(int outIndex)
Does Module::calculateOutputImageProperties stuff on end of function.
void preCalcOutSubImage(SubImage &outSubImg, int outIndex, SubImage *inSubImgs)
Does some Module::calculateOutputSubImage stuff on start of function.
void postSetFilterParams()
Does Module::setFilterParams stuff on end of function.
void postHandleNotification(Field *field)
Does Module::handleNotification stuff on end of function.
static MLDataType getBestIntegerType(MLDataType inDataType, MLdouble minVV, MLdouble maxVV)
If inDataType is an integer type then inDataType will be returned unchanged.
void preCalcOutImageProps(int outIndex)
Does Module::calculateOutputImageProperties stuff on start of function.
static bool isCompiledDim(MLint dim)
Returns true if filters are implemented for the passed dimension dim, otherwise false.
void postConstructorStuff()
Adds functionality to constructor of _module at end of constructor.
static std::string GetStringFromInt(int intVal, unsigned int reservedSpaces=1)
Return passed integer value as string.
void preHandleNotification(Field *field)
Does Module::handleNotification stuff on start of function.
ITKModuleAddOns(Module &module, unsigned int configMask1=Empty, unsigned int configMask2=Empty)
Create Initialization and configuration with flags in the passed configMask which must be composed fr...
SubImageBox preCalcInSubImageBox(int inIndex, const SubImageBox &outSubImgBox, int outIndex)
Does Module::calculateInputSubImageBox stuff on start of function.
SubImageBox postCalcInSubImageBox(int inIndex, const SubImageBox &outSubImgBox, const SubImageBox &processedBox, int outIndex)
Does Module::calculateInputSubImageBox stuff on end of function.
static MLDataType getBestSignedType(MLDataType inDataType, MLdouble minVV, MLdouble maxVV, int preferDouble)
Selects an adequate replacement type for the case that a signed type is required.
static int GetIntFromString(const std::string &str, bool &isValid)
Parse string for a valid integer at its beginning and return its value if possible; isValid is set if...
static void packMemory(void *targetBuffer, void *srcBuffer, size_t setSize, size_t gapSize, size_t numSets)
Takes memory pointed by srcBuffer, considers it as numSets objects of size setSize.
~ITKModuleAddOns()
Destructor.
MLDataType getInputSubImageDataType()
Returns the current input buffer data type for non scalar filters.
void postActivateAttachments()
Does Module::activateAttachments stuff on end of function.
static bool CheckNumberSizes(size_t s1, size_t s2, const std::string &funcName, const std::string &str="Number of parameter should be ")
Print the error for function funcName with the hint that the number of parameters should be s2 inst...
void preSetFilterParams()
Does Module::setFilterParams stuff on start of function.
MLint getUsedFilteringDim()
Returns the dimension the filter shall current work with.
unsigned int getConfigMask1()
Returns configuration mask 1.
void postCalcOutSubImage(SubImage &outSubImg, int outIndex, SubImage *inSubImgs)
Does some Module::calculateOutputSubImage stuff on end of function.
static void printSubImgBox(const char *str, const SubImageBox &box)
Prints the passed string and then the parameters of the subimage box box to the ML output.
static bool isCompiledType(MLDataType dt)
Returns true if filters are implemented for the passed data type dt, otherwise false.
void preGetFilterParams()
Does Module::getFilterParams stuff on start of function.
Base class for an image processing module of the ML.
Class which represents an image, which manages properties of an image and image data which is located...
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
MLint32 MLDataType
MLDataType.
#define MLITK_SUPPORT_EXPORT
When included by other libraries MLITK_SUPPORT_EXPORT is compiled as import 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 ...
Structure containing all data type features and pointers to all functions needed to implement operati...