23 #ifndef __vtkSlicerTerminologiesModuleLogic_h 24 #define __vtkSlicerTerminologiesModuleLogic_h 29 #include "vtkSlicerTerminologiesModuleLogicExport.h" 31 #include <vtkVector.h> 45 void PrintSelf(ostream& os, vtkIndent indent)
override;
53 CodeIdentifier(std::string codingSchemeDesignator, std::string codeValue, std::string codeMeaning)
54 : CodingSchemeDesignator(codingSchemeDesignator)
55 , CodeValue(codeValue)
56 , CodeMeaning(codeMeaning)
58 std::string CodingSchemeDesignator;
73 bool LoadContextFromFile(std::string filePath);
77 std::string LoadTerminologyFromFile(std::string filePath);
81 std::string LoadAnatomicContextFromFile(std::string filePath);
86 bool LoadTerminologyFromSegmentDescriptorFile(std::string contextName, std::string filePath);
89 bool LoadAnatomicContextFromSegmentDescriptorFile(std::string contextName, std::string filePath);
92 void GetLoadedTerminologyNames(std::vector<std::string> &terminologyNames);
94 void GetLoadedTerminologyNames(vtkStringArray* terminologyNames);
96 void GetLoadedAnatomicContextNames(std::vector<std::string> &anatomicContextNames);
98 void GetLoadedAnatomicContextNames(vtkStringArray* anatomicContextNames);
104 bool GetCategoriesInTerminology(std::string terminologyName, std::vector<CodeIdentifier>& categories);
109 bool FindCategoriesInTerminology(std::string terminologyName, std::vector<CodeIdentifier>& categories, std::string search);
115 int GetNumberOfCategoriesInTerminology(std::string terminologyName);
126 bool GetTypesInTerminologyCategory(std::string terminologyName, CodeIdentifier categoryId, std::vector<CodeIdentifier>& types);
131 bool FindTypesInTerminologyCategory(std::string terminologyName, CodeIdentifier categoryId, std::vector<CodeIdentifier>& types, std::string search);
135 bool GetTypeInTerminologyCategory(std::string terminologyName, CodeIdentifier categoryId, CodeIdentifier typeId,
vtkSlicerTerminologyType* typeObject);
150 bool GetTypeModifiersInTerminologyType(std::string terminologyName, CodeIdentifier categoryId, CodeIdentifier typeId, std::vector<CodeIdentifier>& typeModifiers);
154 bool GetTypeModifierInTerminologyType(std::string terminologyName,
155 CodeIdentifier categoryId, CodeIdentifier typeId, CodeIdentifier modifierId,
vtkSlicerTerminologyType* typeModifier);
171 bool GetRegionsInAnatomicContext(std::string anatomicContextName, std::vector<CodeIdentifier>& regions);
174 bool FindRegionsInAnatomicContext(std::string anatomicContextName, std::vector<CodeIdentifier>& regions, std::string search);
178 bool GetRegionInAnatomicContext(std::string anatomicContextName, CodeIdentifier regionId,
vtkSlicerTerminologyType* regionObject);
184 bool GetRegionModifiersInAnatomicRegion(std::string anatomicContextName, CodeIdentifier regionId, std::vector<CodeIdentifier>& regionModifiers);
188 bool GetRegionModifierInAnatomicRegion(std::string anatomicContextName,
196 bool FindTypeInTerminologyBy3dSlicerLabel(std::string terminologyName, std::string slicerLabel,
vtkSlicerTerminologyEntry* entry);
211 static std::string SerializeTerminologyEntry(
212 std::string terminologyContextName,
213 std::string categoryValue, std::string categorySchemeDesignator, std::string categoryMeaning,
214 std::string typeValue, std::string typeSchemeDesignator, std::string typeMeaning,
215 std::string modifierValue, std::string modifierSchemeDesignator, std::string modifierMeaning,
216 std::string anatomicContextName,
217 std::string regionValue, std::string regionSchemeDesignator, std::string regionMeaning,
218 std::string regionModifierValue, std::string regionModifierSchemeDesignator, std::string regionModifierMeaning );
230 vtkGetStringMacro(UserContextsPath);
231 vtkSetStringMacro(UserContextsPath);
240 void LoadDefaultTerminologies();
242 void LoadDefaultAnatomicContexts();
244 void LoadUserContexts();
248 char* UserContextsPath{
nullptr};
255 vtkInternal* Internal;
256 friend class vtkInternal;
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
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.
CodeIdentifier(std::string codingSchemeDesignator, std::string codeValue, std::string codeMeaning)
Terminology property category object.