Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkBValueMapProperty.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 MITKBVALUEMAPPROPERTY_H
18 #define MITKBVALUEMAPPROPERTY_H
19 
20 #include "mitkBaseProperty.h"
21 #include <map>
22 #include <vector>
23 
25 #include <itkVectorContainer.h>
26 #include <vnl/vnl_vector_fixed.h>
27 namespace mitk
28 {
29 
33  {
34  public:
40  typedef std::map< unsigned int , std::vector< unsigned int > > BValueMap;
41  typedef unsigned int IndexType;
42  typedef vnl_vector_fixed< double, 3 > ValueType;
43  typedef ValueType GradientDirectionType;
44  typedef itk::VectorContainer< IndexType, GradientDirectionType > GradientDirectionsContainerType;
46 
47  itkFactorylessNewMacro(Self)
48  itkCloneMacro(Self)
49 
50  mitkNewMacro1Param(BValueMapProperty, const BValueMapProperty&)
51  mitkNewMacro1Param(BValueMapProperty, const BValueMap&)
52 
53  const BValueMap & GetBValueMap() const;
54  void SetBValueMap(const BValueMap & map);
55 
56  static BValueMap CreateBValueMap(const GradientDirectionsContainerType * gdc, float referenceBValue);
57  static float GetBValueOfGradientDirection(unsigned int i, float referenceBValue, const GradientDirectionsContainerType *gdc);
58  protected:
59 
60  BValueMapProperty();
61  ~BValueMapProperty();
62 
63  BValueMapProperty(const BValueMapProperty& other);
64  BValueMapProperty(const BValueMap& bValueMap);
65 
66  virtual bool IsEqual(const BaseProperty& property) const override;
67  virtual bool Assign(const BaseProperty & property) override;
68 
69  BValueMap m_BValueMap;
70 
71  virtual itk::LightObject::Pointer InternalClone() const override;
72  };
73 }
74 #endif
std::map< unsigned int, std::vector< unsigned int > > BValueMap
The BValueMap contains seperated IndicesVectors for each b value (index for GradientDirectionContaine...
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKDIFFUSIONCORE_EXPORT
vnl_vector_fixed< double, 3 > ValueType
itk::VectorContainer< IndexType, GradientDirectionType > GradientDirectionsContainerType
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44