![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Modules/Loadable/Terminologies/Logic/vtkSlicerTerminologiesModuleLogic.h>
Classes | |
class | CodeIdentifier |
Information needed to uniquely identify a terminology code. More... | |
Public Types | |
typedef vtkSlicerModuleLogic | Superclass |
![]() | |
typedef vtkMRMLAbstractLogic | Superclass |
![]() | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
bool | FindCategoriesInTerminology (std::string terminologyName, std::vector< CodeIdentifier > &categories, std::string search) |
std::vector< std::string > | FindColorNodes (std::string categoryCodingSchemeDesignator, std::string categoryCodeValue, std::string typeCodingSchemeDesignator, std::string typeCodeValue, std::string typeModifierCodingSchemeDesignator, std::string typeModifierCodeValue, std::string regionCodingSchemeDesignator, std::string regionCodeValue, std::string regionModifierCodingSchemeDesignator, std::string regionModifierCodeValue, std::vector< std::string > preferredColorNodeNames, vtkIntArray *foundColorIndices=nullptr, vtkIntArray *foundPreferredColorNodeIndices=nullptr) |
bool | FindFirstColorNodeOrTerminology (std::string categoryCodingSchemeDesignator, std::string categoryCodeValue, std::string typeCodingSchemeDesignator, std::string typeCodeValue, std::string typeModifierCodingSchemeDesignator, std::string typeModifierCodeValue, std::string regionCodingSchemeDesignator, std::string regionCodeValue, std::string regionModifierCodingSchemeDesignator, std::string regionModifierCodeValue, std::vector< std::string > preferredTerminologyNames, std::string &foundTerminologyName, std::string &foundColorNodeID, int &foundColorIndex) |
bool | FindFirstColorNodeOrTerminology (vtkSlicerTerminologyEntry *entry, std::vector< std::string > preferredTerminologyNames, std::string &foundTerminologyName, std::string &foundColorNodeID, int &foundColorIndex) |
std::vector< std::string > | FindRegionContextNames (std::string regionCodingSchemeDesignator, std::string regionCodeValue, std::string regionModifierCodingSchemeDesignator, std::string regionModifierCodeValue, std::vector< std::string > preferredRegionContextNames, vtkCollection *foundEntries=nullptr) |
bool | FindRegionsInRegionContext (std::string regionContextName, std::vector< CodeIdentifier > ®ions, std::string search) |
std::vector< std::string > | FindTerminologyNames (std::string categoryCodingSchemeDesignator, std::string categoryCodeValue, std::string typeCodingSchemeDesignator, std::string typeCodeValue, std::string typeModifierCodingSchemeDesignator, std::string typeModifierCodeValue, std::vector< std::string > preferredTerminologyNames, vtkCollection *foundEntries=nullptr, vtkIntArray *foundPreferredTerminologyNameIndices=nullptr) |
bool | FindTypeInTerminologyBy3dSlicerLabel (std::string terminologyName, std::string slicerLabel, vtkSlicerTerminologyEntry *entry) |
bool | FindTypesInTerminologyCategory (std::string terminologyName, CodeIdentifier categoryId, std::vector< CodeIdentifier > &types, std::string search, std::vector< vtkSmartPointer< vtkSlicerTerminologyType > > *typeObjects=nullptr) |
bool | GetCategoriesInTerminology (std::string terminologyName, std::vector< CodeIdentifier > &categories) |
bool | GetCategoryInTerminology (std::string terminologyName, CodeIdentifier categoryId, vtkSlicerTerminologyCategory *categoryObject) |
virtual const char * | GetClassName () |
std::vector< std::string > | GetCompatibleColorNodeIDs () |
Get list of color node IDs that contain terminology information. | |
vtkMRMLColorNode * | GetFirstCompatibleColorNodeByName (std::string name) |
Return the first compatible color node that has a matching name. | |
void | GetLoadedRegionContextNames (std::vector< std::string > ®ionContextNames) |
Get context names of loaded region contexts. | |
void | GetLoadedRegionContextNames (vtkStringArray *regionContextNames) |
Python accessor variant of. | |
void | GetLoadedTerminologyNames (std::vector< std::string > &terminologyNames) |
Get context names of loaded terminologies. | |
void | GetLoadedTerminologyNames (vtkStringArray *terminologyNames) |
Python accessor variant of. | |
bool | GetNthCategoryInTerminology (std::string terminologyName, int categoryIndex, vtkSlicerTerminologyCategory *category) |
bool | GetNthRegionInRegionContext (std::string regionContextName, int regionIndex, vtkSlicerTerminologyType *regionObject) |
bool | GetNthRegionModifierInRegion (std::string regionContextName, vtkSlicerTerminologyType *regionObject, int regionModifierIndex, vtkSlicerTerminologyType *regionModifier) |
bool | GetNthTypeInTerminologyCategory (std::string terminologyName, vtkSlicerTerminologyCategory *category, int typeIndex, vtkSlicerTerminologyType *type) |
bool | GetNthTypeModifierInTerminologyType (std::string terminologyName, vtkSlicerTerminologyCategory *category, vtkSlicerTerminologyType *type, int typeModifierIndex, vtkSlicerTerminologyType *typeModifier) |
int | GetNumberOfCategoriesInTerminology (std::string terminologyName) |
Get number of categories in a terminology. | |
int | GetNumberOfRegionModifierInRegion (std::string regionContextName, vtkSlicerTerminologyType *regionObject) |
int | GetNumberOfRegionsInRegionContext (std::string regionContextName) |
int | GetNumberOfTypeModifiersInTerminologyType (std::string terminologyName, vtkSlicerTerminologyCategory *category, vtkSlicerTerminologyType *type) |
Get number of type modifiers for the chosen category and type in a terminology. | |
int | GetNumberOfTypesInTerminologyCategory (std::string terminologyName, vtkSlicerTerminologyCategory *category) |
Get number of types in the chosen category in a terminology. | |
bool | GetRegionInRegionContext (std::string regionContextName, CodeIdentifier regionId, vtkSlicerTerminologyType *regionObject) |
bool | GetRegionModifierInRegion (std::string regionContextName, CodeIdentifier regionId, CodeIdentifier modifierId, vtkSlicerTerminologyType *regionModifier) |
bool | GetRegionModifiersInRegion (std::string regionContextName, CodeIdentifier regionId, std::vector< CodeIdentifier > ®ionModifiers) |
bool | GetRegionsInRegionContext (std::string regionContextName, std::vector< CodeIdentifier > ®ions) |
bool | GetTypeInTerminologyCategory (std::string terminologyName, CodeIdentifier categoryId, CodeIdentifier typeId, vtkSlicerTerminologyType *typeObject) |
bool | GetTypeModifierInTerminologyType (std::string terminologyName, CodeIdentifier categoryId, CodeIdentifier typeId, CodeIdentifier modifierId, vtkSlicerTerminologyType *typeModifier) |
bool | GetTypeModifiersInTerminologyType (std::string terminologyName, CodeIdentifier categoryId, CodeIdentifier typeId, std::vector< CodeIdentifier > &typeModifiers) |
bool | GetTypesInTerminologyCategory (std::string terminologyName, CodeIdentifier categoryId, std::vector< CodeIdentifier > &types) |
virtual char * | GetUserContextsPath () |
virtual int | IsA (const char *type) |
bool | IsTerminologyContextLoaded (std::string terminologyName) |
Returns true if the terminology name is loaded. | |
bool | LoadContextFromFile (std::string filePath) |
std::string | LoadRegionContextFromFile (std::string filePath) |
bool | LoadRegionContextFromSegmentDescriptorFile (std::string contextName, std::string filePath) |
std::string | LoadTerminologyFromFile (std::string filePath) |
bool | LoadTerminologyFromSegmentDescriptorFile (std::string contextName, std::string filePath) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual void | SetUserContextsPath (const char *) |
bool | UpdateEntryFromLoadedTerminologies (vtkSlicerTerminologyEntry *entry, std::vector< std::string > preferredTerminologyNames, std::vector< std::string > preferredRegionContextNames) |
bool | AreSegmentTerminologyEntriesEqual (vtkSegment *segment1, vtkSegment *segment2) |
bool | AreTerminologyEntriesEqual (vtkSlicerTerminologyEntry *entry1, vtkSlicerTerminologyEntry *entry2) |
bool | AreTerminologyEntriesEqual (std::string terminologyEntry1, std::string terminologyEntry2) |
bool | AreCodedEntriesEqual (vtkCodedEntry *codedEntry1, vtkCodedEntry *codedEntry2) |
![]() | |
virtual vtkSlicerApplicationLogic * | GetApplicationLogic () |
Get access to overall application state. | |
virtual vtkMRMLAbstractLogic * | GetModuleLogic (const char *moduleName) |
Convenience method for getting another module's logic from the application logic. | |
std::string | GetModuleShareDirectory () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | SetModuleShareDirectory (const std::string &shareDirectory) |
![]() | |
virtual vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () const |
Get access to overall application state. | |
vtkMRMLScene * | GetMRMLScene () const |
Return a reference to the current MRML scene. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual void | SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic) |
void | SetMRMLScene (vtkMRMLScene *newScene) |
Set and observe the MRMLScene. | |
Static Public Member Functions | |
static bool | AreCodedEntriesExactMatch (vtkCodedEntry *codedEntry1, vtkCodedEntry *codedEntry2) |
static bool | DeserializeTerminologyEntry (std::string serializedEntry, vtkSlicerTerminologyEntry *entry) |
static CodeIdentifier | GetCodeIdentifierFromCodedEntry (vtkCodedEntry *entry) |
Convert terminology category, type, etc. object to code identifier. | |
static const char * | GetColorAutoGeneratedAttributeName () |
Node attribute name for color auto generated. | |
static int | GetColorIndexByTerminology (vtkMRMLColorNode *colorNode, const std::string &terminologyStr, bool ignoreContextName=true) |
static bool | GetDefaultTerminologyEntry (vtkMRMLNode *node, vtkSlicerTerminologyEntry *entry) |
static std::string | GetDefaultTerminologyEntryAsString (vtkMRMLNode *node) |
static const char * | GetDefaultTerminologyEntryAttributeName () |
static std::string | GetInfoStringFromTerminologyEntry (vtkSlicerTerminologyEntry *entry) |
Assemble human readable info string from a terminology entry, for example for tooltips. | |
static const char * | GetNameAutoGeneratedAttributeName () |
Node attribute name for name auto generated. | |
static bool | GetTerminologyEntry (vtkMRMLNode *node, vtkSlicerTerminologyEntry *entry) |
static std::string | GetTerminologyEntryAsString (vtkMRMLNode *node) |
static const char * | GetTerminologyEntryAttributeName () |
Terminology entry (serialized to string) | |
static int | IsTypeOf (const char *type) |
static vtkSlicerTerminologiesModuleLogic * | New () |
static vtkSlicerTerminologiesModuleLogic * | SafeDownCast (vtkObject *o) |
static std::string | SerializeTerminologyEntry (std::string terminologyContextName, std::string categoryValue, std::string categorySchemeDesignator, std::string categoryMeaning, std::string typeValue, std::string typeSchemeDesignator, std::string typeMeaning, std::string modifierValue, std::string modifierSchemeDesignator, std::string modifierMeaning, std::string regionContextName, std::string regionValue, std::string regionSchemeDesignator, std::string regionMeaning, std::string regionModifierValue, std::string regionModifierSchemeDesignator, std::string regionModifierMeaning) |
static std::string | SerializeTerminologyEntry (vtkSlicerTerminologyEntry *entry) |
static void | SetDefaultTerminologyEntry (vtkMRMLNode *node, vtkSlicerTerminologyEntry *entry) |
static void | SetDefaultTerminologyEntryAsString (vtkMRMLNode *node, std::string entryStr) |
static void | SetTerminologyEntry (vtkMRMLNode *node, vtkSlicerTerminologyEntry *entry) |
static void | SetTerminologyEntryAsString (vtkMRMLNode *node, std::string entryStr) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkSlicerModuleLogic * | New () |
The Usual vtk class functions. | |
static vtkSlicerModuleLogic * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
void | LoadDefaultRegionContexts () |
Load default region context dictionaries from JSON into. | |
void | LoadDefaultTerminologies () |
Load default terminology dictionaries from JSON into. | |
void | LoadUserContexts () |
Load terminologies and region contexts from the user settings directory. | |
void | SetMRMLSceneInternal (vtkMRMLScene *newScene) override |
vtkSlicerTerminologiesModuleLogic () | |
~vtkSlicerTerminologiesModuleLogic () override | |
![]() | |
vtkSlicerModuleLogic () | |
~vtkSlicerModuleLogic () override | |
![]() | |
int | EndModify (bool wasModifying) |
virtual bool | EnterMRMLLogicsCallback () const |
virtual bool | EnterMRMLNodesCallback () const |
virtual bool | EnterMRMLSceneCallback () const |
bool | GetDisableModifiedEvent () const |
int | GetInMRMLLogicsCallbackFlag () const |
int | GetInMRMLNodesCallbackFlag () const |
int | GetInMRMLSceneCallbackFlag () const |
vtkCallbackCommand * | GetMRMLLogicsCallbackCommand () |
vtkObserverManager * | GetMRMLLogicsObserverManager () const |
vtkCallbackCommand * | GetMRMLNodesCallbackCommand () |
vtkObserverManager * | GetMRMLNodesObserverManager () const |
vtkCallbackCommand * | GetMRMLSceneCallbackCommand () |
vtkObserverManager * | GetMRMLSceneObserverManager () const |
int | GetPendingModifiedEventCount () const |
int | GetProcessingMRMLSceneEvent () const |
Return the event id currently processed or 0 if any. | |
int | InvokePendingModifiedEvent () |
void | Modified () override |
virtual void | ObserveMRMLScene () |
virtual void | OnMRMLNodeModified (vtkMRMLNode *) |
virtual void | OnMRMLSceneEndBatchProcess () |
virtual void | OnMRMLSceneEndClose () |
virtual void | OnMRMLSceneEndImport () |
virtual void | OnMRMLSceneEndRestore () |
virtual void | OnMRMLSceneNew () |
virtual void | OnMRMLSceneNodeAdded (vtkMRMLNode *) |
virtual void | OnMRMLSceneNodeRemoved (vtkMRMLNode *) |
virtual void | OnMRMLSceneStartBatchProcess () |
virtual void | OnMRMLSceneStartClose () |
virtual void | OnMRMLSceneStartImport () |
virtual void | OnMRMLSceneStartRestore () |
virtual void | ProcessMRMLLogicsEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | ProcessMRMLSceneEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | RegisterNodes () |
void | SetAndObserveMRMLSceneEventsInternal (vtkMRMLScene *newScene, vtkIntArray *events, vtkFloatArray *priorities=nullptr) |
void | SetDisableModifiedEvent (bool onOff) |
void | SetInMRMLLogicsCallbackFlag (int flag) |
void | SetInMRMLNodesCallbackFlag (int flag) |
void | SetInMRMLSceneCallbackFlag (int flag) |
void | SetProcessingMRMLSceneEvent (int event) |
bool | StartModify () |
virtual void | UnobserveMRMLScene () |
virtual void | UpdateFromMRMLScene () |
vtkMRMLAbstractLogic () | |
~vtkMRMLAbstractLogic () override | |
Protected Attributes | |
char * | UserContextsPath {nullptr} |
The path from which the json files are automatically loaded on startup. | |
Friends | |
class | vtkInternal |
Additional Inherited Members | |
![]() | |
static void | MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLLogicCallback is a static function to relay modified events from the logics. | |
static void | MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLNodesCallback is a static function to relay modified events from the nodes. | |
static void | MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
Definition at line 39 of file vtkSlicerTerminologiesModuleLogic.h.
Definition at line 44 of file vtkSlicerTerminologiesModuleLogic.h.
|
protected |
|
overrideprotected |
bool vtkSlicerTerminologiesModuleLogic::AreCodedEntriesEqual | ( | vtkCodedEntry * | codedEntry1, |
vtkCodedEntry * | codedEntry2 ) |
|
static |
Compare two terminology entries for exact equality.
bool vtkSlicerTerminologiesModuleLogic::AreSegmentTerminologyEntriesEqual | ( | vtkSegment * | segment1, |
vtkSegment * | segment2 ) |
Compare two terminology entries for equality.
bool vtkSlicerTerminologiesModuleLogic::AreTerminologyEntriesEqual | ( | std::string | terminologyEntry1, |
std::string | terminologyEntry2 ) |
bool vtkSlicerTerminologiesModuleLogic::AreTerminologyEntriesEqual | ( | vtkSlicerTerminologyEntry * | entry1, |
vtkSlicerTerminologyEntry * | entry2 ) |
|
static |
Populate terminology entry VTK object based on serialized entry Serialized terminology entry consists of the following: terminologyContextName, category (codingScheme, codeValue, codeMeaning triple), type, typeModifier, regionContextName, region, regionModifier
bool vtkSlicerTerminologiesModuleLogic::FindCategoriesInTerminology | ( | std::string | terminologyName, |
std::vector< CodeIdentifier > & | categories, | ||
std::string | search ) |
Find category names (codeMeaning) in terminology containing a given string
categories | Output argument containing all the |
std::vector< std::string > vtkSlicerTerminologiesModuleLogic::FindColorNodes | ( | std::string | categoryCodingSchemeDesignator, |
std::string | categoryCodeValue, | ||
std::string | typeCodingSchemeDesignator, | ||
std::string | typeCodeValue, | ||
std::string | typeModifierCodingSchemeDesignator, | ||
std::string | typeModifierCodeValue, | ||
std::string | regionCodingSchemeDesignator, | ||
std::string | regionCodeValue, | ||
std::string | regionModifierCodingSchemeDesignator, | ||
std::string | regionModifierCodeValue, | ||
std::vector< std::string > | preferredColorNodeNames, | ||
vtkIntArray * | foundColorIndices = nullptr, | ||
vtkIntArray * | foundPreferredColorNodeIndices = nullptr ) |
Return collection of color node IDs designated by the given codes.
preferredTerminologyNames | List of terminology names in order of preference. If an empty list is provided then all terminologies are searched. |
foundColorIndices | if specified then it will contain the indices of the found colors in the color table. |
foundPreferredColorNodeIndices | if specified then it will contain the indices of the found color nodes in the preferredColorNodeNames list. |
bool vtkSlicerTerminologiesModuleLogic::FindFirstColorNodeOrTerminology | ( | std::string | categoryCodingSchemeDesignator, |
std::string | categoryCodeValue, | ||
std::string | typeCodingSchemeDesignator, | ||
std::string | typeCodeValue, | ||
std::string | typeModifierCodingSchemeDesignator, | ||
std::string | typeModifierCodeValue, | ||
std::string | regionCodingSchemeDesignator, | ||
std::string | regionCodeValue, | ||
std::string | regionModifierCodingSchemeDesignator, | ||
std::string | regionModifierCodeValue, | ||
std::vector< std::string > | preferredTerminologyNames, | ||
std::string & | foundTerminologyName, | ||
std::string & | foundColorNodeID, | ||
int & | foundColorIndex ) |
Find the best fitting color node or terminology
preferredTerminologyNames | List of terminology names in order of preference. If an empty list is provided then all terminologies are searched. |
foundTerminologyName | found terminology name (color node name in case a color node was found) |
foundColorNodeID | found color node ID (empty if terminology was found) |
foundColorIndex | found color index in the color node (-1 if color was not found in the table) |
bool vtkSlicerTerminologiesModuleLogic::FindFirstColorNodeOrTerminology | ( | vtkSlicerTerminologyEntry * | entry, |
std::vector< std::string > | preferredTerminologyNames, | ||
std::string & | foundTerminologyName, | ||
std::string & | foundColorNodeID, | ||
int & | foundColorIndex ) |
Find the best fitting color node or terminology
preferredTerminologyNames | List of terminology names in order of preference. If an empty list is provided then all terminologies are searched. |
foundTerminologyName | found terminology name (color node name in case a color node was found) |
foundColorNodeID | found color node ID (empty if terminology was found) |
foundColorIndex | found color index in the color node (-1 if color was not found in the table) |
std::vector< std::string > vtkSlicerTerminologiesModuleLogic::FindRegionContextNames | ( | std::string | regionCodingSchemeDesignator, |
std::string | regionCodeValue, | ||
std::string | regionModifierCodingSchemeDesignator, | ||
std::string | regionModifierCodeValue, | ||
std::vector< std::string > | preferredRegionContextNames, | ||
vtkCollection * | foundEntries = nullptr ) |
Return list of region context names containing the specified region.
preferredRegionContextNames | List of region context names in order of preference. If an empty list is provided then all context are searched. |
bool vtkSlicerTerminologiesModuleLogic::FindRegionsInRegionContext | ( | std::string | regionContextName, |
std::vector< CodeIdentifier > & | regions, | ||
std::string | search ) |
Get all region names (codeMeaning) in an context
std::vector< std::string > vtkSlicerTerminologiesModuleLogic::FindTerminologyNames | ( | std::string | categoryCodingSchemeDesignator, |
std::string | categoryCodeValue, | ||
std::string | typeCodingSchemeDesignator, | ||
std::string | typeCodeValue, | ||
std::string | typeModifierCodingSchemeDesignator, | ||
std::string | typeModifierCodeValue, | ||
std::vector< std::string > | preferredTerminologyNames, | ||
vtkCollection * | foundEntries = nullptr, | ||
vtkIntArray * | foundPreferredTerminologyNameIndices = nullptr ) |
Return collection of vtkSlicerTerminologyEntry objects designated by the given codes.
preferredTerminologyNames | List of terminology names in order of preference. If an empty list is provided then all terminologies are searched. |
foundEntries | if specified then it will contain the found terminology entries. |
foundPreferredColorNodeIndices | if specified then it will contain the indices of the found terminologies in the in the preferredTerminologyNames list. |
bool vtkSlicerTerminologiesModuleLogic::FindTypeInTerminologyBy3dSlicerLabel | ( | std::string | terminologyName, |
std::string | slicerLabel, | ||
vtkSlicerTerminologyEntry * | entry ) |
Find terminology type or type modifier based on '3dSlicerLabel' attribute
terminologyName | Terminology context in which the attribute is looked for |
slicerLabel | Attribute to look for |
entry | Terminology entry populated if the attribute is found |
bool vtkSlicerTerminologiesModuleLogic::FindTypesInTerminologyCategory | ( | std::string | terminologyName, |
CodeIdentifier | categoryId, | ||
std::vector< CodeIdentifier > & | types, | ||
std::string | search, | ||
std::vector< vtkSmartPointer< vtkSlicerTerminologyType > > * | typeObjects = nullptr ) |
Get terminology types from a terminology category as collection of
types | Output argument containing all the |
typeObjects | Output argument containing all the |
bool vtkSlicerTerminologiesModuleLogic::GetCategoriesInTerminology | ( | std::string | terminologyName, |
std::vector< CodeIdentifier > & | categories ) |
Get terminology categories from a terminology as collection of
categories | Output argument containing all the |
bool vtkSlicerTerminologiesModuleLogic::GetCategoryInTerminology | ( | std::string | terminologyName, |
CodeIdentifier | categoryId, | ||
vtkSlicerTerminologyCategory * | categoryObject ) |
Get a category with given name from a terminology
category | Output argument containing the details of the found category if any (if return value is true) |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
|
static |
Convert terminology category, type, etc. object to code identifier.
|
inlinestatic |
Node attribute name for color auto generated.
Definition at line 70 of file vtkSlicerTerminologiesModuleLogic.h.
|
static |
Return the index of the first color that matches the provided terminology. For matching, the category, type, type modifier, region, region modifier codes have to be equal. Coding scheme designator and code value must match, code meaning is ignored. Terminology and region context names are taken into account depending on ignoreContextName parameter.
colorNode | The color node to search for the terminology entry. |
terminologyStr | The string representation of the searched terminology entry. |
ignoreContextName | Only consider the category, type, etc. coded entries if true, otherwise look for exact match in the terminology context name as well. True by default. |
std::vector< std::string > vtkSlicerTerminologiesModuleLogic::GetCompatibleColorNodeIDs | ( | ) |
Get list of color node IDs that contain terminology information.
|
static |
|
static |
|
inlinestatic |
Terminology entry (serialized to string) to be used as default when specifying terminology code for the node. It can be incomplete (e.g., it is valid to specify just the context name).
Definition at line 75 of file vtkSlicerTerminologiesModuleLogic.h.
vtkMRMLColorNode * vtkSlicerTerminologiesModuleLogic::GetFirstCompatibleColorNodeByName | ( | std::string | name | ) |
Return the first compatible color node that has a matching name.
|
static |
Assemble human readable info string from a terminology entry, for example for tooltips.
void vtkSlicerTerminologiesModuleLogic::GetLoadedRegionContextNames | ( | std::vector< std::string > & | regionContextNames | ) |
Get context names of loaded region contexts.
void vtkSlicerTerminologiesModuleLogic::GetLoadedRegionContextNames | ( | vtkStringArray * | regionContextNames | ) |
Python accessor variant of.
void vtkSlicerTerminologiesModuleLogic::GetLoadedTerminologyNames | ( | std::vector< std::string > & | terminologyNames | ) |
Get context names of loaded terminologies.
void vtkSlicerTerminologiesModuleLogic::GetLoadedTerminologyNames | ( | vtkStringArray * | terminologyNames | ) |
Python accessor variant of.
|
inlinestatic |
Node attribute name for name auto generated.
Definition at line 68 of file vtkSlicerTerminologiesModuleLogic.h.
bool vtkSlicerTerminologiesModuleLogic::GetNthCategoryInTerminology | ( | std::string | terminologyName, |
int | categoryIndex, | ||
vtkSlicerTerminologyCategory * | category ) |
Get a category from a terminology by index.
categoryIndex | specifies which category to return |
category | category is returned in this object |
bool vtkSlicerTerminologiesModuleLogic::GetNthRegionInRegionContext | ( | std::string | regionContextName, |
int | regionIndex, | ||
vtkSlicerTerminologyType * | regionObject ) |
Get region by index. Allows iterating through all regions in Python.
regionContextName | region context name |
regionIndex | index of region to return, must be between 0 and GetNumberOfRegionsInRegionContext(...)-1 |
regionObject | found region |
bool vtkSlicerTerminologiesModuleLogic::GetNthRegionModifierInRegion | ( | std::string | regionContextName, |
vtkSlicerTerminologyType * | regionObject, | ||
int | regionModifierIndex, | ||
vtkSlicerTerminologyType * | regionModifier ) |
Get region by index. Allows iterating through region modifiers in Python.
regionContextName | region context name |
regionObject | region |
regionModifierIndex | index of region to return, must be between 0 and GetNumberOfRegionsInRegionContext(...)-1 |
regionModifier | found region modifier object |
bool vtkSlicerTerminologiesModuleLogic::GetNthTypeInTerminologyCategory | ( | std::string | terminologyName, |
vtkSlicerTerminologyCategory * | category, | ||
int | typeIndex, | ||
vtkSlicerTerminologyType * | type ) |
Get a terminology type by index
terminologyName | input terminology name |
category | input category |
typeIndex | index of type to return |
typeObject | output type |
bool vtkSlicerTerminologiesModuleLogic::GetNthTypeModifierInTerminologyType | ( | std::string | terminologyName, |
vtkSlicerTerminologyCategory * | category, | ||
vtkSlicerTerminologyType * | type, | ||
int | typeModifierIndex, | ||
vtkSlicerTerminologyType * | typeModifier ) |
Get a terminology type by index
terminologyName | input terminology name |
category | input category |
typeObject | input type |
typeModifierIndex | index of type modifier to return |
typeModifier | output type modifier |
int vtkSlicerTerminologiesModuleLogic::GetNumberOfCategoriesInTerminology | ( | std::string | terminologyName | ) |
Get number of categories in a terminology.
int vtkSlicerTerminologiesModuleLogic::GetNumberOfRegionModifierInRegion | ( | std::string | regionContextName, |
vtkSlicerTerminologyType * | regionObject ) |
Get number of regions in region context. Allows iterating through region modifiers in Python.
int vtkSlicerTerminologiesModuleLogic::GetNumberOfRegionsInRegionContext | ( | std::string | regionContextName | ) |
Get number of regions in region context. Allows iterating through all regions in Python.
int vtkSlicerTerminologiesModuleLogic::GetNumberOfTypeModifiersInTerminologyType | ( | std::string | terminologyName, |
vtkSlicerTerminologyCategory * | category, | ||
vtkSlicerTerminologyType * | type ) |
Get number of type modifiers for the chosen category and type in a terminology.
int vtkSlicerTerminologiesModuleLogic::GetNumberOfTypesInTerminologyCategory | ( | std::string | terminologyName, |
vtkSlicerTerminologyCategory * | category ) |
Get number of types in the chosen category in a terminology.
bool vtkSlicerTerminologiesModuleLogic::GetRegionInRegionContext | ( | std::string | regionContextName, |
CodeIdentifier | regionId, | ||
vtkSlicerTerminologyType * | regionObject ) |
Get a region with given name from a region context
region | Output argument containing the details of the found region if any (if return value is true) |
bool vtkSlicerTerminologiesModuleLogic::GetRegionModifierInRegion | ( | std::string | regionContextName, |
CodeIdentifier | regionId, | ||
CodeIdentifier | modifierId, | ||
vtkSlicerTerminologyType * | regionModifier ) |
Get a region modifier with given name from a region
regionModifier | Output argument containing the details of the found region modifier if any (if return value is true) |
bool vtkSlicerTerminologiesModuleLogic::GetRegionModifiersInRegion | ( | std::string | regionContextName, |
CodeIdentifier | regionId, | ||
std::vector< CodeIdentifier > & | regionModifiers ) |
Get region modifiers from a region as collection of
regionModifierCollection | Output argument containing all the |
bool vtkSlicerTerminologiesModuleLogic::GetRegionsInRegionContext | ( | std::string | regionContextName, |
std::vector< CodeIdentifier > & | regions ) |
Get regions from an region context as collection of
regionCollection | Output argument containing all the |
|
static |
|
static |
|
inlinestatic |
Terminology entry (serialized to string)
Definition at line 72 of file vtkSlicerTerminologiesModuleLogic.h.
bool vtkSlicerTerminologiesModuleLogic::GetTypeInTerminologyCategory | ( | std::string | terminologyName, |
CodeIdentifier | categoryId, | ||
CodeIdentifier | typeId, | ||
vtkSlicerTerminologyType * | typeObject ) |
Get a type with given name from a terminology category
type | Output argument containing the details of the found type if any (if return value is true) |
bool vtkSlicerTerminologiesModuleLogic::GetTypeModifierInTerminologyType | ( | std::string | terminologyName, |
CodeIdentifier | categoryId, | ||
CodeIdentifier | typeId, | ||
CodeIdentifier | modifierId, | ||
vtkSlicerTerminologyType * | typeModifier ) |
Get a type modifier with given name from a terminology type
typeModifier | Output argument containing the details of the found type modifier if any (if return value is true) |
bool vtkSlicerTerminologiesModuleLogic::GetTypeModifiersInTerminologyType | ( | std::string | terminologyName, |
CodeIdentifier | categoryId, | ||
CodeIdentifier | typeId, | ||
std::vector< CodeIdentifier > & | typeModifiers ) |
Get terminology type modifiers from a terminology type as collection of
typeModifierCollection | Output argument containing all the |
bool vtkSlicerTerminologiesModuleLogic::GetTypesInTerminologyCategory | ( | std::string | terminologyName, |
CodeIdentifier | categoryId, | ||
std::vector< CodeIdentifier > & | types ) |
Get terminology types from a terminology category as collection of
types | Output argument containing all the |
|
virtual |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
bool vtkSlicerTerminologiesModuleLogic::IsTerminologyContextLoaded | ( | std::string | terminologyName | ) |
Returns true if the terminology name is loaded.
|
static |
bool vtkSlicerTerminologiesModuleLogic::LoadContextFromFile | ( | std::string | filePath | ) |
Load terminology or region context from JSON file. Note: Separate generic loader function was created so that the file does not need to be loaded twice in case the type of the context in the JSON file is not known
filePath | File containing the context to load |
|
protected |
Load default region context dictionaries from JSON into.
|
protected |
Load default terminology dictionaries from JSON into.
std::string vtkSlicerTerminologiesModuleLogic::LoadRegionContextFromFile | ( | std::string | filePath | ) |
Load region context dictionaries from JSON into
filePath | File containing the region context to load |
bool vtkSlicerTerminologiesModuleLogic::LoadRegionContextFromSegmentDescriptorFile | ( | std::string | contextName, |
std::string | filePath ) |
Load region context dictionary from segmentation descriptor JSON file into
std::string vtkSlicerTerminologiesModuleLogic::LoadTerminologyFromFile | ( | std::string | filePath | ) |
Load terminology dictionary from JSON terminology context file into
filePath | File containing the terminology to load |
bool vtkSlicerTerminologiesModuleLogic::LoadTerminologyFromSegmentDescriptorFile | ( | std::string | contextName, |
std::string | filePath ) |
Load terminology dictionary from segmentation descriptor JSON file into
Terminology | context name (the descriptor file does not contain information about that) |
filePath | File containing the terminology to load |
|
protected |
Load terminologies and region contexts from the user settings directory.
|
static |
|
override |
|
static |
|
static |
Assemble terminology string from terminology codes The serialized string will have the following format: "terminologyContextName~" "categorySchemeDesignator^categoryValue^categoryMeaning~" "typeSchemeDesignator^typeValue^typeMeaning~" "modifierSchemeDesignator^modifierValue^modifierMeaning~" "regionContextName~" "regionSchemeDesignator^regionValue^regionMeaning~" "regionModifierSchemeDesignator^regionModifierValue^regionModifierMeaning" Note: The order of the attributes are inconsistent with the codes used in this class for compatibility reasons (to vtkMRMLColorLogic::AddTermToTerminology)
|
static |
Convert terminology entry VTK object to string containing identifiers Serialized terminology entry consists of the following: terminologyContextName, category (codingScheme, codeValue, codeMeaning triple), type, typeModifier, regionContextName, region, regionModifier
|
static |
|
static |
|
overrideprotectedvirtual |
Called each time a new scene is set. Can be reimplemented in derived classes. Doesn't observe the scene by default, that means that UpdateFromMRMLScene() won't be called by default when a scene is imported, closed or restored, only when a new scene is set.
Reimplemented from vtkMRMLAbstractLogic.
|
static |
|
static |
|
virtual |
bool vtkSlicerTerminologiesModuleLogic::UpdateEntryFromLoadedTerminologies | ( | vtkSlicerTerminologyEntry * | entry, |
std::vector< std::string > | preferredTerminologyNames, | ||
std::vector< std::string > | preferredRegionContextNames ) |
Get metadata (such as recommended color) from loaded terminologies. The entry will be first searched in the terminology context that is specified in the entry, if not found then it is searched in all the other loaded terminology contexts.
|
friend |
Definition at line 411 of file vtkSlicerTerminologiesModuleLogic.h.
|
protected |
The path from which the json files are automatically loaded on startup.
Definition at line 403 of file vtkSlicerTerminologiesModuleLogic.h.