ITK  4.2.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< class TInputImage, class TOutputImage, class TCompare >
55 class ITK_EXPORT ReconstructionImageFilter:
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 
113  const MarkerImageType * GetMarkerImage();
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);
141 protected:
144  void PrintSelf(std::ostream & os, Indent indent) const;
146 
150  void GenerateInputRequestedRegion();
151 
153  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
154 
155  void GenerateData();
156 
160  typename TInputImage::PixelType m_MarkerValue;
161 private:
162  ReconstructionImageFilter(const Self &); //purposely not implemented
163  void operator=(const Self &); //purposely not implemented
165 
168 
170 
172  typedef typename FaceCalculatorType::FaceListType::iterator FaceListTypeIt;
173 
176 
177  typedef typename OutputImageType::IndexType OutIndexType;
178  typedef typename InputImageType::IndexType InIndexType;
181 }; // end of class
182 } // end namespace itk
183 
184 #ifndef ITK_MANUAL_INSTANTIATION
185 #include "itkReconstructionImageFilter.hxx"
186 #endif
187 
188 #endif
189