Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkModalityProperty.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 
17 #include "mitkModalityProperty.h"
18 
20 {
22 }
23 
25 {
26  AddEnumerationTypes();
27  if (IsValidEnumerationValue(value))
28  {
29  SetValue(value);
30  }
31  else
32  {
33  SetValue(0);
34  }
35 }
36 
38 {
39  AddEnumerationTypes();
40  if (IsValidEnumerationValue(value))
41  {
42  SetValue(value);
43  }
44  else
45  {
46  SetValue("undefined");
47  }
48 }
49 
51 {
52 }
53 
55 {
56  IdType newId = static_cast<IdType>(EnumerationProperty::Size());
57 
58  AddEnum("undefined", newId++);
59  AddEnum("CR", newId++); // computer radiography
60  AddEnum("CT", newId++); // computed tomography
61  AddEnum("MR", newId++); // magnetic resonance
62  AddEnum("NM", newId++); // nuclear medicine
63  AddEnum("US", newId++); // ultrasound
64  AddEnum("Color Doppler", newId++); // ultrasound
65  AddEnum("Power Doppler", newId++); // ultrasound
66 }
67 
68 itk::LightObject::Pointer mitk::ModalityProperty::InternalClone() const
69 {
70  itk::LightObject::Pointer result(new Self(*this));
71  result->UnRegister();
72  return result;
73 }
itk::SmartPointer< Self > Pointer
virtual EnumIdsContainerType::size_type Size() const