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

itkGradientMagnitudeImageFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkGradientMagnitudeImageFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:48 $ 00007 Version: $Revision: 1.27 $ 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 __itkGradientMagnitudeImageFilter_h 00018 #define __itkGradientMagnitudeImageFilter_h 00019 00020 #include "itkImageToImageFilter.h" 00021 #include "itkImage.h" 00022 00023 namespace itk 00024 { 00036 template <typename TInputImage, typename TOutputImage> 00037 class ITK_EXPORT GradientMagnitudeImageFilter : 00038 public ImageToImageFilter< TInputImage, TOutputImage > 00039 { 00040 public: 00042 typedef GradientMagnitudeImageFilter Self; 00043 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass; 00044 typedef SmartPointer<Self> Pointer; 00045 typedef SmartPointer<const Self> ConstPointer; 00046 00048 itkNewMacro(Self); 00049 00051 itkTypeMacro(GradientMagnitudeImageFilter, ImageToImageFilter); 00052 00055 typedef typename TOutputImage::PixelType OutputPixelType; 00056 typedef typename TInputImage::PixelType InputPixelType; 00057 typedef typename NumericTraits<InputPixelType>::RealType RealType; 00058 00061 itkStaticConstMacro(ImageDimension, unsigned int, 00062 TOutputImage::ImageDimension); 00063 00065 typedef TInputImage InputImageType; 00066 typedef TOutputImage OutputImageType; 00067 typedef typename InputImageType::Pointer InputImagePointer; 00068 typedef typename OutputImageType::Pointer OutputImagePointer; 00069 00071 typedef typename Superclass::OutputImageRegionType OutputImageRegionType; 00072 00081 virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError); 00082 00085 void SetUseImageSpacingOn() 00086 { this->SetUseImageSpacing(true); } 00087 00090 void SetUseImageSpacingOff() 00091 { this->SetUseImageSpacing(false); } 00092 00095 itkSetMacro(UseImageSpacing, bool); 00096 itkGetMacro(UseImageSpacing, bool); 00097 00098 protected: 00099 GradientMagnitudeImageFilter() 00100 { 00101 m_UseImageSpacing = true; 00102 } 00103 virtual ~GradientMagnitudeImageFilter() {} 00104 00116 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, 00117 int threadId ); 00118 00119 void PrintSelf(std::ostream&, Indent) const; 00120 00121 00122 private: 00123 GradientMagnitudeImageFilter(const Self&); //purposely not implemented 00124 void operator=(const Self&); //purposely not implemented 00125 00126 bool m_UseImageSpacing; 00127 00128 }; 00129 00130 } // end namespace itk 00131 00132 #ifndef ITK_MANUAL_INSTANTIATION 00133 #include "itkGradientMagnitudeImageFilter.txx" 00134 #endif 00135 00136 #endif

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