Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkElectrostaticRepulsionDiffusionGradientReductionFilter.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 
18 Program: Tensor ToolKit - TTK
19 Module: $URL: svn://scm.gforge.inria.fr/svn/ttk/trunk/Algorithms/itkElectrostaticRepulsionDiffusionGradientReductionFilter.h $
20 Language: C++
21 Date: $Date: 2010-06-07 13:39:13 +0200 (Mo, 07 Jun 2010) $
22 Version: $Revision: 68 $
23 
24 Copyright (c) INRIA 2010. All rights reserved.
25 See LICENSE.txt for details.
26 
27 This software is distributed WITHOUT ANY WARRANTY; without even
28 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29 PURPOSE. See the above copyright notices for more information.
30 
31 =========================================================================*/
32 #ifndef _itk_ElectrostaticRepulsionDiffusionGradientReductionFilter_h_
33 #define _itk_ElectrostaticRepulsionDiffusionGradientReductionFilter_h_
34 
35 #include <itkImageToImageFilter.h>
36 #include <itkVectorImage.h>
37 #include <itkPointShell.h>
38 
39 namespace itk
40 {
41 
45  template <class TInputScalarType, class TOutputScalarType>
47  : public ImageToImageFilter<itk::VectorImage<TInputScalarType,3>, itk::VectorImage<TOutputScalarType,3> >
48  {
49 
50  public:
51 
55  typedef ImageToImageFilter< itk::VectorImage<TOutputScalarType,3>, itk::VectorImage<TOutputScalarType,3> >
57 
59  itkFactorylessNewMacro(Self)
60  itkCloneMacro(Self)
61 
63  itkTypeMacro(ElectrostaticRepulsionDiffusionGradientReductionFilter, ImageToImageFilter)
64 
65  typedef TInputScalarType InputScalarType;
66  typedef itk::VectorImage<InputScalarType,3> InputImageType;
67  typedef typename InputImageType::PixelType InputPixelType;
68 
69  typedef TOutputScalarType OutputScalarType;
70  typedef itk::VectorImage<OutputScalarType,3> OutputImageType;
71  typedef typename OutputImageType::PixelType OutputPixelType;
72 
73  typedef OutputScalarType BaselineScalarType;
74  typedef BaselineScalarType BaselinePixelType;
75  typedef typename itk::Image<BaselinePixelType,3> BaselineImageType;
76 
77  typedef vnl_vector_fixed< double, 3 > GradientDirectionType;
78  typedef itk::VectorContainer< unsigned int, GradientDirectionType > GradientDirectionContainerType;
79 
80  typedef std::vector<unsigned int> IndicesVector;
81  typedef std::map<unsigned int, IndicesVector> BValueMap;
82 
83  itkGetMacro(OriginalGradientDirections, GradientDirectionContainerType::Pointer)
84  itkSetMacro(OriginalGradientDirections, GradientDirectionContainerType::Pointer)
85 
86  itkGetMacro(GradientDirections, GradientDirectionContainerType::Pointer)
87  itkSetMacro(GradientDirections, GradientDirectionContainerType::Pointer)
88 
92  void SetNumGradientDirections(std::vector<unsigned int> numDirs){m_NumGradientDirections = numDirs;}
93 
94 
96 
97  protected:
100 
101  void GenerateData();
102  double Costs();
103 
106 
110 
113 
114  std::vector<unsigned int> m_NumGradientDirections;
115  };
116 
117 
118 } // end of namespace
119 
120 
121 #ifndef ITK_MANUAL_INSTANTIATION
123 #endif
124 
125 
126 #endif
itk::SmartPointer< Self > Pointer
STL namespace.
double Costs()
calculates electrostatic energy of current direction set
class ITK_EXPORT Image
itk::VectorContainer< unsigned int, GradientDirectionType > GradientDirectionContainerType
ImageToImageFilter< itk::VectorImage< TOutputScalarType, 3 >, itk::VectorImage< TOutputScalarType, 3 > > Superclass
GradientDirectionContainerType::Pointer m_OriginalGradientDirections
input gradient directions
Select subset of the input vectors equally distributed over the sphere using an iterative electrostat...
unsigned short PixelType
GradientDirectionContainerType::Pointer m_GradientDirections
container for the subsampled output gradient directions