Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkOrganTypeProperty.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 "mitkOrganTypeProperty.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  // On changes, please also change mitk::DataNodeFactory::DefaultColorForOrgan()
59 
60  AddEnum("undefined", newId++);
61  AddEnum("Ankle", newId++);
62  AddEnum("Appendix", newId++);
63  AddEnum("Blood vessels", newId++);
64  AddEnum("Bone", newId++);
65  AddEnum("Brain", newId++);
66  AddEnum("Bronchial tree", newId++);
67  AddEnum("Coccyx", newId++);
68  AddEnum("Colon", newId++);
69  AddEnum("Cyst", newId++);
70  AddEnum("Elbow", newId++);
71  AddEnum("Eye", newId++);
72  AddEnum("Fallopian tube", newId++);
73  AddEnum("Fat", newId++);
74  AddEnum("Gall bladder", newId++);
75  AddEnum("Hand", newId++);
76  AddEnum("Heart", newId++);
77  AddEnum("Hip", newId++);
78  AddEnum("Hippocampus", newId++);
79  AddEnum("Kidney", newId++);
80  AddEnum("Knee", newId++);
81  AddEnum("Larynx", newId++);
82  AddEnum("Liver", newId++);
83  AddEnum("Lung", newId++);
84  AddEnum("Lymph node", newId++);
85  AddEnum("Muscle", newId++);
86  AddEnum("Nerve", newId++);
87  AddEnum("Nose", newId++);
88  AddEnum("Oesophagus", newId++);
89  AddEnum("Ovaries", newId++);
90  AddEnum("Pancreas", newId++);
91  AddEnum("Pelvis", newId++);
92  AddEnum("Penis", newId++);
93  AddEnum("Pharynx", newId++);
94  AddEnum("Prostate", newId++);
95  AddEnum("Rectum", newId++);
96  AddEnum("Sacrum", newId++);
97  AddEnum("Seminal vesicle", newId++);
98  AddEnum("Shoulder", newId++);
99  AddEnum("Spinal cord", newId++);
100  AddEnum("Spleen", newId++);
101  AddEnum("Stomach", newId++);
102  AddEnum("Teeth", newId++);
103  AddEnum("Testicles", newId++);
104  AddEnum("Thyroid", newId++);
105  AddEnum("Tongue", newId++);
106  AddEnum("Tumor", newId++);
107  AddEnum("Urethra", newId++);
108  AddEnum("Urinary bladder", newId++);
109  AddEnum("Uterus", newId++);
110  AddEnum("Vagina", newId++);
111  AddEnum("Vertebra", newId++);
112  AddEnum("Wrist", newId++);
113 }
114 
115 itk::LightObject::Pointer mitk::OrganTypeProperty::InternalClone() const
116 {
117  itk::LightObject::Pointer result(new Self(*this));
118  result->UnRegister();
119  return result;
120 }
itk::SmartPointer< Self > Pointer
virtual EnumIdsContainerType::size_type Size() const