ITK  5.0.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 <utility>
27 #include <vector>
28 
29 namespace itk
30 {
39 template < typename TInputImage, typename TOutputImage >
40 class ITK_TEMPLATE_EXPORT LevelSetDomainMapImageFilter : public ImageToImageFilter< TInputImage, TOutputImage >
41 {
42  public:
47 
48  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
49 
51  itkNewMacro ( Self );
52 
55 
56  using InputImageType = TInputImage;
57  using InputImageConstPointer = typename InputImageType::ConstPointer;
58  using InputImagePixelType = typename InputImageType::PixelType;
63 
64  using OutputImageType = TOutputImage;
65  using OutputImagePointer = typename OutputImageType::Pointer;
67  using OutputImagePixelType = typename OutputImageType::PixelType;
68 
72 
76 
81  {
82  public:
83  LevelSetDomain() = default;
84 
86  InputImagePixelType iList ) :
87  m_Region( reg ), m_IdList(std::move( iList )) {}
88 
90  {
91  return &(this->m_Region);
92  }
93 
95  {
96  return &(this->m_IdList);
97  }
98 
99  private:
102  };
103 
105  using DomainMapType = std::map< IdentifierType, LevelSetDomain >;
106 
110  const DomainMapType & GetDomainMap() const;
111 
112  protected:
114  ~LevelSetDomainMapImageFilter() override = default;
115 
118  InputImageRegionType ComputeConsistentRegion( const InputImageRegionType & subRegion ) const;
119 
122  void GenerateData() override;
123 
125  void PrintSelf ( std::ostream& os, Indent indent ) const override;
126 
127  private:
129 
130  LevelSetDomainMapImageFilter ( Self& ) = delete;
131  void operator= ( const Self& ) = delete;
132 
135  };
136 
137 } /* namespace itk */
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkLevelSetDomainMapImageFilter.hxx"
141 #endif
142 
143 #endif
LevelSetDomain(const InputImageRegionType &reg, InputImagePixelType iList)
typename OutputImageType::Pointer OutputImagePointer
Specifies an image region where an unique std::list of level sets Id&#39;s are defined.
unsigned long SizeValueType
Definition: itkIntTypes.h:83
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
typename InputImageSizeType::SizeValueType InputImageSizeValueType
typename InputImageType::SizeType InputImageSizeType
A multi-dimensional iterator templated over image type that walks an image region and is specialized ...
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
std::map< IdentifierType, LevelSetDomain > DomainMapType
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
typename OutputImageType::IndexType OutputImageIndexType
typename InputImageType::IndexType InputImageIndexType
typename InputImageType::RegionType InputImageRegionType
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
typename InputImageType::ConstPointer InputImageConstPointer
A multi-dimensional iterator templated over image type that walks a region of pixels.