00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkTobogganImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2002/10/10 17:19:46 $ 00007 Version: $Revision: 1.4 $ 00008 00009 Copyright (c) 2002 Insight 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 __itkTobogganImageFilter_h 00018 #define __itkTobogganImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkConstNeighborhoodIterator.h" 00022 #include "itkConstSmartNeighborhoodIterator.h" 00023 00024 namespace itk { 00025 00037 template<class TInputImage> 00038 class ITK_EXPORT TobogganImageFilter : 00039 public ImageToImageFilter< 00040 TInputImage, 00041 Image<unsigned long, ::itk::GetImageDimension<TInputImage>::ImageDimension> > 00042 { 00043 public: 00045 typedef TobogganImageFilter Self; 00046 00048 typedef TInputImage InputImageType; 00049 00051 itkStaticConstMacro(NDimensions, unsigned int, TInputImage::ImageDimension); 00052 00054 typedef Image<unsigned long, itkGetStaticConstMacro(NDimensions)> OutputImageType; 00055 00057 typedef typename OutputImageType::PixelType OutputImagePixelType; 00058 00060 typedef typename InputImageType::PixelType InputImagePixelType; 00061 00063 enum {ImageDimension = InputImageType::ImageDimension }; 00064 00066 typedef typename InputImageType::RegionType RegionType; 00067 typedef typename InputImageType::SizeType SizeType; 00068 typedef typename InputImageType::IndexType IndexType; 00069 typedef typename InputImageType::Pointer InputImagePointer; 00070 typedef typename OutputImageType::Pointer OutputImagePointer; 00071 00073 typedef ImageToImageFilter< InputImageType, OutputImageType > Superclass; 00074 00076 typedef typename InputImageType::PixelType ScalarType; 00077 00079 typedef SmartPointer<Self> Pointer; 00080 00082 itkTypeMacro(TobogganImageFilter, ImageToImageFilter); 00083 00085 itkNewMacro(Self); 00086 00088 void GenerateData(); 00089 void GenerateInputRequestedRegion(); 00090 void EnlargeOutputRequestedRegion ( DataObject* ); 00092 typedef ConstNeighborhoodIterator<TInputImage> 00093 NeighborhoodIteratorType ; 00094 typedef ConstSmartNeighborhoodIterator<TInputImage> 00095 SmartNeighborhoodIteratorType ; 00096 00097 protected: 00098 TobogganImageFilter(); 00099 ~TobogganImageFilter() {}; 00100 void PrintSelf(std::ostream& os, Indent indent) const; 00101 00102 private: 00103 TobogganImageFilter(const Self&); //purposely not implemented 00104 void operator=(const Self&); //purposely not implemented 00105 00106 } ; // end of class 00107 00108 } // end namespace itk 00109 00110 #ifndef ITK_MANUAL_INSTANTIATION 00111 #include "itkTobogganImageFilter.txx" 00112 #endif 00113 00114 #endif 00115 00116