18 #ifndef sitkLabelMapMaskImageFilter_h
19 #define sitkLabelMapMaskImageFilter_h
68 SITK_RETURN_SELF_TYPE_HEADER
SetLabel (
uint64_t Label ) { this->m_Label = Label;
return *
this; }
78 SITK_RETURN_SELF_TYPE_HEADER
SetBackgroundValue (
double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue;
return *
this; }
88 SITK_RETURN_SELF_TYPE_HEADER
SetNegated (
bool Negated ) { this->m_Negated = Negated;
return *
this; }
91 SITK_RETURN_SELF_TYPE_HEADER
NegatedOn() {
return this->SetNegated(
true); }
92 SITK_RETURN_SELF_TYPE_HEADER
NegatedOff() {
return this->SetNegated(
false); }
102 SITK_RETURN_SELF_TYPE_HEADER
SetCrop (
bool Crop ) { this->m_Crop =
Crop;
return *
this; }
105 SITK_RETURN_SELF_TYPE_HEADER
CropOn() {
return this->SetCrop(
true); }
106 SITK_RETURN_SELF_TYPE_HEADER
CropOff() {
return this->SetCrop(
false); }
116 SITK_RETURN_SELF_TYPE_HEADER
SetCropBorder (
const std::vector<unsigned int> & CropBorder ) { this->m_CropBorder = CropBorder;
return *
this; }
119 SITK_RETURN_SELF_TYPE_HEADER
SetCropBorder(
unsigned int value ) { this->m_CropBorder = std::vector<unsigned int>(3, value);
return *
this; }
125 std::vector<unsigned int>
GetCropBorder()
const {
return this->m_CropBorder; }
127 std::string
GetName()
const {
return std::string (
"LabelMapMaskImageFilter"); }
130 std::string ToString()
const;
134 Image Execute (
const Image & labelMapImage,
const Image & featureImage );
138 Image Execute (
const Image & labelMapImage,
const Image & featureImage,
uint64_t label,
double backgroundValue,
bool negated,
bool crop,
const std::vector<unsigned int> & cropBorder );
143 typedef Image (Self::*MemberFunctionType)(
const Image * labelMapImage,
const Image * featureImage );
146 template <
class TImageType1,
class TImageType2>
Image DualExecuteInternal (
const Image * labelMapImage,
const Image * featureImage );
Image LabelMapMask(const Image &labelMapImage, const Image &featureImage, uint64_t label=1u, double backgroundValue=0, bool negated=false, bool crop=false, const std::vector< unsigned int > &cropBorder=std::vector< unsigned int >(3, 0))
Mask and image with a LabelMap .
#define SITKBasicFilters_EXPORT
typelist::MakeTypeList< LabelPixelID< uint8_t >, LabelPixelID< uint16_t >, LabelPixelID< uint32_t > >::Type LabelPixelIDTypeList
uint64_t GetLabel() const
Self & SetCropBorder(const std::vector< unsigned int > &CropBorder)
Self & SetCrop(bool Crop)
Self & SetLabel(uint64_t Label)
double GetBackgroundValue() const
LabelMapMaskImageFilter Self
LabelPixelIDTypeList PixelIDTypeList
Mask and image with a LabelMap .
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
The Image class for SimpleITK.
Self & SetCropBorder(unsigned int value)
Self & SetNegated(bool Negated)
std::vector< unsigned int > m_CropBorder
std::vector< unsigned int > GetCropBorder() const
std::string GetName() const
Image Crop(const Image &image1, const std::vector< unsigned int > &lowerBoundaryCropSize=std::vector< unsigned int >(3, 0), const std::vector< unsigned int > &upperBoundaryCropSize=std::vector< unsigned int >(3, 0))
Decrease the image size by cropping the image by an itk::Size at both the upper and lower bounds of t...
Self & SetBackgroundValue(double BackgroundValue)
The base interface for SimpleITK filters that take one input image.