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
mitkOdfNormalizationMethodProperty.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_OdfNormalizationMethodProperty__H_
18 #define _MITK_OdfNormalizationMethodProperty__H_
19 
23 
24 #include "mitkSerializerMacros.h"
25 
26 namespace mitk
27 {
28 
30  {
35  };
36 
43 {
44 public:
45 
47  itkFactorylessNewMacro(Self)
48  itkCloneMacro(Self)
49 
51 
53 
57  virtual int GetNormalization();
58 
62  virtual void SetNormalizationToMinMax();
63 
67  virtual void SetNormalizationToMax();
68 
72  virtual void SetNormalizationToNone();
73 
77  virtual void SetNormalizationToGlobalMax();
78 
79 protected:
80 
84 
88  OdfNormalizationMethodProperty( const IdType& value );
89 
93  OdfNormalizationMethodProperty( const std::string& value );
94 
99  virtual bool AddEnum( const std::string& name, const IdType& id ) override;
100 
105  virtual void AddInterpolationTypes();
106 };
107 
109 {
110  public:
111 
113  itkFactorylessNewMacro(Self)
114  itkCloneMacro(Self)
115 
116  virtual BaseProperty::Pointer Deserialize(TiXmlElement* element) override
117  {
118  if (!element) return nullptr;
119  const char* sa( element->Attribute("value") );
120  std::string s(sa?sa:"");
122  property->SetValue( s );
123  return property.GetPointer();
124  }
125 
126  protected:
127 
130 };
131 
132 
133 } // end of namespace mitk
134 
135 #endif
136 
137 
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKDIFFUSIONCORE_EXPORT
Abstract base class for properties.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44