Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkDiffusionTensor3DInterpolateImageFunctionReimplementation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Diffusion Applications
4  Module: $HeadURL$
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
10 
11  See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
12 
13 ==========================================================================*/
14 #ifndef itkDiffusionTensor3DInterpolateImageFunctionReimplementation_h
15 #define itkDiffusionTensor3DInterpolateImageFunctionReimplementation_h
16 
18 #include <itkImage.h>
19 // #include <itkImageRegionIteratorWithIndex.h>
20 #include <itkInterpolateImageFunction.h>
22 // #include <itkMutexLock.h>
23 
24 namespace itk
25 {
26 
27 /*struct RegionType
28 {
29  ImageRegion< 3 > itkRegion ;
30  bool Done ;
31  Index< 3 > PositionInImage ;
32  bool Stop ;
33 };*/
34 
41 template <class TData, class TCoordRep = double>
43  public DiffusionTensor3DInterpolateImageFunction<TData, TCoordRep>
44 {
45 public:
46  typedef TData DataType;
52  typedef Image<DataType, 3> ImageType;
53  typedef typename ImageType::Pointer ImagePointer;
54  typedef typename Superclass::PointType PointType;
55  typedef SmartPointer<Self> Pointer;
56  typedef SmartPointer<const Self> ConstPointer;
57  typedef ImageRegionIteratorWithIndex<DiffusionImageType> IteratorDiffusionImageType;
58  typedef ImageRegionIteratorWithIndex<ImageType> IteratorImageType;
59  typedef InterpolateImageFunction<ImageType, double> InterpolateImageFunctionType;
60  typedef typename DiffusionImageType::RegionType itkRegionType;
61  typedef typename DiffusionImageType::SizeType SizeType;
63 
66 
69  // TensorDataType Evaluate( const PointType &point ) ;
70  TensorDataType EvaluateAtContinuousIndex( const ContinuousIndexType & index ) const ITK_OVERRIDE;
71 
72  virtual void SetInputImage( const DiffusionImageType *inputImage ) ITK_OVERRIDE;
73 
74  itkSetMacro( NumberOfThreads, int );
75 protected:
77  virtual void AllocateInterpolator() = 0;
78 
79 // void SeparateImages() ;
80 // void AllocateImages() ;
81 // bool DivideRegion( int currentThread ) ;
82 // int RegionToDivide() ;
83  typename InterpolateImageFunctionType::Pointer m_Interpol[6];
84  ImagePointer m_ImageVec[6];
86 // Semaphore::Pointer m_Threads ;
87 // int m_SplitAxis ;
88 // bool m_SeparationDone ;
89 // bool m_CannotSplit ;
90 // MutexLock::Pointer m_Lock ;
91 // MutexLock::Pointer m_LockNewThreadDetected ;
92 // std::vector< RegionType > m_ListRegions ;
93 // int m_NbThread ;
94 // MutexLock::Pointer m_CheckRegionsDone ;
95 // bool m_ExceptionThrown ;
96 // SizeType m_Size ;
97 // bool m_AllocateInterpolatorsDone ;
98 };
99 
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkDiffusionTensor3DInterpolateImageFunctionReimplementation.txx"
104 #endif
105 
106 #endif
Simplified inverse ITK transforms.
TensorDataType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const ITK_OVERRIDE
virtual void SetInputImage(const DiffusionImageType *inputImage) ITK_OVERRIDE
itkTypeMacro(DiffusionTensor3DInterpolateImageFunctionReimplementation, DiffusionTensor3DInterpolateImageFunction)