ITK  4.6.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 >
56  public ImageToImageFilter< TInputImage, TOutputImage >
57 {
58 public:
62 
65 
67  typedef TInputImage InputImageType;
68  typedef typename InputImageType::SizeType ISizeType;
69  typedef TInputImage MarkerImageType;
70  typedef typename MarkerImageType::Pointer MarkerImagePointer;
71  typedef typename MarkerImageType::ConstPointer MarkerImageConstPointer;
72  typedef typename MarkerImageType::RegionType MarkerImageRegionType;
73  typedef typename MarkerImageType::PixelType MarkerImagePixelType;
74  typedef typename InputImageType::PixelType InputImagePixelType;
75  typedef typename InputImageType::IndexType InputImageIndexType;
76  typedef TInputImage MaskImageType;
77  typedef typename MaskImageType::Pointer MaskImagePointer;
78  typedef typename MaskImageType::ConstPointer MaskImageConstPointer;
79  typedef typename MaskImageType::RegionType MaskImageRegionType;
80  typedef typename MaskImageType::PixelType MaskImagePixelType;
81  typedef TOutputImage OutputImageType;
82  typedef typename OutputImageType::Pointer OutputImagePointer;
83  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
84  typedef typename OutputImageType::RegionType OutputImageRegionType;
85  typedef typename OutputImageType::PixelType OutputImagePixelType;
86  typedef typename OutputImageType::IndexType OutputImageIndexType;
87 
91  itkStaticConstMacro(MarkerImageDimension, unsigned int,
92  TInputImage::ImageDimension);
93  itkStaticConstMacro(MaskImageDimension, unsigned int,
94  TInputImage::ImageDimension);
95  itkStaticConstMacro(OutputImageDimension, unsigned int,
96  TOutputImage::ImageDimension);
98 
100  itkNewMacro(Self);
101 
103  itkTypeMacro(ReconstructionImageFilter,
105 
111  void SetMarkerImage(const MarkerImageType *);
112 
114 
118  void SetMaskImage(const MaskImageType *);
119 
120  const MaskImageType * GetMaskImage();
121 
128  itkSetMacro(FullyConnected, bool);
129  itkGetConstReferenceMacro(FullyConnected, bool);
130  itkBooleanMacro(FullyConnected);
132 
138  itkSetMacro(UseInternalCopy, bool);
139  itkGetConstReferenceMacro(UseInternalCopy, bool);
140  itkBooleanMacro(UseInternalCopy);
142 
143 protected:
146  void PrintSelf(std::ostream & os, Indent indent) const;
147 
152 
154  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
155 
156  void GenerateData();
157 
161  typename TInputImage::PixelType m_MarkerValue;
162 
163 private:
164  ReconstructionImageFilter(const Self &); //purposely not implemented
165  void operator=(const Self &); //purposely not implemented
166 
169 
171 
173  typedef typename FaceCalculatorType::FaceListType::iterator FaceListTypeIt;
174 
177 
178  typedef typename OutputImageType::IndexType OutIndexType;
179  typedef typename InputImageType::IndexType InIndexType;
182 }; // end of class
183 } // end namespace itk
184 
185 #ifndef ITK_MANUAL_INSTANTIATION
186 #include "itkReconstructionImageFilter.hxx"
187 #endif
188 
189 #endif
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
ImageRegionIterator< OutputImageType > OutputIteratorType
Performs a grayscale geodesic reconstruction – for performance comparison with GrayscaleGeodesicDilat...
static const unsigned int MarkerImageDimension
void SetMaskImage(const MaskImageType *)
OutputImageType::IndexType OutputImageIndexType
OutputImageType::RegionType OutputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const
ConstShapedNeighborhoodIterator< InputImageType > CNInputIterator
static const unsigned int MaskImageDimension
MaskImageType::ConstPointer MaskImageConstPointer
Base class for all process objects that output image data.
static const unsigned int OutputImageDimension
A neighborhood iterator which can take on an arbitrary shape.
InputImageType::IndexType InputImageIndexType
OutputImageType::PixelType OutputImagePixelType
Splits an image into a main region and several &quot;face&quot; regions which are used to handle computations o...
itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< OutputImageType > FaceCalculatorType
void operator=(const Self &)
MaskImageType::RegionType MaskImageRegionType
A multi-dimensional iterator templated over image type that walks a region of pixels.
MarkerImageType::PixelType MarkerImagePixelType
const MarkerImageType * GetMarkerImage()
MarkerImageType::ConstPointer MarkerImageConstPointer
OutputImageType::ConstPointer OutputImageConstPointer
void EnlargeOutputRequestedRegion(DataObject *)
const MaskImageType * GetMaskImage()
ImageToImageFilter< TInputImage, TOutputImage > Superclass
MarkerImageType::RegionType MarkerImageRegionType
FaceCalculatorType::FaceListType FaceListType
Base class for filters that take an image as input and produce an image as output.
ShapedNeighborhoodIterator< OutputImageType > NOutputIterator
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageRegionConstIterator< InputImageType > InputIteratorType
FaceCalculatorType::FaceListType::iterator FaceListTypeIt
InputImageType::PixelType InputImagePixelType
Base class for all data objects in ITK.
A multi-dimensional iterator templated over image type that walks a region of pixels.
void SetMarkerImage(const MarkerImageType *)