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

itkWarpJacobianDeterminantFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkWarpJacobianDeterminantFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-07-12 17:48:04 $
00007   Version:   $Revision: 1.2 $
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 #error "This filter is being replaced by itkDisplacementFieldJacobianDeterminantFilter, and is slated to be removed from CVS."
00018 
00019 #ifndef __itkWarpJacobianDeterminantFilter_h
00020 #define __itkWarpJacobianDeterminantFilter_h
00021 
00022 #include "itkConstNeighborhoodIterator.h"
00023 #include "itkNeighborhoodIterator.h"
00024 #include "itkImageToImageFilter.h"
00025 #include "itkImage.h"
00026 #include "itkVector.h"
00027 
00028 namespace itk
00029 {
00094 template < typename TInputImage,
00095            typename TOutputImage = Image <
00096               float,::itk::GetImageDimension<TInputImage>::ImageDimension >
00097 >
00098 class ITK_EXPORT WarpJacobianDeterminantFilter :
00099     public ImageToImageFilter< TInputImage, TOutputImage >
00100 {
00101 public:
00103   typedef WarpJacobianDeterminantFilter                     Self;
00104   typedef ImageToImageFilter< TInputImage, TOutputImage >   Superclass;
00105   typedef SmartPointer<Self>                                Pointer;
00106   typedef SmartPointer<const Self>                          ConstPointer;
00107 
00109   itkNewMacro(Self);
00110 
00112   itkTypeMacro(WarpJacobianDeterminantFilter, ImageToImageFilter);
00113 
00116   typedef typename TOutputImage::PixelType                  OutputPixelType;
00117   typedef typename TInputImage::PixelType                   InputPixelType;
00118 
00120   typedef TInputImage                                       InputImageType;
00121   typedef TOutputImage                                      OutputImageType;
00122   typedef typename InputImageType::Pointer                  InputImagePointer;
00123   typedef typename OutputImageType::Pointer                 OutputImagePointer;
00124 
00126   itkStaticConstMacro(ImageDimension, unsigned int,
00127                       TOutputImage::ImageDimension);
00128 
00130   itkStaticConstMacro(VectorDimension, unsigned int,
00131                       InputPixelType::Dimension);
00132 
00136   void SetUseImageSpacingOn()
00137     {
00138     this->SetUseImageSpacing(true);
00139     }
00140 
00144   void SetUseImageSpacingOff()
00145     {
00146     this->SetUseImageSpacing(false);
00147     }
00148 
00151   void SetUseImageSpacing(bool);
00152   itkGetMacro(UseImageSpacing, bool);
00154 
00157   void SetDerivativeWeights( double data[] );
00158   itkGetVectorMacro(DerivativeWeights, const double, itk::GetImageDimension<TInputImage>::ImageDimension);
00160 
00161 protected:
00162   WarpJacobianDeterminantFilter();
00163   virtual ~WarpJacobianDeterminantFilter() {}
00164 
00167   typedef ConstNeighborhoodIterator<InputImageType> ConstNeighborhoodIteratorType;
00168   typedef typename ConstNeighborhoodIteratorType::RadiusType RadiusType;
00169 
00171   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00172 
00181   virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError);
00182 
00183 
00187   void BeforeThreadedGenerateData ();
00188 
00201   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00202                             int threadId );
00203 
00204   void PrintSelf(std::ostream& os, Indent indent) const;
00205 
00207   itkGetConstReferenceMacro( NeighborhoodRadius, RadiusType );
00208   itkSetMacro( NeighborhoodRadius, RadiusType );
00210 
00211   OutputPixelType EvaluateAtNeighborhood
00212      (ConstNeighborhoodIteratorType &it) const;
00213 
00215   double m_DerivativeWeights[itk::GetImageDimension<TInputImage>::ImageDimension];
00216 
00217 private:
00218   WarpJacobianDeterminantFilter(const Self&); //purposely not implemented
00219   void operator=(const Self&); //purposely not implemented
00220 
00221   RadiusType      m_NeighborhoodRadius;
00222   bool            m_UseImageSpacing;
00223   int             m_RequestedNumberOfThreads;
00224 
00225 };
00226 
00227 } // end namespace itk
00228 
00229 #ifndef ITK_MANUAL_INSTANTIATION
00230 #include "itkWarpJacobianDeterminantFilter.txx"
00231 #endif
00232 
00233 #endif
00234 

Generated at Tue Jul 29 23:53:54 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000