ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkLevelSetDomainMapImageFilter.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 
19 #ifndef __itkLevelSetDomainMapImageFilter_h
20 #define __itkLevelSetDomainMapImageFilter_h
21 
22 #include "itkImageToImageFilter.h"
23 #include "itkImageRegionIterator.h"
25 #include <list>
26 #include <vector>
27 
28 namespace itk
29 {
38 template < class TInputImage, class TOutputImage >
39 class ITK_EXPORT LevelSetDomainMapImageFilter : public ImageToImageFilter< TInputImage, TOutputImage >
40 {
41  public:
46 
47  itkStaticConstMacro ( ImageDimension, unsigned int,
48  TInputImage::ImageDimension );
49 
51  itkNewMacro ( Self );
52 
55 
56  typedef TInputImage InputImageType;
57  typedef typename InputImageType::ConstPointer InputImageConstPointer;
58  typedef typename InputImageType::PixelType InputImagePixelType;
59  typedef typename InputImageType::RegionType InputImageRegionType;
60  typedef typename InputImageType::SizeType InputImageSizeType;
62  typedef typename InputImageType::IndexType InputImageIndexType;
63 
64  typedef TOutputImage OutputImageType;
65  typedef typename OutputImageType::Pointer OutputImagePointer;
66  typedef typename OutputImageType::IndexType OutputImageIndexType;
67  typedef typename OutputImageType::PixelType OutputImagePixelType;
68 
72 
76 
81  {
82  public:
84 
86  const InputImagePixelType& iList ) :
87  m_Region( reg ), m_IdList( iList ) {}
88 
89  const InputImageRegionType * GetRegion() const
90  {
91  return &(this->m_Region);
92  }
93 
94  const InputImagePixelType * GetIdList() const
95  {
96  return &(this->m_IdList);
97  }
98 
99  private:
102  };
103 
105  typedef std::map< IdentifierType, LevelSetDomain > DomainMapType;
106 
110  const DomainMapType & GetDomainMap() const;
111 
112  protected:
115 
118  InputImageRegionType ComputeConsistentRegion( const InputImageRegionType & subRegion ) const;
119 
122  virtual void GenerateData();
123 
125  virtual void PrintSelf ( std::ostream& os, Indent indent ) const;
126 
127  private:
129 
130  LevelSetDomainMapImageFilter ( Self& ); // intentionally not implemented
131  void operator= ( const Self& ); // intentionally not implemented
132 
135  };
136 
137 } /* namespace itk */
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkLevelSetDomainMapImageFilter.hxx"
141 #endif
142 
143 #endif
144