Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDiffusionPropertyHelper.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 MITKDIFFUSIONPROPERTYHELPER_H
18 #define MITKDIFFUSIONPROPERTYHELPER_H
19 
21 
22 #include <mitkImage.h>
23 #include <mitkBValueMapProperty.h>
26 #include <mitkDataNode.h>
27 
28 namespace mitk
29 {
38  {
39  public:
40 
41  typedef short DiffusionPixelType;
42 
47  typedef itk::VectorImage< DiffusionPixelType, 3> ImageType;
48 
49  static const std::string GRADIENTCONTAINERPROPERTYNAME;
50  static const std::string ORIGINALGRADIENTCONTAINERPROPERTYNAME;
51  static const std::string MEASUREMENTFRAMEPROPERTYNAME;
52  static const std::string REFERENCEBVALUEPROPERTYNAME;
53  static const std::string BVALUEMAPPROPERTYNAME;
54  static const std::string MODALITY;
55 
57  DiffusionPropertyHelper( mitk::Image* inputImage );
59 
70  static bool IsDiffusionWeightedImage(const mitk::Image *);
71  static bool IsDiffusionWeightedImage(const mitk::DataNode* node);
72 
73  static ImageType::Pointer GetItkVectorImage(Image *image);
74 
76  static const BValueMapType & GetBValueMap(const mitk::Image *);
78  static float GetReferenceBValue(const mitk::Image *);
85  static const MeasurementFrameType & GetMeasurementFrame(const mitk::Image *);
87  static GradientDirectionsContainerType::Pointer GetOriginalGradientContainer(const mitk::Image *);
89  static GradientDirectionsContainerType::Pointer GetGradientContainer(const mitk::Image *);
90 
91  const BValueMapType & GetBValueMap() const;
92  float GetReferenceBValue() const;
93  const MeasurementFrameType & GetMeasurementFrame() const;
94  GradientDirectionsContainerType::Pointer GetOriginalGradientContainer() const;
95  GradientDirectionsContainerType::Pointer GetGradientContainer() const;
96 
97  bool IsDiffusionWeightedImage() const;
98 
99  void AverageRedundantGradients(double precision);
100 
105  void InitializeImage();
106 
107  GradientDirectionsContainerType::Pointer CalcAveragedDirectionSet(double precision, GradientDirectionsContainerType::Pointer directions);
108 
109  protected:
110 
112 
118  void ApplyMeasurementFrame();
119 
126  void UpdateBValueMap();
127 
129  bool AreAlike(GradientDirectionType g1, GradientDirectionType g2, double precision);
130 
132  float GetB_Value(unsigned int i);
133 
135 
136  };
137 }
138 #endif
static const std::string REFERENCEBVALUEPROPERTYNAME
itk::SmartPointer< Self > Pointer
std::map< unsigned int, std::vector< unsigned int > > BValueMap
The BValueMap contains seperated IndicesVectors for each b value (index for GradientDirectionContaine...
vnl_matrix_fixed< double, 3, 3 > MeasurementFrameType
Helper class for mitk::Images containing diffusion weighted data.
DataCollection - Class to facilitate loading/accessing structured data.
mitk::BValueMapProperty::BValueMap BValueMapType
#define MITKDIFFUSIONCORE_EXPORT
static const std::string MEASUREMENTFRAMEPROPERTYNAME
GradientDirectionsProperty::GradientDirectionsContainerType GradientDirectionsContainerType
Image class for storing images.
Definition: mitkImage.h:76
itk::VectorContainer< IndexType, GradientDirectionType > GradientDirectionsContainerType
GradientDirectionsProperty::GradientDirectionType GradientDirectionType
mitk::MeasurementFrameProperty::MeasurementFrameType MeasurementFrameType
static const std::string GRADIENTCONTAINERPROPERTYNAME
static const std::string BVALUEMAPPROPERTYNAME
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66
itk::VectorImage< DiffusionPixelType, 3 > ImageType
static const std::string ORIGINALGRADIENTCONTAINERPROPERTYNAME