Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkOdfScaleByProperty.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 _MITK_OdfScaleByProperty__H_
18 #define _MITK_OdfScaleByProperty__H_
19 
23 
24 namespace mitk
25 {
26 
28  {
32  };
33 
40 {
41 public:
42 
44  itkFactorylessNewMacro(Self)
45  itkCloneMacro(Self)
46 
48 
49  mitkNewMacro1Param(OdfScaleByProperty, const std::string&);
50 
54  virtual int GetScaleBy();
55 
56  virtual void SetScaleByNothing();
57  virtual void SetScaleByGFA();
58  virtual void SetScaleByPrincipalCurvature();
59 
60 protected:
61 
65 
69  OdfScaleByProperty( const IdType& value );
70 
74  OdfScaleByProperty( const std::string& value );
75 
80  virtual bool AddEnum( const std::string& name, const IdType& id ) override;
81 
86  virtual void AddInterpolationTypes();
87 };
88 
90 {
91  public:
92 
94  itkFactorylessNewMacro(Self)
95  itkCloneMacro(Self)
96 
97  virtual BaseProperty::Pointer Deserialize(TiXmlElement* element) override
98  {
99  if (!element) return nullptr;
100  const char* sa( element->Attribute("value") );
101  std::string s(sa?sa:"");
103  property->SetValue( s );
104  return property.GetPointer();
105  }
106 
107  protected:
108 
111 };
112 
113 } // end of namespace mitk
114 
115 #endif
116 
117 
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
DataCollection - Class to facilitate loading/accessing structured data.
static Pointer New()
#define MITKDIFFUSIONCORE_EXPORT
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44