#include <HxMfReqMaskPixType.h>
Public Methods | |
HxMfReqMaskPixType (HxImageData *mask, HxImageData *obj, int pixDim=0) | |
Constructor. More... | |
HxMfReqMaskPixType (HxImageData *mask, int pixDim, HxValueType pixType, int pixPrec) | |
Constructor. More... | |
~HxMfReqMaskPixType () | |
Destructor. More... | |
HxImageData * | mask () const |
The mask image of the frame. More... |
The method frame is used to ensure that the mask has an appropriate signature.
|
Constructor. if (pixDim != 0) the required signature of the mask has the specified pixel dimensionality. Otherwise, it will have the pixel dimensionality of obj. The required signature for the mask has the image dimensionality and pixel dimensionality of "obj", the max of the pixel types of "obj" and "ker", and the maximum pixel precision. If this signature is not equal to the signature of mask a temporary mask will be created for mask() and set to the value of "mask".
00018 : _mask(mask), _tmp(0) 00019 { 00020 if (!obj || !_mask) 00021 return; 00022 00023 HxImageSignature objSig(obj->signature()); 00024 if (pixDim != 0) 00025 objSig.setPixelDimensionality(pixDim); 00026 00027 // Adjust mask if necessary 00028 HxImageData* ptr = setArg(_mask, objSig); 00029 if (ptr != 0) { 00030 _tmp = ptr; 00031 _mask = ptr; 00032 } 00033 } |
|
Constructor. The required signature has the dimensionality of "mask" and the specified "pixDim", "pixType, and "pixPrec". If this signature is not equal to the signature of mask a temporary mask will be created for mask() and set to the value of "mask".
00036 : _mask(mask), _tmp(0) 00037 { 00038 if (!_mask) 00039 return; 00040 00041 HxImageSignature maskSig(_mask->signature()); 00042 HxImageSignature newMaskSig(maskSig.imageDimensionality(), pixDim, pixType, 00043 pixPrec); 00044 if (!newMaskSig.isEqual(maskSig)) { 00045 _tmp = HxImgDataFactory::instance().makeImage(newMaskSig, mask->sizes()); 00046 _tmp->set(_mask); 00047 _tmp->weight(_mask->weight().x()); 00048 _mask = _tmp; 00049 } 00050 } |
|
Destructor.
00053 { 00054 if (_tmp) 00055 delete _tmp; 00056 } |
|
The mask image of the frame.
00060 { 00061 return _mask; 00062 } |