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 
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 : public ImageToImageFilter<TInputImage, TOutputImage>
56 {
57 public:
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 
107  itkSetInputMacro(MarkerImage, MarkerImageType);
108  itkGetInputMacro(MarkerImage, MarkerImageType);
114  itkSetInputMacro(MaskImage, MaskImageType);
115  itkGetInputMacro(MaskImage, MaskImageType);
124  itkSetMacro(FullyConnected, bool);
125  itkGetConstReferenceMacro(FullyConnected, bool);
126  itkBooleanMacro(FullyConnected);
134  itkSetMacro(UseInternalCopy, bool);
135  itkGetConstReferenceMacro(UseInternalCopy, bool);
136  itkBooleanMacro(UseInternalCopy);
139 protected:
141  ~ReconstructionImageFilter() override = default;
142  void
143  PrintSelf(std::ostream & os, Indent indent) const override;
144 
148  void
149  GenerateInputRequestedRegion() override;
150 
152  void
153  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
154 
155  void
156  GenerateData() override;
157 
161  typename TInputImage::PixelType m_MarkerValue{};
162 
163 private:
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
itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator
Splits an image into a main region and several "face" regions which are used to handle computations o...
Definition: itkNeighborhoodAlgorithm.h:63
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itkNeighborhoodAlgorithm.h
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MaskImageConstPointer
typename MaskImageType::ConstPointer MaskImageConstPointer
Definition: itkReconstructionImageFilter.h:79
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MaskImagePointer
typename MaskImageType::Pointer MaskImagePointer
Definition: itkReconstructionImageFilter.h:78
itkProgressReporter.h
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MarkerImageConstPointer
typename MarkerImageType::ConstPointer MarkerImageConstPointer
Definition: itkReconstructionImageFilter.h:72
itk::SmartPointer< Self >
itkImageRegionIterator.h
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MarkerImagePointer
typename MarkerImageType::Pointer MarkerImagePointer
Definition: itkReconstructionImageFilter.h:71
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::FaceListTypeIt
typename FaceCalculatorType::FaceListType::iterator FaceListTypeIt
Definition: itkReconstructionImageFilter.h:170
itk::ShapedNeighborhoodIterator
A neighborhood iterator which can take on an arbitrary shape.
Definition: itkShapedNeighborhoodIterator.h:150
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MaskImageRegionType
typename MaskImageType::RegionType MaskImageRegionType
Definition: itkReconstructionImageFilter.h:80
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MaskImageType
TInputImage MaskImageType
Definition: itkReconstructionImageFilter.h:77
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::InputImageIndexType
typename InputImageType::IndexType InputImageIndexType
Definition: itkReconstructionImageFilter.h:76
itk::ImageToImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkImageToImageFilter.h:133
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::FaceCalculatorType
typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< OutputImageType > FaceCalculatorType
Definition: itkReconstructionImageFilter.h:167
itk::ImageRegionIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionIterator.h:80
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MarkerImagePixelType
typename MarkerImageType::PixelType MarkerImagePixelType
Definition: itkReconstructionImageFilter.h:74
itk::ReconstructionImageFilter
Performs a grayscale geodesic reconstruction – for performance comparison with GrayscaleGeodesicDilat...
Definition: itkReconstructionImageFilter.h:55
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkReconstructionImageFilter.h:84
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::FaceListType
typename FaceCalculatorType::FaceListType FaceListType
Definition: itkReconstructionImageFilter.h:169
itk::ConstShapedNeighborhoodIterator
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
Definition: itkConstShapedNeighborhoodIterator.h:72
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::InIndexType
typename InputImageType::IndexType InIndexType
Definition: itkReconstructionImageFilter.h:176
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::ISizeType
typename InputImageType::SizeType ISizeType
Definition: itkReconstructionImageFilter.h:69
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itkShapedNeighborhoodIterator.h
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::ImageRegionConstIterator
A multi-dimensional iterator templated over image type that walks a region of pixels.
Definition: itkImageRegionConstIterator.h:109
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::OutputImageIndexType
typename OutputImageType::IndexType OutputImageIndexType
Definition: itkReconstructionImageFilter.h:87
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MaskImagePixelType
typename MaskImageType::PixelType MaskImagePixelType
Definition: itkReconstructionImageFilter.h:81
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MarkerImageRegionType
typename MarkerImageType::RegionType MarkerImageRegionType
Definition: itkReconstructionImageFilter.h:73
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::MarkerImageType
TInputImage MarkerImageType
Definition: itkReconstructionImageFilter.h:70
itk::ReconstructionImageFilter< TInputImage, TOutputImage, std::less< TOutputImage::PixelType > >::OutIndexType
typename OutputImageType::IndexType OutIndexType
Definition: itkReconstructionImageFilter.h:175
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293