Orfeo Toolbox  3.16
itkAttributeRelabelLabelMapFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkAttributeRelabelLabelMapFilter.h,v $
5  Language: C++
6  Date: $Date: 2006/03/28 19:59:05 $
7  Version: $Revision: 1.6 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkAttributeRelabelLabelMapFilter_h
18 #define __itkAttributeRelabelLabelMapFilter_h
19 
22 
23 namespace itk {
36 template<class TImage, class TAttributeAccessor=
37  typename Functor::AttributeLabelObjectAccessor< typename TImage::LabelObjectType > >
39  public InPlaceLabelMapFilter<TImage>
40 {
41 public:
48 
50  typedef TImage ImageType;
51  typedef typename ImageType::Pointer ImagePointer;
52  typedef typename ImageType::ConstPointer ImageConstPointer;
53  typedef typename ImageType::PixelType PixelType;
54  typedef typename ImageType::IndexType IndexType;
55  typedef typename ImageType::LabelObjectType LabelObjectType;
56 
57  typedef TAttributeAccessor AttributeAccessorType;
58  typedef typename AttributeAccessorType::AttributeValueType AttributeValueType;
59 
61  itkStaticConstMacro(ImageDimension, unsigned int,
62  TImage::ImageDimension);
63 
65  itkNewMacro(Self);
66 
68  itkTypeMacro(AttributeRelabelLabelMapFilter,
70 
71 #ifdef ITK_USE_CONCEPT_CHECKING
72 
73 /* itkConceptMacro(InputEqualityComparableCheck,
74  (Concept::EqualityComparable<InputImagePixelType>));
75  itkConceptMacro(IntConvertibleToInputCheck,
76  (Concept::Convertible<int, InputImagePixelType>));
77  itkConceptMacro(InputOStreamWritableCheck,
78  (Concept::OStreamWritable<InputImagePixelType>));*/
80 #endif
81 
87  itkSetMacro( ReverseOrdering, bool );
88  itkGetConstReferenceMacro( ReverseOrdering, bool );
89  itkBooleanMacro( ReverseOrdering );
90 
91 protected:
94 
95  void GenerateData();
96 
97  void PrintSelf(std::ostream& os, Indent indent) const;
98 
100  {
101  public:
102  bool operator()( const typename LabelObjectType::Pointer & a, const typename LabelObjectType::Pointer & b )
103  {
104  return accessor( a ) < accessor( b );
105  }
107  };
108 
110  {
111  public:
112  bool operator()( const typename LabelObjectType::Pointer & a, const typename LabelObjectType::Pointer & b )
113  {
114  return accessor( a ) > accessor( b );
115  }
117  };
118 
119 private:
120  AttributeRelabelLabelMapFilter(const Self&); //purposely not implemented
121  void operator=(const Self&); //purposely not implemented
122 
124 
125 } ; // end of class
126 
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
131 #endif
132 
133 #endif
134 
135 

Generated at Sat Feb 2 2013 23:24:34 for Orfeo Toolbox with doxygen 1.8.1.1