Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkEvaluateTractogramDirectionsFilter.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 
19 This file is based heavily on a corresponding ITK filter.
20 
21 ===================================================================*/
22 #ifndef __itkEvaluateTractogramDirectionsFilter_h_
23 #define __itkEvaluateTractogramDirectionsFilter_h_
24 
25 #include <itkProcessObject.h>
26 #include <itkVectorContainer.h>
27 #include <mitkFiberBundle.h>
28 #include <itkImageSource.h>
29 
30 namespace itk{
34 template< class PixelType >
35 class EvaluateTractogramDirectionsFilter : public ImageSource< Image< PixelType, 3 > >
36 {
37 
38 public:
39 
43  typedef ImageSource< Image< PixelType, 3 > > Superclass;
44  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
45  typedef typename Superclass::OutputImageType OutputImageType;
46 
48  itkFactorylessNewMacro(Self)
49  itkCloneMacro(Self)
50 
52  itkTypeMacro(EvaluateTractogramDirectionsFilter, ImageToImageFilter)
53 
54  typedef mitk::FiberBundle FiberBundleType;
55  typedef Vector< float, 3 > DirectionType;
56  typedef Image< DirectionType, 3 > DirectionImageType;
57  typedef VectorContainer< int, DirectionImageType::Pointer > DirectionImageContainerType;
58  typedef Image< float, 3 > FloatImageType;
59  typedef Image< bool, 3 > BoolImageType;
60  typedef Image< unsigned char, 3 > UCharImageType;
61  typedef Image< double, 3 > DoubleImageType;
62 
63  itkSetMacro( Tractogram, FiberBundleType::Pointer)
64  itkSetMacro( ReferenceImageSet , DirectionImageContainerType::Pointer)
65  itkSetMacro( MaskImage , UCharImageType::Pointer)
66  itkSetMacro( IgnoreMissingDirections , bool)
67  itkSetMacro( UseInterpolation , bool)
68 
70  itkGetMacro( MeanAngularError, float)
71  itkGetMacro( MinAngularError, float)
72  itkGetMacro( MaxAngularError, float)
73  itkGetMacro( VarAngularError, float)
74  itkGetMacro( MedianAngularError, float)
75 
76 protected:
77  EvaluateTractogramDirectionsFilter();
78  ~EvaluateTractogramDirectionsFilter() {}
79 
80  void GenerateData();
81 
82  itk::Point<PixelType, 3> GetItkPoint(double point[3]);
83  itk::Vector<PixelType, 3> GetItkVector(double point[3]);
84  vnl_vector_fixed<PixelType, 3> GetVnlVector(double point[3]);
85  vnl_vector_fixed<PixelType, 3> GetVnlVector(Vector< PixelType, 3 >& vector);
86 
95  std::vector< double > m_AngularErrorVector;
96  double m_Eps;
99 };
100 
101 }
102 
103 #ifndef ITK_MANUAL_INSTANTIATION
105 #endif
106 
107 #endif //__itkEvaluateTractogramDirectionsFilter_h_
108 
itk::SmartPointer< Self > Pointer
itk::Vector< PixelType, 3 > GetItkVector(double point[3])
DataCollection - Class to facilitate loading/accessing structured data.
VectorContainer< int, DirectionImageType::Pointer > DirectionImageContainerType
vnl_vector_fixed< PixelType, 3 > GetVnlVector(double point[3])
class ITK_EXPORT Image
Base Class for Fiber Bundles;.
itk::Point< PixelType, 3 > GetItkPoint(double point[3])
DirectionImageContainerType::Pointer m_ReferenceImageSet
Calculates the voxel-wise angular error of the input tractogram to a set of voxel-wise directions...