|
Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
00001 // Copied from dtiprocess 00002 // available there: http://www.nitrc.org/projects/dtiprocess/ 00003 /*========================================================================= 00004 00005 Program: Insight Segmentation & Registration Toolkit 00006 Module: $RCSfile: itkHFieldToDeformationFieldImageFilter.h,v $ 00007 Language: C++ 00008 Date: $Date: 2010/03/09 18:01:02 $ 00009 Version: $Revision: 1.2 $ 00010 00011 Copyright (c) Insight Software Consortium. All rights reserved. 00012 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00013 00014 This software is distributed WITHOUT ANY WARRANTY; without even 00015 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00016 PURPOSE. See the above copyright notices for more information. 00017 00018 =========================================================================*/ 00019 #ifndef __itkHFieldToDeformationFieldImageFilter_h 00020 #define __itkHFieldToDeformationFieldImageFilter_h 00021 00022 #include <itkImageToImageFilter.h> 00023 00024 namespace itk 00025 { 00026 00027 // This functor class invokes the computation of fractional anisotropy from 00028 // every pixel. 00029 00045 template <typename TInputImage, 00046 typename TOutputImage = TInputImage> 00047 class ITK_EXPORT HFieldToDeformationFieldImageFilter : 00048 public 00049 ImageToImageFilter<TInputImage, TOutputImage> 00050 { 00051 public: 00053 typedef HFieldToDeformationFieldImageFilter Self; 00054 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass; 00055 00056 typedef SmartPointer<Self> Pointer; 00057 typedef SmartPointer<const Self> ConstPointer; 00058 00059 typedef typename Superclass::OutputImageType OutputImageType; 00060 typedef typename TOutputImage::PixelType OutputPixelType; 00061 typedef typename Superclass::InputImageType InputImageType; 00062 typedef typename TInputImage::PixelType InputPixelType; 00063 typedef typename InputPixelType::ValueType InputValueType; 00064 00065 typedef typename TInputImage::SpacingType SpacingType; 00066 00068 itkNewMacro(Self); 00069 00071 void PrintSelf(std::ostream& os, Indent indent) const 00072 { 00073 this->Superclass::PrintSelf( os, indent ); 00074 } 00075 00076 // need to override GenerateData (This should be threaded) 00077 void GenerateData(); 00078 00079 OutputPixelType ComputeDisplacement(typename InputImageType::ConstPointer input, 00080 typename InputImageType::IndexType ind, 00081 typename InputImageType::PixelType hvec); 00082 protected: 00083 HFieldToDeformationFieldImageFilter() 00084 { 00085 }; 00086 virtual ~HFieldToDeformationFieldImageFilter() 00087 { 00088 }; 00089 private: 00090 HFieldToDeformationFieldImageFilter(const Self &); // purposely not implemented 00091 void operator=(const Self &); // purposely not implemented 00092 00093 }; 00094 00095 } // end namespace itk 00096 00097 #ifndef ITK_MANUAL_INSTANTIATION 00098 #include "itkHFieldToDeformationFieldImageFilter.txx" 00099 #endif 00100 00101 #endif
1.7.4