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

itkGradientImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkGradientImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:47 $ 00007 Version: $Revision: 1.14 $ 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 __itkGradientImageFilter_h 00018 #define __itkGradientImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkImage.h" 00022 #include "itkCovariantVector.h" 00023 00024 namespace itk 00025 { 00047 template <class TInputImage, class TOperatorValueType=float, class TOutputValueType=float> 00048 class ITK_EXPORT GradientImageFilter : 00049 public ImageToImageFilter< TInputImage, 00050 Image<CovariantVector<TOutputValueType, ::itk::GetImageDimension<TInputImage>::ImageDimension>, ::itk::GetImageDimension<TInputImage>::ImageDimension> > 00051 { 00052 public: 00054 itkStaticConstMacro(InputImageDimension, unsigned int, 00055 TInputImage::ImageDimension); 00056 itkStaticConstMacro(OutputImageDimension, unsigned int, 00057 TInputImage::ImageDimension); 00058 00060 typedef GradientImageFilter Self; 00061 00063 typedef TInputImage InputImageType; 00064 typedef typename InputImageType::Pointer InputImagePointer; 00065 typedef Image<CovariantVector<TOutputValueType, itkGetStaticConstMacro(OutputImageDimension)>, itkGetStaticConstMacro(OutputImageDimension)> OutputImageType; 00066 typedef typename OutputImageType::Pointer OutputImagePointer; 00067 00069 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass; 00070 typedef SmartPointer<Self> Pointer; 00071 typedef SmartPointer<const Self> ConstPointer; 00072 00074 itkNewMacro(Self); 00075 00077 itkTypeMacro(GradientImageFilter, ImageToImageFilter); 00078 00080 typedef typename InputImageType::PixelType InputPixelType; 00081 typedef TOperatorValueType OperatorValueType; 00082 typedef TOutputValueType OutputValueType; 00083 typedef CovariantVector<OutputValueType, itkGetStaticConstMacro(OutputImageDimension)> OutputPixelType; 00084 typedef typename OutputImageType::RegionType OutputImageRegionType; 00085 00092 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError); 00093 00096 void SetUseImageSpacingOn() 00097 { this->SetUseImageSpacing(true); } 00098 00101 void SetUseImageSpacingOff() 00102 { this->SetUseImageSpacing(false); } 00103 00106 itkSetMacro(UseImageSpacing, bool); 00107 itkGetMacro(UseImageSpacing, bool); 00108 00109 protected: 00110 GradientImageFilter() 00111 { 00112 m_UseImageSpacing = true; 00113 } 00114 virtual ~GradientImageFilter() {} 00115 void PrintSelf(std::ostream& os, Indent indent) const; 00116 00127 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, 00128 int threadId ); 00129 00130 private: 00131 GradientImageFilter(const Self&); //purposely not implemented 00132 void operator=(const Self&); //purposely not implemented 00133 00134 bool m_UseImageSpacing; 00135 }; 00136 00137 } // end namespace itk 00138 00139 #ifndef ITK_MANUAL_INSTANTIATION 00140 #include "itkGradientImageFilter.txx" 00141 #endif 00142 00143 #endif

Generated at Sun Apr 1 02:29:55 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000