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
itkEvaluateDirectionImagesFilter.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 __itkEvaluateDirectionImagesFilter_h_
23 #define __itkEvaluateDirectionImagesFilter_h_
24 
25 #include <itkProcessObject.h>
26 #include <itkVectorContainer.h>
27 #include <itkImageSource.h>
28 
29 namespace itk{
33 template< class PixelType >
34 class EvaluateDirectionImagesFilter : public ImageSource< Image< PixelType, 3 > >
35 {
36 
37 public:
38 
42  typedef ImageSource< Image< PixelType, 3 > > Superclass;
43  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
44  typedef typename Superclass::OutputImageType OutputImageType;
45 
47  itkFactorylessNewMacro(Self)
48  itkCloneMacro(Self)
49 
51  itkTypeMacro(EvaluateDirectionImagesFilter, ImageToImageFilter)
52 
53  typedef Vector< float, 3 > DirectionType;
54  typedef Image< DirectionType, 3 > DirectionImageType;
55  typedef VectorContainer< unsigned int, DirectionImageType::Pointer > DirectionImageContainerType;
56  typedef Image< float, 3 > FloatImageType;
57  typedef Image< bool, 3 > BoolImageType;
58  typedef Image< unsigned char, 3 > UCharImageType;
59 
60  itkSetMacro( ImageSet , DirectionImageContainerType::Pointer)
61  itkSetMacro( ReferenceImageSet , DirectionImageContainerType::Pointer)
62  itkSetMacro( MaskImage , UCharImageType::Pointer)
63  itkSetMacro( IgnoreMissingDirections , bool)
64  itkSetMacro( IgnoreEmptyVoxels , bool)
65 
67  itkGetMacro( MeanAngularError, float)
68  itkGetMacro( MinAngularError, float)
69  itkGetMacro( MaxAngularError, float)
70  itkGetMacro( VarAngularError, float)
71  itkGetMacro( MedianAngularError, float)
72 
74  itkGetMacro( MeanLengthError, float)
75  itkGetMacro( MinLengthError, float)
76  itkGetMacro( MaxLengthError, float)
77  itkGetMacro( VarLengthError, float)
78  itkGetMacro( MedianLengthError, float)
79 
80 protected:
81  EvaluateDirectionImagesFilter();
82  ~EvaluateDirectionImagesFilter() {}
83 
84  void GenerateData();
85 
96  std::vector< double > m_AngularErrorVector;
102  std::vector< double > m_LengthErrorVector;
103 
104  double m_Eps;
105 };
106 
107 }
108 
109 #ifndef ITK_MANUAL_INSTANTIATION
111 #endif
112 
113 #endif //__itkEvaluateDirectionImagesFilter_h_
114 
itk::SmartPointer< Self > Pointer
ImageSource< Image< PixelType, 3 > > Superclass
DirectionImageContainerType::Pointer m_ImageSet
class ITK_EXPORT Image
Evaluates the voxel-wise angular error between two sets of directions.
Superclass::OutputImageRegionType OutputImageRegionType
DirectionImageContainerType::Pointer m_ReferenceImageSet
VectorContainer< unsigned int, DirectionImageType::Pointer > DirectionImageContainerType