ITK  4.13.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 < typename TInputImage, typename TOutputImage >
39 class ITK_TEMPLATE_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;
63 
64  typedef TOutputImage OutputImageType;
65  typedef typename OutputImageType::Pointer OutputImagePointer;
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 
90  {
91  return &(this->m_Region);
92  }
93 
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:
114  ~LevelSetDomainMapImageFilter() ITK_OVERRIDE;
115 
118  InputImageRegionType ComputeConsistentRegion( const InputImageRegionType & subRegion ) const;
119 
122  virtual void GenerateData() ITK_OVERRIDE;
123 
125  virtual void PrintSelf ( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
126 
127  private:
128  DomainMapType m_DomainMap;
129 
130  LevelSetDomainMapImageFilter ( Self& ); // intentionally not implemented
131  void operator= ( const Self& ); // intentionally not implemented
132 
133  const InputImageType *m_InputImage;
134  OutputImageType *m_OutputImage;
135  };
136 
137 } /* namespace itk */
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkLevelSetDomainMapImageFilter.hxx"
141 #endif
142 
143 #endif
ImageRegionConstIteratorWithIndex< OutputImageType > OutputConstIteratorType
Specifies an image region where an unique std::list of level sets Id&#39;s are defined.
ImageRegionIteratorWithIndex< OutputImageType > OutputIndexIteratorType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
InputImageType::ConstPointer InputImageConstPointer
Base class for all process objects that output image data.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
ImageRegionIteratorWithIndex< InputImageType > InputIndexIteratorType
ImageRegionIterator< InputImageType > InputIteratorType
InputImageSizeType::SizeValueType InputImageSizeValueType
ImageRegionIterator< OutputImageType > OutputIteratorType
InputImageType::RegionType InputImageRegionType
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
ImageRegionConstIteratorWithIndex< InputImageType > InputConstIteratorType
std::map< IdentifierType, LevelSetDomain > DomainMapType
InputImageType::PixelType InputImagePixelType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
A multi-dimensional iterator templated over image type that walks a region of pixels.
LevelSetDomain(const InputImageRegionType &reg, const InputImagePixelType &iList)