ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkAttributeOpeningLabelMapFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkAttributeOpeningLabelMapFilter_h
00019 #define __itkAttributeOpeningLabelMapFilter_h
00020 
00021 #include "itkInPlaceLabelMapFilter.h"
00022 #include "itkAttributeLabelObject.h"
00023 
00024 namespace itk {
00042 template<class TImage, class TAttributeAccessor=
00043     typename Functor::AttributeLabelObjectAccessor< typename TImage::LabelObjectType > >
00044 class ITK_EXPORT AttributeOpeningLabelMapFilter :
00045     public InPlaceLabelMapFilter<TImage>
00046 {
00047 public:
00049   typedef AttributeOpeningLabelMapFilter Self;
00050   typedef InPlaceLabelMapFilter<TImage>  Superclass;
00051   typedef SmartPointer<Self>             Pointer;
00052   typedef SmartPointer<const Self>       ConstPointer;
00053 
00055   typedef TImage                              ImageType;
00056   typedef typename ImageType::Pointer         ImagePointer;
00057   typedef typename ImageType::ConstPointer    ImageConstPointer;
00058   typedef typename ImageType::PixelType       PixelType;
00059   typedef typename ImageType::IndexType       IndexType;
00060 
00061   typedef typename Superclass::LabelObjectType LabelObjectType;
00062 
00063   typedef TAttributeAccessor                                 AttributeAccessorType;
00064   typedef typename AttributeAccessorType::AttributeValueType AttributeValueType;
00065 
00067   itkStaticConstMacro(ImageDimension, unsigned int,
00068                       TImage::ImageDimension);
00069 
00071   itkNewMacro(Self);
00072 
00074   itkTypeMacro(AttributeOpeningLabelMapFilter,
00075                InPlaceLabelMapFilter);
00076 
00077 #ifdef ITK_USE_CONCEPT_CHECKING
00078 
00079 /*  itkConceptMacro(InputEqualityComparableCheck,
00080     (Concept::EqualityComparable<InputImagePixelType>));
00081   itkConceptMacro(IntConvertibleToInputCheck,
00082     (Concept::Convertible<int, InputImagePixelType>));
00083   itkConceptMacro(InputOStreamWritableCheck,
00084     (Concept::OStreamWritable<InputImagePixelType>));*/
00085 
00087 #endif
00088 
00092   itkGetConstMacro(Lambda, AttributeValueType);
00093   itkSetMacro(Lambda, AttributeValueType);
00095 
00102   itkGetConstMacro( ReverseOrdering, bool );
00103   itkSetMacro( ReverseOrdering, bool );
00104   itkBooleanMacro( ReverseOrdering );
00106 
00107 protected:
00108   AttributeOpeningLabelMapFilter();
00109   ~AttributeOpeningLabelMapFilter() {};
00110 
00111   void GenerateData();
00112 
00113   void PrintSelf(std::ostream& os, Indent indent) const;
00114 
00115 private:
00116   AttributeOpeningLabelMapFilter(const Self&); //purposely not implemented
00117   void operator=(const Self&); //purposely not implemented
00118 
00119   AttributeValueType m_Lambda;
00120   bool               m_ReverseOrdering;
00121 
00122 }; // end of class
00123 
00124 } // end namespace itk
00125 
00126 #ifndef ITK_MANUAL_INSTANTIATION
00127 #include "itkAttributeOpeningLabelMapFilter.hxx"
00128 #endif
00129 
00130 #endif
00131