ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkMergeLabelMapFilter.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 itkMergeLabelMapFilter_h
19 #define itkMergeLabelMapFilter_h
20 
22 
23 namespace itk
24 {
52 template< typename TImage >
54  public InPlaceLabelMapFilter< TImage >
55 {
56 public:
62 
64  typedef TImage ImageType;
65  typedef typename ImageType::Pointer ImagePointer;
66  typedef typename ImageType::ConstPointer ImageConstPointer;
67  typedef typename ImageType::PixelType PixelType;
68  typedef typename ImageType::IndexType IndexType;
69  typedef typename ImageType::LabelObjectType LabelObjectType;
70  typedef typename LabelObjectType::Pointer LabelObjectPointer;
71 
73  itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
74 
76  itkNewMacro(Self);
77 
80 
81 #ifdef ITK_USE_CONCEPT_CHECKING
82  // Begin concept checking
83 /* itkConceptMacro(InputEqualityComparableCheck,
84  (Concept::EqualityComparable<InputImagePixelType>));
85  itkConceptMacro(IntConvertibleToInputCheck,
86  (Concept::Convertible<int, InputImagePixelType>));
87  itkConceptMacro(InputOStreamWritableCheck,
88  (Concept::OStreamWritable<InputImagePixelType>));*/
89 // End concept checking
90 #endif
91 
92 #ifdef STRICT
93 #undef STRICT
94 #endif
95  typedef enum {
96  KEEP = 0,
97  AGGREGATE = 1,
98  PACK = 2,
99  STRICT = 3
100  } MethodChoice;
101 
103  itkSetMacro(Method, MethodChoice);
104  itkGetConstReferenceMacro(Method, MethodChoice);
106 
107 protected:
110 
111  void GenerateData() ITK_OVERRIDE;
112 
113  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
114 
116 
117 private:
118  MergeLabelMapFilter(const Self &) ITK_DELETE_FUNCTION;
119  void operator=(const Self &) ITK_DELETE_FUNCTION;
120 
121  void MergeWithKeep();
122 
123  void MergeWithAggregate();
124 
125  void MergeWithPack();
126 
127  void MergeWithStrict();
128 }; // end of class
129 } // end namespace itk
130 
131 #ifndef ITK_MANUAL_INSTANTIATION
132 #include "itkMergeLabelMapFilter.hxx"
133 #endif
134 
135 #endif
InPlaceLabelMapFilter< TImage > Superclass
Light weight base class for most itk classes.
ImageType::LabelObjectType LabelObjectType
Merges several Label Maps.
static const unsigned int ImageDimension
void GenerateData() override
ImageType::IndexType IndexType
SmartPointer< Self > Pointer
ImageType::ConstPointer ImageConstPointer
ImageType::PixelType PixelType
Base class for filters that takes an image as input and overwrites that image as the output...
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
SmartPointer< const Self > ConstPointer
LabelObjectType::Pointer LabelObjectPointer