Slicer
4.11
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 |
Public Types inherited from vtkSlicerModuleLogic | |
typedef vtkMRMLAbstractLogic | Superclass |
Public Types inherited from vtkMRMLAbstractLogic | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
bool | DeserializeTerminologyEntry (std::string serializedEntry, vtkSlicerTerminologyEntry *entry) |
bool | FindCategoriesInTerminology (std::string terminologyName, std::vector< CodeIdentifier > &categories, std::string search) |
bool | FindRegionsInAnatomicContext (std::string anatomicContextName, std::vector< CodeIdentifier > ®ions, std::string search) |
bool | FindTypeInTerminologyBy3dSlicerLabel (std::string terminologyName, std::string slicerLabel, vtkSlicerTerminologyEntry *entry) |
bool | FindTypesInTerminologyCategory (std::string terminologyName, CodeIdentifier categoryId, std::vector< CodeIdentifier > &types, std::string search) |
bool | GetCategoriesInTerminology (std::string terminologyName, std::vector< CodeIdentifier > &categories) |
bool | GetCategoryInTerminology (std::string terminologyName, CodeIdentifier categoryId, vtkSlicerTerminologyCategory *categoryObject) |
virtual const char * | GetClassName () |
void | GetLoadedAnatomicContextNames (std::vector< std::string > &anatomicContextNames) |
Get context names of loaded anatomic contexts. More... | |
void | GetLoadedAnatomicContextNames (vtkStringArray *anatomicContextNames) |
Python accessor variant of. More... | |
void | GetLoadedTerminologyNames (std::vector< std::string > &terminologyNames) |
Get context names of loaded terminologies. More... | |
void | GetLoadedTerminologyNames (vtkStringArray *terminologyNames) |
Python accessor variant of. More... | |
bool | GetNthCategoryInTerminology (std::string terminologyName, int categoryIndex, vtkSlicerTerminologyCategory *category) |
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. More... | |
int | GetNumberOfTypeModifiersInTerminologyType (std::string terminologyName, vtkSlicerTerminologyCategory *category, vtkSlicerTerminologyType *type) |
Get number of type modifiers for the chosen category and type in a terminology. More... | |
int | GetNumberOfTypesInTerminologyCategory (std::string terminologyName, vtkSlicerTerminologyCategory *category) |
Get number of types in the chosen category in a terminology. More... | |
bool | GetRegionInAnatomicContext (std::string anatomicContextName, CodeIdentifier regionId, vtkSlicerTerminologyType *regionObject) |
bool | GetRegionModifierInAnatomicRegion (std::string anatomicContextName, CodeIdentifier regionId, CodeIdentifier modifierId, vtkSlicerTerminologyType *regionModifier) |
bool | GetRegionModifiersInAnatomicRegion (std::string anatomicContextName, CodeIdentifier regionId, std::vector< CodeIdentifier > ®ionModifiers) |
bool | GetRegionsInAnatomicContext (std::string anatomicContextName, 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) |
std::string | LoadAnatomicContextFromFile (std::string filePath) |
bool | LoadAnatomicContextFromSegmentDescriptorFile (std::string contextName, std::string filePath) |
bool | LoadContextFromFile (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 *) |
Public Member Functions inherited from vtkSlicerModuleLogic | |
virtual vtkSlicerApplicationLogic * | GetApplicationLogic () |
Get access to overall application state. More... | |
virtual vtkMRMLAbstractLogic * | GetModuleLogic (const char *moduleName) |
Convenience method for getting another module's logic from the application logic. More... | |
std::string | GetModuleShareDirectory () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | SetModuleShareDirectory (const std::string &shareDirectory) |
Public Member Functions inherited from vtkMRMLAbstractLogic | |
virtual vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () const |
Get access to overall application state. More... | |
vtkMRMLScene * | GetMRMLScene () const |
Return a reference to the current MRML scene. More... | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual void | SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic) |
void | SetMRMLScene (vtkMRMLScene *newScene) |
Set and observe the MRMLScene. More... | |
Static Public Member Functions | |
static CodeIdentifier | CodeIdentifierFromTerminologyCategory (vtkSlicerTerminologyCategory *category) |
Convert terminology category object to code identifier. More... | |
static CodeIdentifier | CodeIdentifierFromTerminologyType (vtkSlicerTerminologyType *type) |
Convert terminology type object to code identifier. More... | |
static const char * | GetColorAutoGeneratedAttributeName () |
Node attribute name for color auto generated. More... | |
static std::string | GetInfoStringFromTerminologyEntry (vtkSlicerTerminologyEntry *entry) |
Assemble human readable info string from a terminology entry, for example for tooltips. More... | |
static const char * | GetNameAutoGeneratedAttributeName () |
Node attribute name for name auto generated. More... | |
static int | IsTypeOf (const char *type) |
static vtkSlicerTerminologiesModuleLogic * | New () |
static vtkSlicerTerminologiesModuleLogic * | SafeDownCast (vtkObject *o) |
static std::string | SerializeTerminologyEntry (vtkSlicerTerminologyEntry *entry) |
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 anatomicContextName, std::string regionValue, std::string regionSchemeDesignator, std::string regionMeaning, std::string regionModifierValue, std::string regionModifierSchemeDesignator, std::string regionModifierMeaning) |
Static Public Member Functions inherited from vtkSlicerModuleLogic | |
static int | IsTypeOf (const char *type) |
static vtkSlicerModuleLogic * | New () |
The Usual vtk class functions. More... | |
static vtkSlicerModuleLogic * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkMRMLAbstractLogic | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
void | LoadDefaultAnatomicContexts () |
Load default anatomic context dictionaries from JSON into. More... | |
void | LoadDefaultTerminologies () |
Load default terminology dictionaries from JSON into. More... | |
void | LoadUserContexts () |
Load terminologies and anatomic contexts from the user settings directory. More... | |
void | SetMRMLSceneInternal (vtkMRMLScene *newScene) override |
vtkSlicerTerminologiesModuleLogic () | |
~vtkSlicerTerminologiesModuleLogic () override | |
Protected Member Functions inherited from vtkSlicerModuleLogic | |
vtkSlicerModuleLogic () | |
~vtkSlicerModuleLogic () override | |
Protected Member Functions inherited from vtkMRMLAbstractLogic | |
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. More... | |
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. More... | |
Friends | |
class | vtkInternal |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkMRMLAbstractLogic | |
static void | MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLLogicCallback is a static function to relay modified events from the logics. More... | |
static void | MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLNodesCallback is a static function to relay modified events from the nodes. More... | |
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 |
|
static |
Convert terminology category object to code identifier.
|
static |
Convert terminology type object to code identifier.
bool vtkSlicerTerminologiesModuleLogic::DeserializeTerminologyEntry | ( | std::string | serializedEntry, |
vtkSlicerTerminologyEntry * | entry | ||
) |
Populate terminology entry VTK object based on serialized entry Serialized terminology entry consists of the following: terminologyContextName, category (codingScheme, codeValue, codeMeaning triple), type, typeModifier, anatomicContextName, anatomicRegion, anatomicRegionModifier
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 |
bool vtkSlicerTerminologiesModuleLogic::FindRegionsInAnatomicContext | ( | std::string | anatomicContextName, |
std::vector< CodeIdentifier > & | regions, | ||
std::string | search | ||
) |
Get all region names (codeMeaning) in an anatomic context
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 | ||
) |
Get all type names (codeMeaning) in a terminology category
typeCollection | 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.
|
inlinestatic |
Node attribute name for color auto generated.
Definition at line 66 of file vtkSlicerTerminologiesModuleLogic.h.
|
static |
Assemble human readable info string from a terminology entry, for example for tooltips.
void vtkSlicerTerminologiesModuleLogic::GetLoadedAnatomicContextNames | ( | std::vector< std::string > & | anatomicContextNames | ) |
Get context names of loaded anatomic contexts.
void vtkSlicerTerminologiesModuleLogic::GetLoadedAnatomicContextNames | ( | vtkStringArray * | anatomicContextNames | ) |
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 64 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::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::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::GetRegionInAnatomicContext | ( | std::string | anatomicContextName, |
CodeIdentifier | regionId, | ||
vtkSlicerTerminologyType * | regionObject | ||
) |
Get a region with given name from an anatomic context
region | Output argument containing the details of the found region if any (if return value is true) |
bool vtkSlicerTerminologiesModuleLogic::GetRegionModifierInAnatomicRegion | ( | std::string | anatomicContextName, |
CodeIdentifier | regionId, | ||
CodeIdentifier | modifierId, | ||
vtkSlicerTerminologyType * | regionModifier | ||
) |
Get a region modifier with given name from an anatomic region
regionModifier | Output argument containing the details of the found region modifier if any (if return value is true) |
bool vtkSlicerTerminologiesModuleLogic::GetRegionModifiersInAnatomicRegion | ( | std::string | anatomicContextName, |
CodeIdentifier | regionId, | ||
std::vector< CodeIdentifier > & | regionModifiers | ||
) |
Get region modifiers from an anatomic region as collection of
regionModifierCollection | Output argument containing all the |
bool vtkSlicerTerminologiesModuleLogic::GetRegionsInAnatomicContext | ( | std::string | anatomicContextName, |
std::vector< CodeIdentifier > & | regions | ||
) |
Get anatomic regions from an anatomic context as collection of
regionCollection | Output argument containing all the |
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
typeCollection | Output argument containing all the |
|
virtual |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
|
static |
std::string vtkSlicerTerminologiesModuleLogic::LoadAnatomicContextFromFile | ( | std::string | filePath | ) |
Load anatomic context dictionaries from JSON into
filePath | File containing the anatomic context to load |
bool vtkSlicerTerminologiesModuleLogic::LoadAnatomicContextFromSegmentDescriptorFile | ( | std::string | contextName, |
std::string | filePath | ||
) |
Load anatomic context dictionary from segmentation descriptor JSON file into
bool vtkSlicerTerminologiesModuleLogic::LoadContextFromFile | ( | std::string | filePath | ) |
Load terminology or anatomic 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 anatomic context dictionaries from JSON into.
|
protected |
Load default terminology dictionaries from JSON 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 anatomic contexts from the user settings directory.
|
static |
|
override |
|
static |
|
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, anatomicContextName, anatomicRegion, anatomicRegionModifier
|
static |
Assemble terminology string from terminology codes Note: The order of the attributes are inconsistent with the codes used in this class for compatibility reasons (to vtkMRMLColorLogic::AddTermToTerminology)
|
overrideprotectedvirtual |
Called each time a new scene is set. Can be reimplemented in derivated 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.
|
virtual |
|
friend |
Definition at line 256 of file vtkSlicerTerminologiesModuleLogic.h.
|
protected |
The path from which the json files are automatically loaded on startup.
Definition at line 248 of file vtkSlicerTerminologiesModuleLogic.h.