SimpleITK  1.3.0.dev466
sitkLabelMapMaskImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
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 {
34  namespace simple {
35 
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 ( const std::vector<unsigned int> & CropBorder ) { this->m_CropBorder = 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 
121 
125  std::vector<unsigned int> GetCropBorder() const { return this->m_CropBorder; }
127  std::string GetName() const { return std::string ("LabelMapMaskImageFilter"); }
128 
130  std::string ToString() const;
131 
132 
134  Image Execute ( const Image & labelMapImage, const Image & featureImage );
135 
136 
138  Image Execute ( const Image & labelMapImage, const Image & featureImage, uint64_t label, double backgroundValue, bool negated, bool crop, const std::vector<unsigned int> & cropBorder );
139 
140 
141  private:
143  typedef Image (Self::*MemberFunctionType)( const Image * labelMapImage, const Image * featureImage );
144 
145  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
146  template <class TImageType1, class TImageType2> Image DualExecuteInternal ( const Image * labelMapImage, const Image * featureImage );
147 
148 
149  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
150 
151 
152 
153  /* */
155  /* */
157  /* */
158  bool m_Negated;
159  /* */
160  bool m_Crop;
161  std::vector<unsigned int> m_CropBorder;
162  };
163 
164 
165 
174  SITKBasicFilters_EXPORT 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) );
175 
176  }
177 }
178 #endif
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
Self & SetCropBorder(const std::vector< unsigned int > &CropBorder)
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
The Image class for SimpleITK.
Definition: sitkImage.h:78
std::vector< unsigned int > GetCropBorder() 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...
::uint64_t uint64_t
Self & SetBackgroundValue(double BackgroundValue)
The base interface for SimpleITK filters that take one input image.