Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkReconstructionImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkReconstructionImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/01/26 10:40:53 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkReconstructionImageFilter_h
00018 #define __itkReconstructionImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkConstShapedNeighborhoodIterator.h"
00022 #include "itkShapedNeighborhoodIterator.h"
00023 #include "itkImageRegionConstIterator.h"
00024 #include "itkImageRegionIterator.h"
00025 #include "itkProgressReporter.h"
00026 #include <queue>
00027 
00028 //#define BASIC
00029 #define COPY
00030 
00031 
00032 #ifdef COPY
00033 #include "itkNeighborhoodAlgorithm.h"
00034 #endif
00035 
00036 namespace itk {
00037 
00055 template<class TInputImage, class TOutputImage, class TCompare>
00056 class ITK_EXPORT ReconstructionImageFilter : 
00057     public ImageToImageFilter<TInputImage, TOutputImage>
00058 {
00059 public:
00061   typedef ReconstructionImageFilter Self;
00062   typedef ImageToImageFilter<TInputImage, TOutputImage>
00063   Superclass;
00064   typedef SmartPointer<Self>        Pointer;
00065   typedef SmartPointer<const Self>  ConstPointer;
00066 
00068   typedef TInputImage InputImageType;
00069   typedef TInputImage MarkerImageType;
00070   typedef TInputImage MaskImageType;
00071   typedef TOutputImage OutputImageType;
00072   typedef typename InputImageType::SizeType        ISizeType;
00073   typedef typename MarkerImageType::Pointer        MarkerImagePointer;
00074   typedef typename MarkerImageType::ConstPointer   MarkerImageConstPointer;
00075   typedef typename MarkerImageType::RegionType     MarkerImageRegionType;
00076   typedef typename MarkerImageType::PixelType      MarkerImagePixelType;
00077   typedef typename InputImageType::PixelType       InputImagePixelType;
00078   typedef typename InputImageType::IndexType       InputImageIndexType;
00079   typedef typename MaskImageType::Pointer          MaskImagePointer;
00080   typedef typename MaskImageType::ConstPointer     MaskImageConstPointer;
00081   typedef typename MaskImageType::RegionType       MaskImageRegionType;
00082   typedef typename MaskImageType::PixelType        MaskImagePixelType;
00083   typedef typename OutputImageType::Pointer        OutputImagePointer;
00084   typedef typename OutputImageType::ConstPointer   OutputImageConstPointer;
00085   typedef typename OutputImageType::RegionType     OutputImageRegionType;
00086   typedef typename OutputImageType::PixelType      OutputImagePixelType;
00087   typedef typename OutputImageType::IndexType      OutputImageIndexType;
00088 
00092   itkStaticConstMacro(MarkerImageDimension, unsigned int,
00093                       TInputImage::ImageDimension);
00094   itkStaticConstMacro(MaskImageDimension, unsigned int,
00095                       TInputImage::ImageDimension);
00096   itkStaticConstMacro(OutputImageDimension, unsigned int,
00097                       TOutputImage::ImageDimension);
00099 
00101   itkNewMacro(Self);  
00102 
00104   itkTypeMacro(ReconstructionImageFilter, 
00105                ImageToImageFilter);
00106 
00112   void SetMarkerImage(const MarkerImageType *);
00113   const MarkerImageType* GetMarkerImage();
00115 
00119   void SetMaskImage(const MaskImageType *);
00120   const MaskImageType* GetMaskImage();
00122 
00123 
00130   itkSetMacro(FullyConnected, bool);
00131   itkGetConstReferenceMacro(FullyConnected, bool);
00132   itkBooleanMacro(FullyConnected);
00134 
00140   itkSetMacro(UseInternalCopy, bool);
00141   itkGetConstReferenceMacro(UseInternalCopy, bool);
00142   itkBooleanMacro(UseInternalCopy);
00144 
00145 protected:
00146   ReconstructionImageFilter();
00147   ~ReconstructionImageFilter() {};
00148   void PrintSelf(std::ostream& os, Indent indent) const;
00149 
00153   void GenerateInputRequestedRegion() ;
00154 
00156   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00157 
00158   void GenerateData();
00159   
00163   typename TInputImage::PixelType m_MarkerValue;
00164 
00165 
00166 private:
00167   ReconstructionImageFilter(const Self&); //purposely not implemented
00168   void operator=(const Self&); //purposely not implemented
00169   bool                m_FullyConnected;
00170   bool                m_UseInternalCopy;
00171 
00172   typedef typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<OutputImageType> FaceCalculatorType;
00173 
00174   typedef typename FaceCalculatorType::FaceListType FaceListType;
00175   typedef typename FaceCalculatorType::FaceListType::iterator FaceListTypeIt;
00176 
00177   typedef ImageRegionConstIterator<InputImageType> InputIteratorType;
00178   typedef ImageRegionIterator<OutputImageType> OutputIteratorType;
00179 
00180   typedef typename OutputImageType::IndexType OutIndexType;
00181   typedef typename InputImageType::IndexType InIndexType;
00182   typedef ConstShapedNeighborhoodIterator<InputImageType> CNInputIterator;
00183   typedef ShapedNeighborhoodIterator<OutputImageType> NOutputIterator;
00184 
00185 } ; // end of class
00186 
00187 } // end namespace itk
00188   
00189 #ifndef ITK_MANUAL_INSTANTIATION
00190 #include "itkReconstructionImageFilter.txx"
00191 #endif
00192 
00193 
00194 #endif
00195 

Generated at Sun Sep 23 14:03:30 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000