diff --git a/Modules/DiffusionImaging/Algorithms/itkResidualImageFilter.h b/Modules/DiffusionImaging/Algorithms/itkResidualImageFilter.h new file mode 100644 index 0000000000..18d419f5bf --- /dev/null +++ b/Modules/DiffusionImaging/Algorithms/itkResidualImageFilter.h @@ -0,0 +1,94 @@ +/*========================================================================= + +Program: Tensor ToolKit - TTK +Module: $URL: svn://scm.gforge.inria.fr/svn/ttk/trunk/Algorithms/itkTensorImageToDiffusionImageFilter.h $ +Language: C++ +Date: $Date: 2010-06-07 13:39:13 +0200 (Mo, 07 Jun 2010) $ +Version: $Revision: 68 $ + +Copyright (c) INRIA 2010. All rights reserved. +See LICENSE.txt for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _itk_ResidualImageFilter_h_ +#define _itk_ResidualImageFilter_h_ + +#include "itkImageToImageFilter.h" +#include + +namespace itk +{ + + template + class ResidualImageFilter + : public ImageToImageFilter, itk::Image > + { + + public: + + typedef TInputScalarType InputScalarType; + typedef itk::VectorImage InputImageType; + typedef typename InputImageType::PixelType InputPixelType; + typedef typename InputImageType::RegionType InputImageRegionType; + + typedef TOutputScalarType OutputScalarType; + typedef itk::Image OutputImageType; + typedef typename OutputImageType::PixelType OutputPixelType; + typedef typename OutputImageType::RegionType OutputImageRegionType; + + typedef ResidualImageFilter Self; + typedef ImageToImageFilter Superclass; + + typedef SmartPointer Pointer; + typedef SmartPointer ConstPointer; + + itkTypeMacro (ResidualImageFilter, ImageToImageFilter); + + itkStaticConstMacro (ImageDimension, unsigned int, + OutputImageType::ImageDimension); + + itkNewMacro (Self); + + + protected: + ResidualImageFilter() + { + + }; + ~TensorImageToDiffusionImageFilter(){}; + + void PrintSelf (std::ostream& os, Indent indent) const + { + Superclass::PrintSelf (os, indent); + } + + void BeforeThreadedGenerateData( void ); + + void ThreadedGenerateData( const + OutputImageRegionType &outputRegionForThread, int); + + //void GenerateData(); + + private: + + ResidualImageFilter (const Self&); + void operator=(const Self&); + + + + }; + + +} // end of namespace + + +#ifndef ITK_MANUAL_INSTANTIATION +#include "itkResidualImageFilter.txx" +#endif + + +#endif diff --git a/Modules/DiffusionImaging/Algorithms/itkResidualImageFilter.txx b/Modules/DiffusionImaging/Algorithms/itkResidualImageFilter.txx new file mode 100644 index 0000000000..c9f67da0c1 --- /dev/null +++ b/Modules/DiffusionImaging/Algorithms/itkResidualImageFilter.txx @@ -0,0 +1,78 @@ +/*========================================================================= + +Program: Tensor ToolKit - TTK +Module: $URL: svn://scm.gforge.inria.fr/svn/ttk/trunk/Algorithms/itkTensorImageToDiffusionImageFilter.txx $ +Language: C++ +Date: $Date: 2010-06-07 13:39:13 +0200 (Mo, 07 Jun 2010) $ +Version: $Revision: 68 $ + +Copyright (c) INRIA 2010. All rights reserved. +See LICENSE.txt for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _itk_ResidualImageFilter_txx_ +#define _itk_ResidualImageFilter_txx_ +#endif + +#include "itkResidualImageFilter.h" + + +namespace itk +{ + + //template + //void + // TensorImageToDiffusionImageFilter + // ::GenerateData() + //{ + // // Call a method that can be overriden by a subclass to allocate + // // memory for the filter's outputs + // this->AllocateOutputs(); + + // // Call a method that can be overridden by a subclass to perform + // // some calculations prior to splitting the main computations into + // // separate threads + // this->BeforeThreadedGenerateData(); + + // // Set up the multithreaded processing + // ThreadStruct str; + // str.Filter = this; + + // this->GetMultiThreader()->SetNumberOfThreads(this->GetNumberOfThreads()); + // this->GetMultiThreader()->SetSingleMethod(this->ThreaderCallback, &str); + + // // multithread the execution + // this->GetMultiThreader()->SingleMethodExecute(); + + // // Call a method that can be overridden by a subclass to perform + // // some calculations after all the threads have completed + // this->AfterThreadedGenerateData(); + + //} + + template + void + TensorImageToDiffusionImageFilter + ::BeforeThreadedGenerateData() + { + + + + } + + template + void + TensorImageToDiffusionImageFilter + ::ThreadedGenerateData ( const OutputImageRegionType &outputRegionForThread, int threadId ) + { + + + } + + + +} // end of namespace