Orfeo Toolbox  3.16
itkShapeRelabelLabelMapFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkShapeRelabelLabelMapFilter.txx,v $
5  Language: C++
6  Date: $Date: 2009-08-04 21:34:24 $
7  Version: $Revision: 1.2 $
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 __itkShapeRelabelLabelMapFilter_txx
18 #define __itkShapeRelabelLabelMapFilter_txx
19 
21 
22 namespace itk {
23 
24 template <class TImage>
27 {
28  m_ReverseOrdering = false;
29  m_Attribute = LabelObjectType::SIZE;
30 }
31 
32 
33 template <class TImage>
34 void
37 {
38  switch( m_Attribute )
39  {
40  case LabelObjectType::LABEL:
41  {
42  typedef typename Functor::LabelLabelObjectAccessor< LabelObjectType > AccessorType;
43  AccessorType accessor;
44  this->TemplatedGenerateData( accessor );
45  break;
46  }
47  case LabelObjectType::SIZE:
48  {
49  typedef typename Functor::SizeLabelObjectAccessor< LabelObjectType > AccessorType;
50  AccessorType accessor;
51  this->TemplatedGenerateData( accessor );
52  break;
53  }
54  case LabelObjectType::PHYSICAL_SIZE:
55  {
57  AccessorType accessor;
58  this->TemplatedGenerateData( accessor );
59  break;
60  }
61  case LabelObjectType::SIZE_REGION_RATIO:
62  {
64  AccessorType accessor;
65  this->TemplatedGenerateData( accessor );
66  break;
67  }
68  case LabelObjectType::REGION_ELONGATION:
69  {
71  AccessorType accessor;
72  this->TemplatedGenerateData( accessor );
73  break;
74  }
75  case LabelObjectType::SIZE_ON_BORDER:
76  {
78  AccessorType accessor;
79  this->TemplatedGenerateData( accessor );
80  break;
81  }
82  case LabelObjectType::PHYSICAL_SIZE_ON_BORDER:
83  {
85  AccessorType accessor;
86  this->TemplatedGenerateData( accessor );
87  break;
88  }
89  case LabelObjectType::FERET_DIAMETER:
90  {
92  AccessorType accessor;
93  this->TemplatedGenerateData( accessor );
94  break;
95  }
96  case LabelObjectType::BINARY_ELONGATION:
97  {
99  AccessorType accessor;
100  this->TemplatedGenerateData( accessor );
101  break;
102  }
103  case LabelObjectType::PERIMETER:
104  {
105  typedef typename Functor::PerimeterLabelObjectAccessor< LabelObjectType > AccessorType;
106  AccessorType accessor;
107  this->TemplatedGenerateData( accessor );
108  break;
109  }
110  case LabelObjectType::ROUNDNESS:
111  {
112  typedef typename Functor::RoundnessLabelObjectAccessor< LabelObjectType > AccessorType;
113  AccessorType accessor;
114  this->TemplatedGenerateData( accessor );
115  break;
116  }
117  case LabelObjectType::EQUIVALENT_RADIUS:
118  {
120  AccessorType accessor;
121  this->TemplatedGenerateData( accessor );
122  break;
123  }
124  case LabelObjectType::EQUIVALENT_PERIMETER:
125  {
127  AccessorType accessor;
128  this->TemplatedGenerateData( accessor );
129  break;
130  }
131  case LabelObjectType::BINARY_FLATNESS:
132  {
134  AccessorType accessor;
135  this->TemplatedGenerateData( accessor );
136  break;
137  }
138  default:
139  itkExceptionMacro(<< "Unknown attribute type");
140  break;
141  }
142 }
143 
144 
145 template <class TImage>
146 void
148 ::PrintSelf(std::ostream& os, Indent indent) const
149 {
150  Superclass::PrintSelf(os,indent);
151 
152  os << indent << "ReverseOrdering: " << m_ReverseOrdering << std::endl;
153  os << indent << "Attribute: " << LabelObjectType::GetNameFromAttribute(m_Attribute) << " (" << m_Attribute << ")" << std::endl;
154 }
155 
156 }// end namespace itk
157 #endif

Generated at Sun Feb 3 2013 00:06:41 for Orfeo Toolbox with doxygen 1.8.1.1