Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
itkRadialMultishellToSingleshellImageFilter.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef _itk_RadialMultishellToSingleshellImageFilterr_h_
18 #define _itk_RadialMultishellToSingleshellImageFilterr_h_
19 
20 #include <itkImageToImageFilter.h>
21 #include <itkVectorImage.h>
22 #include "itkDWIVoxelFunctor.h"
23 
24 
25 namespace itk
26 {
27 
28  template <class TInputScalarType, class TOutputScalarType>
30  : public ImageToImageFilter<itk::VectorImage<TInputScalarType,3>, itk::VectorImage<TOutputScalarType,3> >
31  {
32 
33  public:
34 
38  typedef ImageToImageFilter< itk::VectorImage<TInputScalarType,3>, itk::VectorImage<TOutputScalarType,3> > Superclass;
39  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
40 
42  itkFactorylessNewMacro(Self)
43  itkCloneMacro(Self)
44 
46  itkTypeMacro(RadialMultishellToSingleshellImageFilter, ImageToImageFilter)
47 
48  typedef TInputScalarType InputScalarType;
49  typedef itk::VectorImage<InputScalarType,3> InputImageType;
50  typedef typename InputImageType::PixelType InputPixelType;
51 
52  typedef TOutputScalarType OutputScalarType;
53  typedef itk::VectorImage<OutputScalarType,3> OutputImageType;
54  typedef typename OutputImageType::PixelType OutputPixelType;
55 
56  typedef OutputScalarType BaselineScalarType;
57  typedef BaselineScalarType BaselinePixelType;
58  typedef typename itk::Image<BaselinePixelType,3> BaselineImageType;
59 
60  typedef float ErrorScalarType;
61  typedef ErrorScalarType ErrorPixelType;
62  typedef typename itk::Image<ErrorPixelType,3> ErrorImageType;
63 
64  typedef vnl_vector_fixed< double, 3 > GradientDirectionType;
65  typedef itk::VectorContainer< unsigned int, GradientDirectionType > GradientDirectionContainerType;
66 
67  typedef std::vector<unsigned int> IndicesVector;
68  typedef std::map<unsigned int, IndicesVector> BValueMap;
69 
70  void SetOriginalGradientDirections(GradientDirectionContainerType::Pointer ptr){m_OriginalGradientDirections = ptr;}
71  void SetOriginalBValue(const double & val){m_OriginalBValue = val;}
72  void SetOriginalBValueMap(const BValueMap & inp){m_BValueMap = inp;}
73  void SetFunctor(DWIVoxelFunctor * functor){m_Functor = functor;}
76 
77 
78  protected:
81 
83  void ThreadedGenerateData( const OutputImageRegionType &, ThreadIdType);
84 
87 
90 
91  std::vector<vnl_matrix< double > > m_ShellInterpolationMatrixVector;
92 
95 
97 
99 
100  };
101 
102 
103 } // end of namespace
104 
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
108 #endif
109 
110 
111 #endif
itk::SmartPointer< Self > Pointer
The DWIVoxelFunctor class Abstract basisclass for voxelprocessing of Diffusion Weighted Images...
STL namespace.
itk::VectorContainer< unsigned int, GradientDirectionType > GradientDirectionContainerType
class ITK_EXPORT Image
void SetOriginalGradientDirections(GradientDirectionContainerType::Pointer ptr)
GradientDirectionContainerType::Pointer m_TargetGradientDirections
container for the subsampled output gradient directions
void ThreadedGenerateData(const OutputImageRegionType &, ThreadIdType)
unsigned short PixelType
GradientDirectionContainerType::Pointer m_OriginalGradientDirections
input gradient directions
ImageToImageFilter< itk::VectorImage< TInputScalarType, 3 >, itk::VectorImage< TOutputScalarType, 3 > > Superclass