ITK  4.9.0
Insight Segmentation and Registration 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 >
48  public ImageToImageFilter< TInputImage, TInputImage >
49 {
50 public:
56 
58  typedef TInputImage InputImageType;
59  typedef TInputImage OutputImageType;
60  typedef typename InputImageType::Pointer InputImagePointer;
61  typedef typename InputImageType::ConstPointer InputImageConstPointer;
62  typedef typename InputImageType::RegionType InputImageRegionType;
63  typedef typename InputImageType::PixelType InputImagePixelType;
64  typedef typename OutputImageType::Pointer OutputImagePointer;
65  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
66  typedef typename OutputImageType::RegionType OutputImageRegionType;
67  typedef typename OutputImageType::PixelType OutputImagePixelType;
68 
70  itkStaticConstMacro(InputImageDimension, unsigned int,
71  TInputImage::ImageDimension);
72  itkStaticConstMacro(OutputImageDimension, unsigned int,
73  TInputImage::ImageDimension);
74  itkStaticConstMacro(ImageDimension, unsigned int,
75  TInputImage::ImageDimension);
77 
87 
89  itkNewMacro(Self);
90 
92  itkTypeMacro(LabelShapeOpeningImageFilter,
94 
95 #ifdef ITK_USE_CONCEPT_CHECKING
96  // Begin concept checking
97  itkConceptMacro( InputEqualityComparableCheck,
99  itkConceptMacro( IntConvertibleToInputCheck,
101  itkConceptMacro( InputOStreamWritableCheck,
103  // End concept checking
104 #endif
105 
110  itkSetMacro(BackgroundValue, OutputImagePixelType);
111  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
113 
117  itkGetConstMacro(Lambda, double);
118  itkSetMacro(Lambda, double);
120 
127  itkGetConstMacro(ReverseOrdering, bool);
128  itkSetMacro(ReverseOrdering, bool);
129  itkBooleanMacro(ReverseOrdering);
131 
136  itkGetConstMacro(Attribute, AttributeType);
137  itkSetMacro(Attribute, AttributeType);
138  void SetAttribute(const std::string & s)
139  {
141  }
143 
144 protected:
147  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
148 
152  void GenerateInputRequestedRegion() ITK_OVERRIDE;
153 
155  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
156 
159  void GenerateData() ITK_OVERRIDE;
160 
161 private:
162  LabelShapeOpeningImageFilter(const Self &) ITK_DELETE_FUNCTION;
163  void operator=(const Self &) ITK_DELETE_FUNCTION;
164 
166  double m_Lambda;
169 }; // end of class
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 #include "itkLabelShapeOpeningImageFilter.hxx"
174 #endif
175 
176 #endif
ShapeOpeningLabelMapFilter< LabelMapType > OpeningType
InputImageType::ConstPointer InputImageConstPointer
convert a labeled image to a label collection image
void GenerateInputRequestedRegion() override
Light weight base class for most itk classes.
Remove objects according to the value of their shape attribute.
ShapeLabelMapFilter< LabelMapType, ShapeLabelFilterOutput > LabelObjectValuatorType
Superclass::AttributeType AttributeType
static AttributeType GetAttributeFromName(const std::string &s)
LabelImageToLabelMapFilter< InputImageType, LabelMapType > LabelizerType
A Label object to store the common attributes related to the shape of the object. ...
void EnlargeOutputRequestedRegion(DataObject *) override
Image< typename OutputImageType::PixelType, itkGetStaticConstMacro(OutputImageDimension) > ShapeLabelFilterOutput
OutputImageType::ConstPointer OutputImageConstPointer
ImageToImageFilter< TInputImage, TInputImage > Superclass
LabelObjectType::AttributeType AttributeType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
virtual void SetAttribute(AttributeType _arg)
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:70
#define itkConceptMacro(name, concept)
void PrintSelf(std::ostream &os, Indent indent) const override
ShapeLabelObject< InputImagePixelType, itkGetStaticConstMacro(ImageDimension) > LabelObjectType
The valuator class for the ShapeLabelObject.
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75
Converts a LabelMap to a labeled image.
remove the objects according to the value of their shape attribute
LabelMapToLabelImageFilter< LabelMapType, OutputImageType > BinarizerType