SimpleITK  
sitkLabelMapMaskImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkLabelMapMaskImageFilter_h
19 #define sitkLabelMapMaskImageFilter_h
20 
21 /*
22  * WARNING: DO NOT EDIT THIS FILE!
23  * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24  * Please look at sitkDualImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkImageFilter.h"
31 #include "sitkBasicFilters.h"
32 
33 namespace itk::simple {
34 
50  public:
52 
54  virtual ~LabelMapMaskImageFilter();
55 
59 
62 
63 \
64 
68  SITK_RETURN_SELF_TYPE_HEADER SetLabel ( uint64_t Label ) { this->m_Label = Label; return *this; }
69 
73  uint64_t GetLabel() const { return this->m_Label; }\
74 
78  SITK_RETURN_SELF_TYPE_HEADER SetBackgroundValue ( double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue; return *this; }
79 
83  double GetBackgroundValue() const { return this->m_BackgroundValue; }\
84 
88  SITK_RETURN_SELF_TYPE_HEADER SetNegated ( bool Negated ) { this->m_Negated = Negated; return *this; }
89 
91  SITK_RETURN_SELF_TYPE_HEADER NegatedOn() { return this->SetNegated(true); }
92  SITK_RETURN_SELF_TYPE_HEADER NegatedOff() { return this->SetNegated(false); }
93 
97  bool GetNegated() const { return this->m_Negated; }\
98 
102  SITK_RETURN_SELF_TYPE_HEADER SetCrop ( bool Crop ) { this->m_Crop = Crop; return *this; }
103 
105  SITK_RETURN_SELF_TYPE_HEADER CropOn() { return this->SetCrop(true); }
106  SITK_RETURN_SELF_TYPE_HEADER CropOff() { return this->SetCrop(false); }
107 
111  bool GetCrop() const { return this->m_Crop; }\
112 
116  SITK_RETURN_SELF_TYPE_HEADER SetCropBorder ( std::vector<unsigned int> CropBorder ) { this->m_CropBorder = std::move(CropBorder); return *this; }
117 
119  SITK_RETURN_SELF_TYPE_HEADER SetCropBorder( unsigned int value ) { this->m_CropBorder = std::vector<unsigned int>(3, value); return *this; }
120 
124  std::vector<unsigned int> GetCropBorder() const { return this->m_CropBorder; }
125 
127  std::string GetName() const { return std::string ("LabelMapMaskImageFilter"); }
128 
130  std::string ToString() const;
131 
132 
135  Image Execute ( const Image & labelMapImage, const Image & featureImage );
136 
137 
138  private:
140  using MemberFunctionType = Image (Self::*)( const Image * labelMapImage, const Image * featureImage );
141 
143  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image * labelMapImage, const Image * featureImage );
144 
145 
146  std::unique_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
147 
148 
149 
150  /* */
151  uint64_t m_Label{1u};
152 
153  /* */
154  double m_BackgroundValue{0};
155 
156  /* */
157  bool m_Negated{false};
158 
159  /* */
160  bool m_Crop{false};
161 
162  std::vector<unsigned int> m_CropBorder{std::vector<unsigned int>(3, 0)};
163 
164 
165  };
166 
177  SITKBasicFilters_EXPORT Image LabelMapMask ( const Image & labelMapImage, const Image & featureImage, uint64_t label = 1u, double backgroundValue = 0, bool negated = false, bool crop = false, std::vector<unsigned int> cropBorder = std::vector<unsigned int>(3, 0) );
178 
180 }
181 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::LabelMapMaskImageFilter::CropOn
Self & CropOn()
Definition: sitkLabelMapMaskImageFilter.h:105
itk::simple::LabelMapMaskImageFilter::SetCropBorder
Self & SetCropBorder(unsigned int value)
Definition: sitkLabelMapMaskImageFilter.h:119
itk::simple::LabelMapMaskImageFilter::MemberFunctionType
Image(Self::*)(const Image *labelMapImage, const Image *featureImage) MemberFunctionType
Definition: sitkLabelMapMaskImageFilter.h:140
itk::simple::LabelMapMask
Image LabelMapMask(const Image &labelMapImage, const Image &featureImage, uint64_t label=1u, double backgroundValue=0, bool negated=false, bool crop=false, std::vector< unsigned int > cropBorder=std::vector< unsigned int >(3, 0))
Mask and image with a LabelMap .
itk::simple::LabelMapMaskImageFilter::GetCrop
bool GetCrop() const
Definition: sitkLabelMapMaskImageFilter.h:111
itk::simple::LabelMapMaskImageFilter::PixelIDTypeList
LabelPixelIDTypeList PixelIDTypeList
Definition: sitkLabelMapMaskImageFilter.h:61
itk::simple::LabelMapMaskImageFilter::GetCropBorder
std::vector< unsigned int > GetCropBorder() const
Definition: sitkLabelMapMaskImageFilter.h:124
itk::simple::LabelMapMaskImageFilter::SetNegated
Self & SetNegated(bool Negated)
Definition: sitkLabelMapMaskImageFilter.h:88
itk::simple::LabelMapMaskImageFilter::SetCropBorder
Self & SetCropBorder(std::vector< unsigned int > CropBorder)
Definition: sitkLabelMapMaskImageFilter.h:116
itk::simple::LabelMapMaskImageFilter::GetLabel
uint64_t GetLabel() const
Definition: sitkLabelMapMaskImageFilter.h:73
itk::simple::LabelMapMaskImageFilter::CropOff
Self & CropOff()
Definition: sitkLabelMapMaskImageFilter.h:106
sitkImageFilter.h
itk::simple::LabelMapMaskImageFilter::SetBackgroundValue
Self & SetBackgroundValue(double BackgroundValue)
Definition: sitkLabelMapMaskImageFilter.h:78
itk::simple::LabelMapMaskImageFilter::GetName
std::string GetName() const
Definition: sitkLabelMapMaskImageFilter.h:127
itk::simple::LabelMapMaskImageFilter::NegatedOn
Self & NegatedOn()
Definition: sitkLabelMapMaskImageFilter.h:91
itk::simple::Crop
Image Crop(Image &&image1, std::vector< unsigned int > lowerBoundaryCropSize=std::vector< unsigned int >(3, 0), 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...
sitkDualMemberFunctionFactory.h
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::LabelMapMaskImageFilter::GetBackgroundValue
double GetBackgroundValue() const
Definition: sitkLabelMapMaskImageFilter.h:83
itk::simple::LabelMapMaskImageFilter::m_DualMemberFactory
std::unique_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
Definition: sitkLabelMapMaskImageFilter.h:146
itk::simple::detail::DualExecuteInternalAddressor
Definition: sitkDetail.h:42
Label
itk::simple::LabelPixelIDTypeList
typelist2::typelist< LabelPixelID< uint8_t >, LabelPixelID< uint16_t >, LabelPixelID< uint32_t > > LabelPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:167
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:35
itk::Image
Definition: sitkPixelIDTypes.h:28
itk::simple::LabelMapMaskImageFilter::SetCrop
Self & SetCrop(bool Crop)
Definition: sitkLabelMapMaskImageFilter.h:102
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::LabelMapMaskImageFilter::SetLabel
Self & SetLabel(uint64_t Label)
Definition: sitkLabelMapMaskImageFilter.h:68
itk::simple::LabelMapMaskImageFilter::GetNegated
bool GetNegated() const
Definition: sitkLabelMapMaskImageFilter.h:97
itk::simple::LabelMapMaskImageFilter
Mask and image with a LabelMap .
Definition: sitkLabelMapMaskImageFilter.h:49
itk::simple::LabelMapMaskImageFilter::NegatedOff
Self & NegatedOff()
Definition: sitkLabelMapMaskImageFilter.h:92