ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkReconstructionImageFilter.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 itkReconstructionImageFilter_h
19 #define itkReconstructionImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
23 #include "itkImageRegionIterator.h"
24 #include "itkProgressReporter.h"
25 #include <queue>
26 
27 //#define BASIC
28 #define COPY
29 
30 #ifdef COPY
32 #endif
33 
34 namespace itk
35 {
54 template< typename TInputImage, typename TOutputImage, typename TCompare >
55 class ITK_TEMPLATE_EXPORT ReconstructionImageFilter:
56  public ImageToImageFilter< TInputImage, TOutputImage >
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_ASSIGN(ReconstructionImageFilter);
60 
64 
67 
69  using InputImageType = TInputImage;
71  using MarkerImageType = TInputImage;
72  using MarkerImagePointer = typename MarkerImageType::Pointer;
73  using MarkerImageConstPointer = typename MarkerImageType::ConstPointer;
75  using MarkerImagePixelType = typename MarkerImageType::PixelType;
76  using InputImagePixelType = typename InputImageType::PixelType;
78  using MaskImageType = TInputImage;
79  using MaskImagePointer = typename MaskImageType::Pointer;
80  using MaskImageConstPointer = typename MaskImageType::ConstPointer;
82  using MaskImagePixelType = typename MaskImageType::PixelType;
83  using OutputImageType = TOutputImage;
84  using OutputImagePointer = typename OutputImageType::Pointer;
85  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
87  using OutputImagePixelType = typename OutputImageType::PixelType;
89 
93  static constexpr unsigned int MarkerImageDimension = TInputImage::ImageDimension;
94  static constexpr unsigned int MaskImageDimension = TInputImage::ImageDimension;
95  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
96 
98  itkNewMacro(Self);
99 
101  itkTypeMacro(ReconstructionImageFilter,
103 
109  void SetMarkerImage(const MarkerImageType *);
110 
111  const MarkerImageType * GetMarkerImage();
112 
116  void SetMaskImage(const MaskImageType *);
117 
118  const MaskImageType * GetMaskImage();
119 
126  itkSetMacro(FullyConnected, bool);
127  itkGetConstReferenceMacro(FullyConnected, bool);
128  itkBooleanMacro(FullyConnected);
130 
136  itkSetMacro(UseInternalCopy, bool);
137  itkGetConstReferenceMacro(UseInternalCopy, bool);
138  itkBooleanMacro(UseInternalCopy);
140 
141 protected:
143  ~ReconstructionImageFilter() override = default;
144  void PrintSelf(std::ostream & os, Indent indent) const override;
145 
149  void GenerateInputRequestedRegion() override;
150 
152  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override;
153 
154  void GenerateData() override;
155 
159  typename TInputImage::PixelType m_MarkerValue;
160 
161 private:
164 
166 
167  using FaceListType = typename FaceCalculatorType::FaceListType;
168  using FaceListTypeIt = typename FaceCalculatorType::FaceListType::iterator;
169 
172 
177 }; // end of class
178 } // end namespace itk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 #include "itkReconstructionImageFilter.hxx"
182 #endif
183 
184 #endif
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
typename OutputImageType::Pointer OutputImagePointer
Performs a grayscale geodesic reconstruction – for performance comparison with GrayscaleGeodesicDilat...
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.
A neighborhood iterator which can take on an arbitrary shape.
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Splits an image into a main region and several &quot;face&quot; regions which are used to handle computations o...
typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< OutputImageType > FaceCalculatorType
typename OutputImageType::RegionType OutputImageRegionType
A multi-dimensional iterator templated over image type that walks a region of pixels.
TOutputImage OutputImageType
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
Base class for all data objects in ITK.
A multi-dimensional iterator templated over image type that walks a region of pixels.