ITK  6.0.0
Insight Toolkit
itkReconstructionImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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
24#include "itkProgressReporter.h"
25#include <queue>
26
27//#define BASIC
28#define COPY
29
30#ifdef COPY
32#endif
33
34namespace itk
35{
54template <typename TInputImage, typename TOutputImage, typename TCompare>
55class ITK_TEMPLATE_EXPORT ReconstructionImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
56{
57public:
58 ITK_DISALLOW_COPY_AND_MOVE(ReconstructionImageFilter);
59
63
66
68 using InputImageType = TInputImage;
70 using MarkerImageType = TInputImage;
74 using MarkerImagePixelType = typename MarkerImageType::PixelType;
75 using InputImagePixelType = typename InputImageType::PixelType;
77 using MaskImageType = TInputImage;
81 using MaskImagePixelType = typename MaskImageType::PixelType;
82 using OutputImageType = TOutputImage;
86 using OutputImagePixelType = typename OutputImageType::PixelType;
88
92 static constexpr unsigned int MarkerImageDimension = TInputImage::ImageDimension;
93 static constexpr unsigned int MaskImageDimension = TInputImage::ImageDimension;
94 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
95
97 itkNewMacro(Self);
98
100 itkOverrideGetNameOfClassMacro(ReconstructionImageFilter);
101
124 itkSetMacro(FullyConnected, bool);
125 itkGetConstReferenceMacro(FullyConnected, bool);
126 itkBooleanMacro(FullyConnected);
134 itkSetMacro(UseInternalCopy, bool);
135 itkGetConstReferenceMacro(UseInternalCopy, bool);
136 itkBooleanMacro(UseInternalCopy);
139protected:
141 ~ReconstructionImageFilter() override = default;
142 void
143 PrintSelf(std::ostream & os, Indent indent) const override;
144
148 void
150
152 void
153 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
154
155 void
156 GenerateData() override;
157
161 typename TInputImage::PixelType m_MarkerValue{};
162
163private:
164 bool m_FullyConnected{};
165 bool m_UseInternalCopy{};
166
168
169 using FaceListType = typename FaceCalculatorType::FaceListType;
170 using FaceListTypeIt = typename FaceCalculatorType::FaceListType::iterator;
171
174
179}; // end of class
180} // end namespace itk
181
182#ifndef ITK_MANUAL_INSTANTIATION
183# include "itkReconstructionImageFilter.hxx"
184#endif
185
186#endif
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
Base class for all data objects in ITK.
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional iterator templated over image type that walks a region of pixels.
Base class for all process objects that output image data.
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename OutputImageType::Pointer OutputImagePointer
Base class for filters that take an image as input and produce an image as output.
typename InputImageType::PixelType InputImagePixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Performs a grayscale geodesic reconstruction – for performance comparison with GrayscaleGeodesicDilat...
void EnlargeOutputRequestedRegion(DataObject *) override
typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< OutputImageType > FaceCalculatorType
typename OutputImageType::IndexType OutIndexType
typename OutputImageType::ConstPointer OutputImageConstPointer
typename FaceCalculatorType::FaceListType FaceListType
typename InputImageType::SizeType ISizeType
typename MarkerImageType::Pointer MarkerImagePointer
~ReconstructionImageFilter() override=default
typename MarkerImageType::RegionType MarkerImageRegionType
typename MaskImageType::Pointer MaskImagePointer
itkGetInputMacro(MaskImage, MaskImageType)
typename FaceCalculatorType::FaceListType::iterator FaceListTypeIt
typename MaskImageType::ConstPointer MaskImageConstPointer
typename MaskImageType::RegionType MaskImageRegionType
void GenerateInputRequestedRegion() override
typename InputImageType::IndexType InputImageIndexType
typename OutputImageType::IndexType OutputImageIndexType
itkGetInputMacro(MarkerImage, MarkerImageType)
void PrintSelf(std::ostream &os, Indent indent) const override
typename MaskImageType::PixelType MaskImagePixelType
typename MarkerImageType::PixelType MarkerImagePixelType
itkSetInputMacro(MaskImage, MaskImageType)
itkSetInputMacro(MarkerImage, MarkerImageType)
typename MarkerImageType::ConstPointer MarkerImageConstPointer
typename InputImageType::IndexType InIndexType
A neighborhood iterator which can take on an arbitrary shape.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Splits an image into a main region and several "face" regions which are used to handle computations o...