ITK  5.1.0
Insight Toolkit
itkLabelShapeOpeningImageFilter.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 itkLabelShapeOpeningImageFilter_h
19 #define itkLabelShapeOpeningImageFilter_h
20 
21 #include "itkShapeLabelObject.h"
23 #include "itkShapeLabelMapFilter.h"
26 
27 namespace itk
28 {
46 template <typename TInputImage>
47 class ITK_TEMPLATE_EXPORT LabelShapeOpeningImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(LabelShapeOpeningImageFilter);
51 
57 
59  using InputImageType = TInputImage;
60  using OutputImageType = TInputImage;
61  using InputImagePointer = typename InputImageType::Pointer;
62  using InputImageConstPointer = typename InputImageType::ConstPointer;
64  using InputImagePixelType = typename InputImageType::PixelType;
65  using OutputImagePointer = typename OutputImageType::Pointer;
66  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
68  using OutputImagePixelType = typename OutputImageType::PixelType;
69 
71  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
72  static constexpr unsigned int OutputImageDimension = TInputImage::ImageDimension;
73  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
74 
83 
85  itkNewMacro(Self);
86 
89 
90 #ifdef ITK_USE_CONCEPT_CHECKING
91  // Begin concept checking
95  // End concept checking
96 #endif
97 
102  itkSetMacro(BackgroundValue, OutputImagePixelType);
103  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
105 
109  itkGetConstMacro(Lambda, double);
110  itkSetMacro(Lambda, double);
112 
119  itkGetConstMacro(ReverseOrdering, bool);
120  itkSetMacro(ReverseOrdering, bool);
121  itkBooleanMacro(ReverseOrdering);
123 
128  itkGetConstMacro(Attribute, AttributeType);
129  itkSetMacro(Attribute, AttributeType);
130  void
131  SetAttribute(const std::string & s)
132  {
133  this->SetAttribute(LabelObjectType::GetAttributeFromName(s));
134  }
136 
137 protected:
139  ~LabelShapeOpeningImageFilter() override = default;
140  void
141  PrintSelf(std::ostream & os, Indent indent) const override;
142 
146  void
147  GenerateInputRequestedRegion() override;
148 
150  void
151  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
152 
155  void
156  GenerateData() override;
157 
158 private:
160  double m_Lambda;
163 }; // end of class
164 } // end namespace itk
165 
166 #ifndef ITK_MANUAL_INSTANTIATION
167 # include "itkLabelShapeOpeningImageFilter.hxx"
168 #endif
169 
170 #endif
itkLabelImageToLabelMapFilter.h
itk::LabelShapeOpeningImageFilter::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkLabelShapeOpeningImageFilter.h:65
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:634
itk::LabelShapeOpeningImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkLabelShapeOpeningImageFilter.h:62
itk::LabelShapeOpeningImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkLabelShapeOpeningImageFilter.h:66
itk::LabelImageToLabelMapFilter
convert a labeled image to a label collection image
Definition: itkLabelImageToLabelMapFilter.h:49
itk::LabelShapeOpeningImageFilter::SetAttribute
void SetAttribute(const std::string &s)
Definition: itkLabelShapeOpeningImageFilter.h:131
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LabelShapeOpeningImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkLabelShapeOpeningImageFilter.h:64
itk::LabelShapeOpeningImageFilter::m_ReverseOrdering
bool m_ReverseOrdering
Definition: itkLabelShapeOpeningImageFilter.h:161
itk::ShapeLabelMapFilter
The valuator class for the ShapeLabelObject.
Definition: itkShapeLabelMapFilter.h:53
itk::LabelShapeOpeningImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkLabelShapeOpeningImageFilter.h:63
itkShapeOpeningLabelMapFilter.h
itk::LabelShapeOpeningImageFilter::m_BackgroundValue
OutputImagePixelType m_BackgroundValue
Definition: itkLabelShapeOpeningImageFilter.h:159
itk::LabelMap
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:70
itkShapeLabelMapFilter.h
itk::LabelShapeOpeningImageFilter::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkLabelShapeOpeningImageFilter.h:68
itkShapeLabelObject.h
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::LabelShapeOpeningImageFilter::m_Attribute
AttributeType m_Attribute
Definition: itkLabelShapeOpeningImageFilter.h:162
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::LabelShapeOpeningImageFilter::InputImageType
TInputImage InputImageType
Definition: itkLabelShapeOpeningImageFilter.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::LabelShapeOpeningImageFilter
remove the objects according to the value of their shape attribute
Definition: itkLabelShapeOpeningImageFilter.h:47
itk::ShapeOpeningLabelMapFilter
Remove objects according to the value of their shape attribute.
Definition: itkShapeOpeningLabelMapFilter.h:49
itk::LabelShapeOpeningImageFilter::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkLabelShapeOpeningImageFilter.h:67
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::ShapeLabelObject
A Label object to store the common attributes related to the shape of the object.
Definition: itkShapeLabelObject.h:43
itk::Concept::Convertible
Definition: itkConceptChecking.h:214
itk::LabelMapToLabelImageFilter
Converts a LabelMap to a labeled image.
Definition: itkLabelMapToLabelImageFilter.h:46
itk::LabelShapeOpeningImageFilter::AttributeType
typename LabelObjectType::AttributeType AttributeType
Definition: itkLabelShapeOpeningImageFilter.h:80
itk::LabelShapeOpeningImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkLabelShapeOpeningImageFilter.h:61
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::ShapeLabelObject::AttributeType
typename Superclass::AttributeType AttributeType
Definition: itkShapeLabelObject.h:74
itkLabelMapToLabelImageFilter.h
itk::LabelShapeOpeningImageFilter::m_Lambda
double m_Lambda
Definition: itkLabelShapeOpeningImageFilter.h:160
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:304
itk::LabelShapeOpeningImageFilter::OutputImageType
TInputImage OutputImageType
Definition: itkLabelShapeOpeningImageFilter.h:60
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:288