ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkBinaryShapeOpeningImageFilter.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 itkBinaryShapeOpeningImageFilter_h
19 #define itkBinaryShapeOpeningImageFilter_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, TInputImage::ImageDimension);
71  itkStaticConstMacro(OutputImageDimension, unsigned int, TInputImage::ImageDimension);
72  itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
74 
76 
86 
88  itkNewMacro(Self);
89 
92 
99  itkSetMacro(FullyConnected, bool);
100  itkGetConstReferenceMacro(FullyConnected, bool);
101  itkBooleanMacro(FullyConnected);
103 
104 #ifdef ITK_USE_CONCEPT_CHECKING
105  // Begin concept checking
106  itkConceptMacro( InputEqualityComparableCheck,
108  itkConceptMacro( IntConvertibleToInputCheck,
110  itkConceptMacro( InputOStreamWritableCheck,
112  // End concept checking
113 #endif
114 
119  itkSetMacro(BackgroundValue, OutputImagePixelType);
120  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
122 
127  itkSetMacro(ForegroundValue, OutputImagePixelType);
128  itkGetConstMacro(ForegroundValue, OutputImagePixelType);
130 
134  itkGetConstMacro(Lambda, double);
135  itkSetMacro(Lambda, double);
137 
144  itkGetConstMacro(ReverseOrdering, bool);
145  itkSetMacro(ReverseOrdering, bool);
146  itkBooleanMacro(ReverseOrdering);
148 
153  itkGetConstMacro(Attribute, AttributeType);
154  itkSetMacro(Attribute, AttributeType);
155  void SetAttribute(const std::string & s)
156  {
158  }
160 
161 protected:
164  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
165 
168  void GenerateInputRequestedRegion() ITK_OVERRIDE;
169 
171  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
172 
175  void GenerateData() ITK_OVERRIDE;
176 
177 private:
178  BinaryShapeOpeningImageFilter(const Self &); //purposely not implemented
179  void operator=(const Self &); //purposely not implemented
180 
184  double m_Lambda;
187 }; // end of class
188 } // end namespace itk
189 
190 #ifndef ITK_MANUAL_INSTANTIATION
191 #include "itkBinaryShapeOpeningImageFilter.hxx"
192 #endif
193 
194 #endif
Light weight base class for most itk classes.
LabelMapToBinaryImageFilter< LabelMapType, OutputImageType > BinarizerType
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void SetAttribute(AttributeType _arg)
ShapeLabelMapFilter< LabelMapType, ShapeLabelFilterOutput > LabelObjectValuatorType
unsigned long SizeValueType
Definition: itkIntTypes.h:143
ImageToImageFilter< TInputImage, TInputImage > Superclass
void GenerateInputRequestedRegion() override
OutputImageType::ConstPointer OutputImageConstPointer
Remove objects based on the value of their shape attribute.
Remove objects according to the value of their shape attribute.
Image< typename OutputImageType::PixelType, itkGetStaticConstMacro(OutputImageDimension) > ShapeLabelFilterOutput
Superclass::AttributeType AttributeType
static AttributeType GetAttributeFromName(const std::string &s)
BinaryImageToLabelMapFilter< InputImageType, LabelMapType > LabelizerType
A Label object to store the common attributes related to the shape of the object. ...
ShapeLabelObject< LabelType, itkGetStaticConstMacro(ImageDimension) > LabelObjectType
ShapeOpeningLabelMapFilter< LabelMapType > OpeningType
Label the connected components in a binary image and produce a collection of label objects...
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
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:70
#define itkConceptMacro(name, concept)
The valuator class for the ShapeLabelObject.
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75
Convert a LabelMap to a binary image.
void EnlargeOutputRequestedRegion(DataObject *) override