23 #ifndef __vtkSlicerTerminologiesModuleLogic_h 24 #define __vtkSlicerTerminologiesModuleLogic_h 29 #include "vtkSlicerTerminologiesModuleLogicExport.h" 31 #include <vtkVector.h> 45 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 : CodingSchemeDesignator(
"")
56 CodeIdentifier(std::string codingSchemeDesignator, std::string codeValue, std::string codeMeaning)
57 : CodingSchemeDesignator(codingSchemeDesignator)
58 , CodeValue(codeValue)
59 , CodeMeaning(codeMeaning)
61 std::string CodingSchemeDesignator;
76 bool LoadContextFromFile(std::string filePath);
80 std::string LoadTerminologyFromFile(std::string filePath);
84 std::string LoadAnatomicContextFromFile(std::string filePath);
89 bool LoadTerminologyFromSegmentDescriptorFile(std::string contextName, std::string filePath);
92 bool LoadAnatomicContextFromSegmentDescriptorFile(std::string contextName, std::string filePath);
95 void GetLoadedTerminologyNames(std::vector<std::string> &terminologyNames);
97 void GetLoadedTerminologyNames(vtkStringArray* terminologyNames);
99 void GetLoadedAnatomicContextNames(std::vector<std::string> &anatomicContextNames);
101 void GetLoadedAnatomicContextNames(vtkStringArray* anatomicContextNames);
108 bool GetCategoriesInTerminology(std::string terminologyName, std::vector<CodeIdentifier>& categories);
113 bool FindCategoriesInTerminology(std::string terminologyName, std::vector<CodeIdentifier>& categories, std::string search);
124 bool GetTypesInTerminologyCategory(std::string terminologyName, CodeIdentifier categoryId, std::vector<CodeIdentifier>& types);
129 bool FindTypesInTerminologyCategory(std::string terminologyName, CodeIdentifier categoryId, std::vector<CodeIdentifier>& types, std::string search);
133 bool GetTypeInTerminologyCategory(std::string terminologyName, CodeIdentifier categoryId, CodeIdentifier typeId,
vtkSlicerTerminologyType* typeObject);
139 bool GetTypeModifiersInTerminologyType(std::string terminologyName, CodeIdentifier categoryId, CodeIdentifier typeId, std::vector<CodeIdentifier>& typeModifiers);
143 bool GetTypeModifierInTerminologyType(std::string terminologyName,
144 CodeIdentifier categoryId, CodeIdentifier typeId, CodeIdentifier modifierId,
vtkSlicerTerminologyType* typeModifier);
151 bool GetRegionsInAnatomicContext(std::string anatomicContextName, std::vector<CodeIdentifier>& regions);
155 bool FindRegionsInAnatomicContext(std::string anatomicContextName, std::vector<CodeIdentifier>& regions, std::string search);
159 bool GetRegionInAnatomicContext(std::string anatomicContextName, CodeIdentifier regionId,
vtkSlicerTerminologyType* regionObject);
165 bool GetRegionModifiersInAnatomicRegion(std::string anatomicContextName, CodeIdentifier regionId, std::vector<CodeIdentifier>& regionModifiers);
169 bool GetRegionModifierInAnatomicRegion(std::string anatomicContextName,
177 bool FindTypeInTerminologyBy3dSlicerLabel(std::string terminologyName, std::string slicerLabel,
vtkSlicerTerminologyEntry* entry);
192 static std::string SerializeTerminologyEntry(
193 std::string terminologyContextName,
194 std::string categoryValue, std::string categorySchemeDesignator, std::string categoryMeaning,
195 std::string typeValue, std::string typeSchemeDesignator, std::string typeMeaning,
196 std::string modifierValue, std::string modifierSchemeDesignator, std::string modifierMeaning,
197 std::string anatomicContextName,
198 std::string regionValue, std::string regionSchemeDesignator, std::string regionMeaning,
199 std::string regionModifierValue, std::string regionModifierSchemeDesignator, std::string regionModifierMeaning );
211 vtkGetStringMacro(UserContextsPath);
212 vtkSetStringMacro(UserContextsPath);
221 void LoadDefaultTerminologies();
223 void LoadDefaultAnatomicContexts();
225 void LoadUserContexts();
236 vtkInternal* Internal;
237 friend class vtkInternal;
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
static const char * GetColorAutoGeneratedAttributeName()
Node attribute name for color auto generated.
Information needed to uniquely identify a terminology code.
Terminology property type object.
A set of MRML Nodes that supports serialization and undo/redo.
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
static const char * GetNameAutoGeneratedAttributeName()
Node attribute name for name auto generated.
char * UserContextsPath
The path from which the json files are automatically loaded on startup.
CodeIdentifier(std::string codingSchemeDesignator, std::string codeValue, std::string codeMeaning)
Terminology property category object.