Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkOdfNormalizationMethodProperty.cpp
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 
18 
19 // ODFN_MINMAX, ODFN_MAX, ODFN_NONE ODFN_GLOBAL_MAX
20 
22 {
23  this->AddInterpolationTypes();
24  this->SetValue( static_cast<IdType>( ODFN_MINMAX ) );
25 }
26 
27 
29 {
30  this->AddInterpolationTypes();
31  if ( IsValidEnumerationValue( value ) )
32  {
33  this->SetValue( value ) ;
34  }
35  else
36  {
37  this->SetValue( static_cast<IdType>( ODFN_MINMAX ) );
38  }
39 }
40 
42 {
43  this->AddInterpolationTypes();
44  if ( IsValidEnumerationValue( value ) )
45  {
46  this->SetValue( value );
47  }
48  else
49  {
50  this->SetValue( static_cast<IdType>( ODFN_MINMAX ) );
51  }
52 }
53 
54 
56 {
57  return static_cast<int>( this->GetValueAsId() );
58 }
59 
60 
62 {
63  this->SetValue( static_cast<IdType>( ODFN_MINMAX ) );
64 }
65 
66 
68 {
69  this->SetValue( static_cast<IdType>( ODFN_MAX ) );
70 }
71 
72 
74 {
75  this->SetValue( static_cast<IdType>( ODFN_NONE ) );
76 }
77 
78 
80 {
81  this->SetValue( static_cast<IdType>( ODFN_GLOBAL_MAX ) );
82 }
83 
84 
86 {
87  AddEnum( "Min-Max", static_cast<IdType>( ODFN_MINMAX ) );
88  AddEnum( "Maximum", static_cast<IdType>( ODFN_MAX ) );
89  AddEnum( "None", static_cast<IdType>( ODFN_NONE ) );
90  AddEnum( "Global Maximum", static_cast<IdType>( ODFN_GLOBAL_MAX ) );
91 }
92 
93 
94 bool mitk::OdfNormalizationMethodProperty::AddEnum( const std::string& name, const IdType& id )
95 {
96  return Superclass::AddEnum( name, id );
97 }
98 
virtual bool SetValue(const std::string &name)
#define MITK_REGISTER_SERIALIZER(classname)
virtual bool AddEnum(const std::string &name, const IdType &id) override