Segment Comparison Tables: more than one comparison in a single table

Hi,

I’m hugely impressed with SlicerRT’s segment comparison module.
We are fortunate enough to have two independent clinical automatic segmentation algorithms - i’d like to use SlicerRT to compare the homologous structures as part of the commissioning.

At the moment I can only compare one set of structures at a time and copy and paste the results into Excel. I’d like to be able to add subsequent comparisons to the same table.

Or better yet create an extension to compare multiple segments at once - this would have to do some sort of match based on the structure name, then export the results as CSV.

Some advice to get me started would be hugely appreciated.

Thanks.

Operating system: Windows 10
Slicer version: 29738

You can write a short Python script that iterates through the segments and puts the results into a table. There is only a C++ example to do this, but you can run the same in Python, just need to change the syntax (see hints here, you can find lots of Python examples in the script repository, and you can ask questions here if you get stuck at any point).

Just a quick example to get you started:

referenceSegmentationNode = getNode('Segmentation')
referenceSegmentID = referenceSegmentationNode.GetSegmentation().GetSegmentIdBySegmentName("Segment_1")
compareSegmentationNode = getNode('Segmentation')
compareSegmentID = referenceSegmentationNode.GetSegmentation().GetSegmentIdBySegmentName("Segment_2")

paramNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLSegmentComparisonNode")
paramNode.SetAndObserveReferenceSegmentationNode(referenceSegmentationNode)
paramNode.SetReferenceSegmentID(referenceSegmentID)
paramNode.SetAndObserveCompareSegmentationNode(compareSegmentationNode)
paramNode.SetCompareSegmentID(compareSegmentID)

segmentComparisonLogic = slicer.modules.segmentcomparison.logic()
segmentComparisonLogic.ComputeDiceStatistics(paramNode)
segmentComparisonLogic.ComputeHausdorffDistances(paramNode)

maxHD = paramNode.GetMaximumHausdorffDistanceForBoundaryMm()
averageHD = paramNode.GetAverageHausdorffDistanceForBoundaryMm()
print(f"Maximum Hausdorff distance: {maxHD}")
print(f"Average Hausdorff distance: {averageHD}")

You can add a loop that iterates through all the segments and puts the result into a table node. See example of creating and populating a table node here and here (create columns, add values to columns, then add the columns to the table).

1 Like

Didnt want to create a new topic, as it is an extension of the same.
How do I add ‘dice statistics’ to the same code.

diceStatistics = paramNode.GetDiceStatistics()
does not seem to work

Type paramNode. in the Python console and hit the Tab key to see the available methods. You can also type help(paramNode) to get the list and documentation of all available methods; or look them up in github.

Thanks very much for the reply. Did that I get a long list which I cant decode, sorry I am not an engineer. Is there anything I should particularly look at pls

OUTPUT

help(paramNode)
Help on vtkMRMLSegmentComparisonNode object:

class vtkMRMLSegmentComparisonNode(MRMLCorePython.vtkMRMLNode)
| vtkMRMLSegmentComparisonNode - \ingroup
| SlicerRt_QtModules_SegmentComparison
|
| Superclass: vtkMRMLNode
|
| Method resolution order:
| vtkMRMLSegmentComparisonNode
| MRMLCorePython.vtkMRMLNode
| vtkCommonCorePython.vtkObject
| vtkCommonCorePython.vtkObjectBase
| builtins.object
|
| Methods defined here:
|
| Copy(…)
| V.Copy(vtkMRMLNode)
| C++: void Copy(vtkMRMLNode *node) override;
|
| Copy the node’s attributes to this object
|
| CreateNodeInstance(…)
| V.CreateNodeInstance() → vtkMRMLNode
| C++: vtkMRMLNode *CreateNodeInstance() override;
|
| Create instance of a GAD node.
|
| DiceResultsValidOff(…)
| V.DiceResultsValidOff()
| C++: virtual void DiceResultsValidOff()
|
| DiceResultsValidOn(…)
| V.DiceResultsValidOn()
| C++: virtual void DiceResultsValidOn()
|
| GetAverageHausdorffDistanceForBoundaryMm(…)
| V.GetAverageHausdorffDistanceForBoundaryMm() → float
| C++: virtual double GetAverageHausdorffDistanceForBoundaryMm()
|
| Get average Hausdorff distance for the boundary voxels
|
| GetAverageHausdorffDistanceForVolumeMm(…)
| V.GetAverageHausdorffDistanceForVolumeMm() → float
| C++: virtual double GetAverageHausdorffDistanceForVolumeMm()
|
| Get average Hausdorff distance for the whole volume
|
| GetCompareCenter(…)
| V.GetCompareCenter() → (float, float, float)
| C++: double *GetCompareCenter()
|
| GetCompareSegmentID(…)
| V.GetCompareSegmentID() → string
| C++: virtual char *GetCompareSegmentID()
|
| Get compare segment ID
|
| GetCompareSegmentationNode(…)
| V.GetCompareSegmentationNode() → vtkMRMLSegmentationNode
| C++: vtkMRMLSegmentationNode *GetCompareSegmentationNode()
|
| Get compare segmentation node
|
| GetCompareVolumeCc(…)
| V.GetCompareVolumeCc() → float
| C++: virtual double GetCompareVolumeCc()
|
| Get volume of the compare structure
|
| GetDiceCoefficient(…)
| V.GetDiceCoefficient() → float
| C++: virtual float GetDiceCoefficient()
|
| Get result dice coefficient
|
| GetDiceResultsValid(…)
| V.GetDiceResultsValid() → bool
| C++: virtual bool GetDiceResultsValid()
|
| Get/Set Dice results valid flag
|
| GetDiceTableNode(…)
| V.GetDiceTableNode() → vtkMRMLTableNode
| C++: vtkMRMLTableNode *GetDiceTableNode()
|
| Get Dice table node
|
| GetFalseNegativesPercent(…)
| V.GetFalseNegativesPercent() → float
| C++: virtual double GetFalseNegativesPercent()
|
| Get percentage of false negative labelmap voxels
|
| GetFalsePositivesPercent(…)
| V.GetFalsePositivesPercent() → float
| C++: virtual double GetFalsePositivesPercent()
|
| Get percentage of false positive labelmap voxels
|
| GetHausdorffResultsValid(…)
| V.GetHausdorffResultsValid() → bool
| C++: virtual bool GetHausdorffResultsValid()
|
| Get/Set results Hausdorff valid flag
|
| GetHausdorffTableNode(…)
| V.GetHausdorffTableNode() → vtkMRMLTableNode
| C++: vtkMRMLTableNode *GetHausdorffTableNode()
|
| Get Hausdorff table node
|
| GetMaximumHausdorffDistanceForBoundaryMm(…)
| V.GetMaximumHausdorffDistanceForBoundaryMm() → float
| C++: virtual double GetMaximumHausdorffDistanceForBoundaryMm()
|
| Get maximum Hausdorff distance for the boundary voxels
|
| GetMaximumHausdorffDistanceForVolumeMm(…)
| V.GetMaximumHausdorffDistanceForVolumeMm() → float
| C++: virtual double GetMaximumHausdorffDistanceForVolumeMm()
|
| Get maximum Hausdorff distance for the whole volume
|
| GetNodeTagName(…)
| V.GetNodeTagName() → string
| C++: const char *GetNodeTagName() override;
|
| Get unique node XML tag name (like Volume, Model)
|
| GetPercent95HausdorffDistanceForBoundaryMm(…)
| V.GetPercent95HausdorffDistanceForBoundaryMm() → float
| C++: virtual double GetPercent95HausdorffDistanceForBoundaryMm()
|
| Get 95% Hausdorff distance for the boundary voxels
|
| GetPercent95HausdorffDistanceForVolumeMm(…)
| V.GetPercent95HausdorffDistanceForVolumeMm() → float
| C++: virtual double GetPercent95HausdorffDistanceForVolumeMm()
|
| Get 95% Hausdorff distance for whole volume
|
| GetRasterizationReferenceVolumeNode(…)
| V.GetRasterizationReferenceVolumeNode() → vtkMRMLScalarVolumeNode
| C++: vtkMRMLScalarVolumeNode *GetRasterizationReferenceVolumeNode(
| )
|
| Get rasterization reference volume node
|
| GetReferenceCenter(…)
| V.GetReferenceCenter() → (float, float, float)
| C++: double *GetReferenceCenter()
|
| GetReferenceSegmentID(…)
| V.GetReferenceSegmentID() → string
| C++: virtual char *GetReferenceSegmentID()
|
| Get reference segment ID
|
| GetReferenceSegmentationNode(…)
| V.GetReferenceSegmentationNode() → vtkMRMLSegmentationNode
| C++: vtkMRMLSegmentationNode *GetReferenceSegmentationNode()
|
| Get reference segmentation node
|
| GetReferenceVolumeCc(…)
| V.GetReferenceVolumeCc() → float
| C++: virtual double GetReferenceVolumeCc()
|
| Get volume of the reference structure
|
| GetTrueNegativesPercent(…)
| V.GetTrueNegativesPercent() → float
| C++: virtual double GetTrueNegativesPercent()
|
| Get percentage of true negative labelmap voxels
|
| GetTruePositivesPercent(…)
| V.GetTruePositivesPercent() → float
| C++: virtual double GetTruePositivesPercent()
|
| Get percentage of true positive labelmap voxels
|
| HausdorffResultsValidOff(…)
| V.HausdorffResultsValidOff()
| C++: virtual void HausdorffResultsValidOff()
|
| HausdorffResultsValidOn(…)
| V.HausdorffResultsValidOn()
| C++: virtual void HausdorffResultsValidOn()
|
| IsA(…)
| V.IsA(string) → int
| C++: vtkTypeBool IsA(const char *type) override;
|
| Return 1 if this class is the same type of (or a subclass of) the
| named class. Returns 0 otherwise. This method works in
| combination with vtkTypeMacro found in vtkSetGet.h.
|
| IsTypeOf(…)
| V.IsTypeOf(string) → int
| C++: static vtkTypeBool IsTypeOf(const char *type)
|
| Return 1 if this class type is the same type of (or a subclass
| of) the named class. Returns 0 otherwise. This method works in
| combination with vtkTypeMacro found in vtkSetGet.h.
|
| NewInstance(…)
| V.NewInstance() → vtkMRMLSegmentComparisonNode
| C++: vtkMRMLSegmentComparisonNode *NewInstance()
|
| SafeDownCast(…)
| V.SafeDownCast(vtkObjectBase) → vtkMRMLSegmentComparisonNode
| C++: static vtkMRMLSegmentComparisonNode *SafeDownCast(
| vtkObjectBase *o)
|
| SetAndObserveCompareSegmentationNode(…)
| V.SetAndObserveCompareSegmentationNode(vtkMRMLSegmentationNode)
| C++: void SetAndObserveCompareSegmentationNode(
| vtkMRMLSegmentationNode *node)
|
| Set compare segmentation node
|
| SetAndObserveDiceTableNode(…)
| V.SetAndObserveDiceTableNode(vtkMRMLTableNode)
| C++: void SetAndObserveDiceTableNode(vtkMRMLTableNode *node)
|
| Set Dice table node
|
| SetAndObserveHausdorffTableNode(…)
| V.SetAndObserveHausdorffTableNode(vtkMRMLTableNode)
| C++: void SetAndObserveHausdorffTableNode(vtkMRMLTableNode *node)
|
| Set Hausdorff table node
|
| SetAndObserveRasterizationReferenceVolumeNode(…)
| V.SetAndObserveRasterizationReferenceVolumeNode(
| vtkMRMLScalarVolumeNode)
| C++: void SetAndObserveRasterizationReferenceVolumeNode(
| vtkMRMLScalarVolumeNode *node)
|
| Set rasterization reference volume node
|
| SetAndObserveReferenceSegmentationNode(…)
| V.SetAndObserveReferenceSegmentationNode(vtkMRMLSegmentationNode)
| C++: void SetAndObserveReferenceSegmentationNode(
| vtkMRMLSegmentationNode *node)
|
| Set reference segmentation node
|
| SetAverageHausdorffDistanceForBoundaryMm(…)
| V.SetAverageHausdorffDistanceForBoundaryMm(float)
| C++: virtual void SetAverageHausdorffDistanceForBoundaryMm(
| double _arg)
|
| Set average Hausdorff distance for the boundary voxels
|
| SetAverageHausdorffDistanceForVolumeMm(…)
| V.SetAverageHausdorffDistanceForVolumeMm(float)
| C++: virtual void SetAverageHausdorffDistanceForVolumeMm(
| double _arg)
|
| Set average Hausdorff distance for the whole volume
|
| SetCompareCenter(…)
| V.SetCompareCenter(float, float, float)
| C++: void SetCompareCenter(double, double, double)
| V.SetCompareCenter((float, float, float))
| C++: void SetCompareCenter(double a[3])
|
| SetCompareSegmentID(…)
| V.SetCompareSegmentID(string)
| C++: virtual void SetCompareSegmentID(const char *_arg)
|
| Set compare segment ID
|
| SetCompareVolumeCc(…)
| V.SetCompareVolumeCc(float)
| C++: virtual void SetCompareVolumeCc(double _arg)
|
| Set volume of the compare structure
|
| SetDiceCoefficient(…)
| V.SetDiceCoefficient(float)
| C++: virtual void SetDiceCoefficient(float _arg)
|
| Set result dice coefficient
|
| SetDiceResultsValid(…)
| V.SetDiceResultsValid(bool)
| C++: virtual void SetDiceResultsValid(bool _arg)
|
| SetFalseNegativesPercent(…)
| V.SetFalseNegativesPercent(float)
| C++: virtual void SetFalseNegativesPercent(double _arg)
|
| Set percentage of false negative labelmap voxels
|
| SetFalsePositivesPercent(…)
| V.SetFalsePositivesPercent(float)
| C++: virtual void SetFalsePositivesPercent(double _arg)
|
| Set percentage of false positive labelmap voxels
|
| SetHausdorffResultsValid(…)
| V.SetHausdorffResultsValid(bool)
| C++: virtual void SetHausdorffResultsValid(bool _arg)
|
| SetMaximumHausdorffDistanceForBoundaryMm(…)
| V.SetMaximumHausdorffDistanceForBoundaryMm(float)
| C++: virtual void SetMaximumHausdorffDistanceForBoundaryMm(
| double _arg)
|
| Set maximum Hausdorff distance for the boundary voxels
|
| SetMaximumHausdorffDistanceForVolumeMm(…)
| V.SetMaximumHausdorffDistanceForVolumeMm(float)
| C++: virtual void SetMaximumHausdorffDistanceForVolumeMm(
| double _arg)
|
| Set maximum Hausdorff distance for the whole volume
|
| SetPercent95HausdorffDistanceForBoundaryMm(…)
| V.SetPercent95HausdorffDistanceForBoundaryMm(float)
| C++: virtual void SetPercent95HausdorffDistanceForBoundaryMm(
| double _arg)
|
| Set 95% Hausdorff distance for the boundary voxels
|
| SetPercent95HausdorffDistanceForVolumeMm(…)
| V.SetPercent95HausdorffDistanceForVolumeMm(float)
| C++: virtual void SetPercent95HausdorffDistanceForVolumeMm(
| double _arg)
|
| Set 95% Hausdorff distance for whole volume
|
| SetReferenceCenter(…)
| V.SetReferenceCenter(float, float, float)
| C++: void SetReferenceCenter(double, double, double)
| V.SetReferenceCenter((float, float, float))
| C++: void SetReferenceCenter(double a[3])
|
| SetReferenceSegmentID(…)
| V.SetReferenceSegmentID(string)
| C++: virtual void SetReferenceSegmentID(const char *_arg)
|
| Set reference segment ID
|
| SetReferenceVolumeCc(…)
| V.SetReferenceVolumeCc(float)
| C++: virtual void SetReferenceVolumeCc(double _arg)
|
| Set volume of the reference structure
|
| SetTrueNegativesPercent(…)
| V.SetTrueNegativesPercent(float)
| C++: virtual void SetTrueNegativesPercent(double _arg)
|
| Set percentage of true negative labelmap voxels
|
| SetTruePositivesPercent(…)
| V.SetTruePositivesPercent(float)
| C++: virtual void SetTruePositivesPercent(double _arg)
|
| Set percentage of true positive labelmap voxels
|
| delattr(self, name, /)
| Implement delattr(self, name).
|
| getattribute(self, name, /)
| Return getattr(self, name).
|
| new(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| repr(self, /)
| Return repr(self).
|
| setattr(self, name, value, /)
| Implement setattr(self, name, value).
|
| str(self, /)
| Return str(self).
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| dict
| Dictionary of attributes set by user.
|
| this
| Pointer to the C++ object.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| vtkname = ‘vtkMRMLSegmentComparisonNode’
|
| ----------------------------------------------------------------------
| Methods inherited from MRMLCorePython.vtkMRMLNode:
|
| AddAndObserveNodeReferenceID(…)
| V.AddAndObserveNodeReferenceID(string, string, vtkIntArray)
| → vtkMRMLNode
| C++: vtkMRMLNode *AddAndObserveNodeReferenceID(
| const char *referenceRole, const char *referencedNodeID,
| vtkIntArray *events=nullptr)
|
| Add and observe a reference node from this node for a
| specificreferenceRole.
|
| Observe Modified event by default, optionally takes array of
| events.
|
| AddNodeReferenceID(…)
| V.AddNodeReferenceID(string, string) → vtkMRMLNode
| C++: vtkMRMLNode *AddNodeReferenceID(const char *referenceRole,
| const char *referencedNodeID)
|
| Convenience method that adds a referencedNodeID at the end of the
| list.
|
| AddNodeReferenceRole(…)
| V.AddNodeReferenceRole(string, string, vtkIntArray)
| C++: void AddNodeReferenceRole(const char *referenceRole,
| const char mrmlAttributeName=nullptr,
| vtkIntArray events=nullptr)
|
| Add a referenceRole.
|
| The referenceRole can be any unique string, for example
| “display”, “transform” etc. Optionally a MRML attribute name for
| storing the reference in the mrml scene file can be specified.
| For example “displayNodeRef”. If omitted the MRML attribute name
| will be the same as the role. If referenceRole ends with ‘/’, it
| is considered as a “template” reference role that can be used to
| generate attribute names dynamically by concatenation: If
| referenceRole is “unit/” and mrmlAttributeName is “UnitRef”, then
| the generated MRML attribute names for a node reference role of
| “unit/length” will be “lengthUnitRef”. Use this method to add new
| reference types to a node. This method is typically called in the
| constructors of each subclass. The optional events argument
| specifies what events should be observed by default (e.g., when
| loading the scene from file). If referenceRole ends with ‘/’
| character then events are used for all roles names begins with
| this role name (for example, events specified for
| referenceRole=‘unit/’ will be used for
| referenceRole=‘unit/length’, referenceRole=‘unit/area’, etc).
| \sa GetReferenceNodeFromMRMLAttributeName()
|
| AddToSceneOff(…)
| V.AddToSceneOff()
| C++: virtual void AddToSceneOff()
|
| AddToSceneOn(…)
| V.AddToSceneOn()
| C++: virtual void AddToSceneOn()
|
| CopyContent(…)
| V.CopyContent(vtkMRMLNode, bool)
| C++: virtual void CopyContent(vtkMRMLNode node,
| bool deepCopy=true)
|
| Copy node contents from another node of the same type.
| Does not copy node ID, Scene, Name, SingletonTag,
| HideFromEditors, AddToScene, UndoEnabled, and node references. If
| deepCopy is set to false then a shallow copy of bulk data (such
| as image or mesh data) could be made; copying may be faster but
| the node may share some data with the source node instead of
| creating an independent copy.
|
| ote If a class implements this then make sure CopyContent and
| HasCopyContent methods are implemented in all parent classes by
| adding vtkMRMLCopyContentMacro(ClassName) to the class headers.
|
| CopyReferences(…)
| V.CopyReferences(vtkMRMLNode)
| C++: virtual void CopyReferences(vtkMRMLNode node)
|
| Copy the references of the node into this.
|
| Existing references will be replaced if found in node, or removed
| if not in node.
|
| CopyWithScene(…)
| V.CopyWithScene(vtkMRMLNode)
| C++: void CopyWithScene(vtkMRMLNode node)
|
| Copy everything (including Scene and ID) from another node of
| the same type.
|
| ote The node is not added into the scene of node. You must do
| it manually after calling CopyWithScene(vtkMRMLNode
) using
| vtkMRMLScene::AddNode(vtkMRMLNode
). Only one
| vtkCommand::ModifiedEvent is invoked, after the copy is fully
| completed.
|
| \bug Calling vtkMRMLScene::AddNode(vtkMRMLNode
) before
| CopyWithScene(vtkMRMLNode
) is NOT supported, it will
| unsynchronize the node internal caches. See
| #4078
|
| \sa vtkMRMLScene::AddNode(vtkMRMLNode
)
|
| DisableModifiedEventOff(…)
| V.DisableModifiedEventOff()
| C++: void DisableModifiedEventOff()
|
| DisableModifiedEventOn(…)
| V.DisableModifiedEventOn()
| C++: void DisableModifiedEventOn()
|
| EndModify(…)
| V.EndModify(int) → int
| C++: virtual int EndModify(int previousDisableModifiedEventState)
|
| End modifying the node.
|
| Enable Modify events if the previous state ofDisableModifiedEvent
| flag is 0.
|
| Return the number of pending events (even if
| InvokePendingModifiedEvent() is not called).
|
| GetAddToScene(…)
| V.GetAddToScene() → int
| C++: virtual int GetAddToScene()
|
| node added to MRML scene.
|
| GetAttribute(…)
| V.GetAttribute(string) → string
| C++: const char *GetAttribute(const char *name)
|
| Get value of a name value pair attribute.
|
| Return nullptr if the name does not exists.
|
| GetAttributeNames(…)
| V.GetAttributeNames() → Stvector_ISt6stringE
| C++: std::vectorstd::string GetAttributeNames()
| V.GetAttributeNames(vtkStringArray)
| C++: void GetAttributeNames(vtkStringArray *attributeNames)
|
| Get all attribute names.
|
| GetContentModifiedEvents(…)
| V.GetContentModifiedEvents() → vtkIntArray
| C++: virtual vtkIntArray *GetContentModifiedEvents()
|
| Return list of events that indicate that content of the node is
| modified. For example, it is not enough to observe
| vtkCommand::ModifiedEvent to get notified when a transform stored
| in a transform node is modified, but
| vtkMRMLTransformableNode::TransformModifiedEvent must be observed
| as well.
|
| GetDescription(…)
| V.GetDescription() → string
| C++: virtual char *GetDescription()
|
| GetDisableModifiedEvent(…)
| V.GetDisableModifiedEvent() → int
| C++: virtual int GetDisableModifiedEvent()
|
| Turn on/off generating InvokeEvent for set macros
|
| GetHideFromEditors(…)
| V.GetHideFromEditors() → int
| C++: virtual int GetHideFromEditors()
|
| Describes if the node is hidden.
|
| GetID(…)
| V.GetID() → string
| C++: virtual char *GetID()
|
| ID use by other nodes to reference this node in XML.
|
| GetInMRMLCallbackFlag(…)
| V.GetInMRMLCallbackFlag() → int
| C++: virtual int GetInMRMLCallbackFlag()
|
| Flags to avoid event loops.
|
| \warning Do NOT use the SetMacro or it call modified on itself
| and
| generate even more events!
|
| GetModifiedEventPending(…)
| V.GetModifiedEventPending() → int
| C++: virtual int GetModifiedEventPending()
|
| Number of pending modified events.
|
| \sa InvokePendingModifiedEvent()
| \sa Modified()
| \sa GetDisableModifiedEvent()
|
| GetName(…)
| V.GetName() → string
| C++: virtual char *GetName()
|
| GetNodeReference(…)
| V.GetNodeReference(string) → vtkMRMLNode
| C++: vtkMRMLNode *GetNodeReference(const char *referenceRole)
|
| Utility function that returns the first referenced node.
| \sa GetNthNodeReference(int), GetNodeReferenceID()
|
| GetNodeReferenceID(…)
| V.GetNodeReferenceID(string) → string
| C++: const char *GetNodeReferenceID(const char *referenceRole)
|
| Utility function that returns the first node id for a
| specificreferenceRole.
|
| \sa GetNthNodeReferenceID(int), GetNodeReference()
|
| GetNodeReferenceRoles(…)
| V.GetNodeReferenceRoles(Stvector_ISt6stringE)
| C++: void GetNodeReferenceRoles(std::vectorstd::string &roles)
|
| Get reference roles of the present node references.
| \sa GetNodeReferenceRoles(), GetNodeReferenceRoles(),
| GetNthNodeReferenceRole()
|
| GetNthNodeReference(…)
| V.GetNthNodeReference(string, int) → vtkMRMLNode
| C++: vtkMRMLNode *GetNthNodeReference(const char *referenceRole,
| int n)
|
| Get referenced MRML node for a specific referenceRole.
|
| Can be 0 in temporary states; e.g. if the referenced node has no
| scene, or if the referenced is not yet into the scene. If not
| cached, it tnternally scans (slow) the scene to search for the
| associated referenced node ID. If the referencing node is no
| longer in the scene (GetScene() == 0), it happens after the node
| is removed from the scene (scene->RemoveNode(dn), the returned
| referenced node is 0.
|
| GetNthNodeReferenceID(…)
| V.GetNthNodeReferenceID(string, int) → string
| C++: const char *GetNthNodeReferenceID(const char *referenceRole,
| int n)
|
| Return the string of the Nth node ID for a specific reference
| role.
|
| Return 0 if no such node exist.
|
| \warning A temporary char generated from a std::string::c_str()
| is returned.
|
| GetNthNodeReferenceRole(…)
| V.GetNthNodeReferenceRole(int) → string
| C++: const char *GetNthNodeReferenceRole(int n)
|
| Get a specific node reference role name.
| \sa GetNodeReferenceRoles(), GetNodeReferenceRoles(),
| GetNthNodeReferenceRole()
|
| GetNumberOfNodeReferenceRoles(…)
| V.GetNumberOfNodeReferenceRoles() → int
| C++: int GetNumberOfNodeReferenceRoles()
|
| Get number of node reference role names.
| \sa GetNodeReferenceRoles(), GetNodeReferenceRoles(),
| GetNthNodeReferenceRole()
|
| GetNumberOfNodeReferences(…)
| V.GetNumberOfNodeReferences(string) → int
| C++: int GetNumberOfNodeReferences(const char *referenceRole)
|
| Return the number of node IDs for a specific reference role (and
| nodes as they always
| have the same size).
|
| GetSaveWithScene(…)
| V.GetSaveWithScene() → int
| C++: virtual int GetSaveWithScene()
|
| Save node with MRML scene.
|
| GetScene(…)
| V.GetScene() → vtkMRMLScene
| C++: virtual vtkMRMLScene *GetScene()
|
| Get the scene this node has been added to.
|
| GetSelectable(…)
| V.GetSelectable() → int
| C++: virtual int GetSelectable()
|
| Describes if the node is selectable.
|
| GetSelected(…)
| V.GetSelected() → int
| C++: virtual int GetSelected()
|
| Get/Set for Selected
|
| GetSingletonTag(…)
| V.GetSingletonTag() → string
| C++: virtual char *GetSingletonTag()
|
| GetUndoEnabled(…)
| V.GetUndoEnabled() → bool
| C++: virtual bool GetUndoEnabled()
|
| Specifies if the state of this node is stored in the scene’s undo
| buffer. False by default to make sure that undo can be enabled
| selectively, only for nodes that are prepared to work correctly
| when saved/restored. Nodes with different UndoEnabled value must
| not reference to each other, because restoring states could lead
| to unresolved node references. Therefore, when undo is enabled
| for a certain node, it must be enabled for nodes that it
| references (for example, if undo is enabled for vtkMRMLModelNode
| then it must be enabled for vtkMRMLModelDisplayNode and
| vtkMRMLModelStorageNode as well).
|
| HasCopyContent(…)
| V.HasCopyContent() → bool
| C++: virtual bool HasCopyContent()
|
| Returns true if the class supports deep and shallow copying node
| content.
|
| HasNodeReferenceID(…)
| V.HasNodeReferenceID(string, string) → bool
| C++: bool HasNodeReferenceID(const char *referenceRole,
| const char *referencedNodeID)
|
| Return true if referencedNodeID is in the node ID list for a
| specific referenceRole.
|
| If nullptr is specified as role then all roles are checked.
|
| HideFromEditorsOff(…)
| V.HideFromEditorsOff()
| C++: virtual void HideFromEditorsOff()
|
| HideFromEditorsOn(…)
| V.HideFromEditorsOn()
| C++: virtual void HideFromEditorsOn()
|
| InvokeCustomModifiedEvent(…)
| V.InvokeCustomModifiedEvent(int, void)
| C++: virtual void InvokeCustomModifiedEvent(int eventId,
| void *callData=nullptr)
|
| This method allows the node to compress events.
|
| Instead of invoking a certain event several times, the event is
| called only once, for all the invocations that are made between
| StartModify() and EndModify().
|
| Typical usage is to group several ...Added, ...Removed,
| ...Modified events into one, to improve performance.
|
| callData is passed to InvokeEvent() if the event is invoked
| immediately.
|
| If the event is not invoked immediately then it will be sent with
| callData=nullptr.
|
| InvokePendingModifiedEvent(…)
| V.InvokePendingModifiedEvent() → int
| C++: virtual int InvokePendingModifiedEvent()
|
| Invokes any modified events that are pending.
|
| Pending modified events were generated while the
| DisableModifiedEvent flag was nonzero.
|
| Returns the total number of pending modified events that have
| been replaced by the just invoked modified event(s).
|
| IsSingleton(…)
| V.IsSingleton() → bool
| C++: bool IsSingleton()
|
| Modified(…)
| V.Modified()
| C++: void Modified() override;
|
| Customized version of Modified() allowing to compress
| vtkCommand::ModifiedEvent.
|
| It overrides the vtkObject method so that all changes to the node
| which would normally generate a vtkCommand::ModifiedEvent can be
| grouped into an atomic operation.
|
| Typical usage would be to disable modified events, call a series
| of Set* operations, and then re-enable modified events and call
| InvokePendingModifiedEvent() to invoke the event (if any of the
| Set* calls actually changed the values of the instance
| variables).
|
| \sa GetDisableModifiedEvent()
|
| OnNodeAddedToScene(…)
| V.OnNodeAddedToScene()
| C++: virtual void OnNodeAddedToScene()
|
| Updates this node if it depends on other nodes when the scene is
| read in This method is called by scene when a node added to a
| scene.
|
| ProcessChildNode(…)
| V.ProcessChildNode(vtkMRMLNode)
| C++: virtual void ProcessChildNode(vtkMRMLNode *)
|
| Set dependencies between this node and a child node
| when parsing XML file.
|
| ProcessMRMLEvents(…)
| V.ProcessMRMLEvents(vtkObject, int, void)
| C++: virtual void ProcessMRMLEvents(vtkObject *caller,
| unsigned long event, void *callData)
|
| Propagate events generated in mrml.
|
| RemoveAttribute(…)
| V.RemoveAttribute(string)
| C++: void RemoveAttribute(const char *name)
|
| Remove attribute with the specified name.
|
| RemoveNodeReferenceIDs(…)
| V.RemoveNodeReferenceIDs(string)
| C++: void RemoveNodeReferenceIDs(const char *referenceRole)
|
| Remove all node IDs and associated nodes for a specific
| referenceRole.
|
| If referenceRole is 0 remove references for all roles
|
| RemoveNthNodeReferenceID(…)
| V.RemoveNthNodeReferenceID(string, int)
| C++: void RemoveNthNodeReferenceID(const char *referenceRole,
| int n)
|
| Convenience method that removes the Nth node ID from the list.
|
| Reset(…)
| V.Reset(vtkMRMLNode)
| C++: virtual void Reset(vtkMRMLNode *defaultNode)
|
| Reset node attributes to the initial state as defined in the
| constructor or the passed default node.
|
| It preserves values of the following dynamic attributes that may
| be set by an application:
| * SaveWithScene
| * HideFromEditors
| * Selectable
| * SingletonTag.
|
| If a defaultNode pointer is passed then the values stored in that
| node will be used to set the node contents. If defaultNode is
| nullptr then the values set in the constructor of the class will
| be used to set the node contents.
|
| ote Other attributes that needs to be preserved should be handled
| in the subclass.
|
| \sa SetSaveWithScene()
| \sa SetHideFromEditors()
| \sa SetSelectable()
| \sa SetSingletonTag()
|
| SaveWithSceneOff(…)
| V.SaveWithSceneOff()
| C++: virtual void SaveWithSceneOff()
|
| SaveWithSceneOn(…)
| V.SaveWithSceneOn()
| C++: virtual void SaveWithSceneOn()
|
| SelectableOff(…)
| V.SelectableOff()
| C++: virtual void SelectableOff()
|
| SelectableOn(…)
| V.SelectableOn()
| C++: virtual void SelectableOn()
|
| SelectedOff(…)
| V.SelectedOff()
| C++: virtual void SelectedOff()
|
| SelectedOn(…)
| V.SelectedOn()
| C++: virtual void SelectedOn()
|
| SetAddToScene(…)
| V.SetAddToScene(int)
| C++: virtual void SetAddToScene(int _arg)
|
| SetAddToSceneNoModify(…)
| V.SetAddToSceneNoModify(int)
| C++: void SetAddToSceneNoModify(int value)
|
| SetAndObserveNodeReferenceID(…)
| V.SetAndObserveNodeReferenceID(string, string, vtkIntArray)
| → vtkMRMLNode
| C++: vtkMRMLNode *SetAndObserveNodeReferenceID(
| const char *referenceRole, const char *referencedNodeID,
| vtkIntArray *events=nullptr)
|
| Set and observe a reference node from this node for a
| specificreferenceRole.
|
| Observe Modified event by default, optionally takes array of
| events
|
| SetAndObserveNthNodeReferenceID(…)
| V.SetAndObserveNthNodeReferenceID(string, int, string,
| vtkIntArray) → vtkMRMLNode
| C++: vtkMRMLNode *SetAndObserveNthNodeReferenceID(
| const char *referenceRole, int n,
| const char referencedNodeID, vtkIntArray events=nullptr)
|
| Set and observe the Nth node ID for a specific reference role.
|
| If n is larger than the number of reference nodes, the node ID is
| added at the end of the list. If nodeReferenceID is 0, the node
| ID is removed from the list. When a node ID is set (added or
| changed), its corresponding node is searched (slow) into the
| scene and cached for fast future access. It is possible however
| that the node is not yet into the scene (due to some temporary
| state (at loading time for example). UpdateScene() can later be
| called to retrieve the nodes from the scene (automatically done
| when loading a scene). Get(Nth)NodeReference() also scan the
| scene if the node was not yet cached.
| \sa SetAndObserveNodeReferenceID(const char
)
| \sa AddAndObserveNodeReferenceID(const char
)
| \sa RemoveNthNodeReferenceID(int)
|
| SetAttribute(…)
| V.SetAttribute(string, string)
| C++: void SetAttribute(const char *name, const char *value)
|
| Set a name value pair attribute.
|
| Fires a vtkCommand::ModifiedEvent.
|
| Attributes are written in the XML. If value is 0, the attribute
| name is removed from the pair list.
|
| This function is a no-op if name is null or empty.
|
| \sa WriteXML()
|
| SetDescription(…)
| V.SetDescription(string)
| C++: virtual void SetDescription(const char *_arg)
|
| Text description of this node, to be set by the user.
|
| SetDisableModifiedEvent(…)
| V.SetDisableModifiedEvent(int)
| C++: void SetDisableModifiedEvent(int onOff)
|
| SetHideFromEditors(…)
| V.SetHideFromEditors(int)
| C++: virtual void SetHideFromEditors(int _arg)
|
| SetInMRMLCallbackFlag(…)
| V.SetInMRMLCallbackFlag(int)
| C++: void SetInMRMLCallbackFlag(int flag)
|
| SetName(…)
| V.SetName(string)
| C++: virtual void SetName(const char *_arg)
|
| Name of this node, to be set by the user
|
| SetNodeReferenceID(…)
| V.SetNodeReferenceID(string, string) → vtkMRMLNode
| C++: vtkMRMLNode *SetNodeReferenceID(const char *referenceRole,
| const char *referencedNodeID)
|
| Set a reference to a node with specified nodeID from this node
| for a specific referenceRole.
|
| SetNthNodeReferenceID(…)
| V.SetNthNodeReferenceID(string, int, string) → vtkMRMLNode
| C++: vtkMRMLNode *SetNthNodeReferenceID(const char *referenceRole,
| int n, const char *referencedNodeID)
|
| Set a N-th reference from this node with
| specifiedreferencedNodeID for a specific referenceRole.
|
| SetSaveWithScene(…)
| V.SetSaveWithScene(int)
| C++: virtual void SetSaveWithScene(int _arg)
|
| SetScene(…)
| V.SetScene(vtkMRMLScene)
| C++: virtual void SetScene(vtkMRMLScene *scene)
|
| This method is for internal use only.
| Use AddNode method of vtkMRMLScene to add a node to the scene.
|
| Internally calls SetSceneReferences()
| \sa SetSceneReferences()
|
| SetSceneReferences(…)
| V.SetSceneReferences()
| C++: virtual void SetSceneReferences()
|
| Update the references of the node to the scene.
|
| ote You must unsure that a valid scene is set before calling
| SetSceneReferences().
|
| SetSelectable(…)
| V.SetSelectable(int)
| C++: virtual void SetSelectable(int _arg)
|
| SetSelected(…)
| V.SetSelected(int)
| C++: virtual void SetSelected(int _arg)
|
| SetSingletonOff(…)
| V.SetSingletonOff()
| C++: void SetSingletonOff()
|
| SetSingletonOn(…)
| V.SetSingletonOn()
| C++: void SetSingletonOn()
|
| SetSingletonTag(…)
| V.SetSingletonTag(string)
| C++: virtual void SetSingletonTag(const char *_arg)
|
| Tag that make this node a singleton in the scene.
|
| If set to nullptr, multiple instances of this node class are
| allowed.
|
| If set to a non-nullptr string, the node will be a singleton and
| the scene will replace this node instead of adding new instances.
|
| The SingletonTag is used by the scene to build a unique ID.
|
| If the there can only be one instance of a given node class in
| the scene, then the singleton tag should be Singleton. For
| example, the interaction and selection nodes are named Selection
| and Interaction, with Singleton tags set to Singleton, and with
| IDs set to vtkMRMLSelectionNodeSingleton and
| vtkMRMLInteractionNodeSingleton. If the singleton node is
| associated with a specific module it should use the module name,
| which already needs to be unique, as the tag. The Editor module
| uses this naming convention, with a parameter node that has a
| singleton tag of Editor and a node ID of
| vtkMRMLScriptedModuleNodeEditor. If the there is more than one
| instance of the node class then the singleton tag should be
| Singleton post-pended with a unique identifier for that specific
| node (e.g. the name). Any new color nodes should use this
| convention, with a name of NewName, a Singleton tag of
| SingletonNewName, leading to an ID of
| vtkMRMLColorTableNodeSingletonNewName. The existing MRML nodes
| don’t always use these conventions but are kept unchanged for
| backward compatibility.
| \sa vtkMRMLScene::BuildID
|
| SetUndoEnabled(…)
| V.SetUndoEnabled(bool)
| C++: virtual void SetUndoEnabled(bool _arg)
|
| StartModify(…)
| V.StartModify() → int
| C++: virtual int StartModify()
|
| Start modifying the node. Disable Modify events.
|
| Returns the previous state of DisableModifiedEvent flag that
| should be passed to EndModify() method.
|
| \sa EndModify()
|
| URLDecodeString(…)
| V.URLDecodeString(string) → string
| C++: const char *URLDecodeString(const char *inString)
|
| Decode a URL string.
|
| Returns the string (null) if the input is null.
|
| ote Currently only works on %, space, ', ", <, >
| \sa URLEncodeString()
|
| URLEncodeString(…)
| V.URLEncodeString(string) → string
| C++: const char *URLEncodeString(const char *inString)
|
| Encode a URL string.
|
| Returns the string (null) if the input is null.
|
| ote Currently only works on %, space, ', ", <, >
| \sa URLDecodeString()
|
| UndoEnabledOff(…)
| V.UndoEnabledOff()
| C++: virtual void UndoEnabledOff()
|
| UndoEnabledOn(…)
| V.UndoEnabledOn()
| C++: virtual void UndoEnabledOn()
|
| UpdateReferenceID(…)
| V.UpdateReferenceID(string, string)
| C++: virtual void UpdateReferenceID(const char *oldID,
| const char *newID)
|
| Update the stored reference to another node in the scene.
|
| UpdateReferences(…)
| V.UpdateReferences()
| C++: virtual void UpdateReferences()
|
| The method should remove all pointers and observations to all
| nodes
| that are not in the scene anymore.
|
| This method is called when one or more referenced nodes are
| deleted from the scene.
|
| UpdateScene(…)
| V.UpdateScene(vtkMRMLScene)
| C++: virtual void UpdateScene(vtkMRMLScene *)
|
| Updates other nodes in the scene depending on this node or
| updates this node if it depends on other nodes when the scene is
| read in This method is called automatically by XML parser after
| all nodes are created
|
| XMLAttributeDecodeString(…)
| V.XMLAttributeDecodeString(string) → string
| C++: std::string XMLAttributeDecodeString(
| const std::string &inString)
|
| Decode an XML attribute string.
|
| Important: attributes that vtkMRMLNode::ReadXMLAttributes method
| receives are already decoded, therefore no XML attribute decoding
| must not be applied to those strings.
|
| \sa XMLAttributeEncodeString()
|
| XMLAttributeEncodeString(…)
| V.XMLAttributeEncodeString(string) → string
| C++: std::string XMLAttributeEncodeString(
| const std::string &inString)
|
| Encode an XML attribute string (replaces special characters by
| code sequences)
|
| \sa XMLAttributeDecodeString()
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from MRMLCorePython.vtkMRMLNode:
|
| HierarchyModifiedEvent = 16000
|
| IDChangedEvent = 16001
|
| ReferenceAddedEvent = 16002
|
| ReferenceModifiedEvent = 16003
|
| ReferenceRemovedEvent = 16004
|
| ReferencedNodeModifiedEvent = 16005
|
| ----------------------------------------------------------------------
| Methods inherited from vtkCommonCorePython.vtkObject:
|
| AddObserver(…)
| V.AddObserver(int, function) → int
| C++: unsigned long AddObserver(const char *event,
| vtkCommand *command, float priority=0.0f)
|
| Add an event callback function(vtkObject, int) for an event type.
| Returns a handle that can be used with RemoveEvent(int).
|
| BreakOnError(…)
| V.BreakOnError()
| C++: static void BreakOnError()
|
| This method is called when vtkErrorMacro executes. It allows the
| debugger to break on error.
|
| DebugOff(…)
| V.DebugOff()
| C++: virtual void DebugOff()
|
| Turn debugging output off.
|
| DebugOn(…)
| V.DebugOn()
| C++: virtual void DebugOn()
|
| Turn debugging output on.
|
| GetCommand(…)
| V.GetCommand(int) → vtkCommand
| C++: vtkCommand *GetCommand(unsigned long tag)
|
| Allow people to add/remove/invoke observers (callbacks) to any
| VTK object. This is an implementation of the subject/observer
| design pattern. An observer is added by specifying an event to
| respond to and a vtkCommand to execute. It returns an unsigned
| long tag which can be used later to remove the event or retrieve
| the command. When events are invoked, the observers are called in
| the order they were added. If a priority value is specified, then
| the higher priority commands are called first. A command may set
| an abort flag to stop processing of the event. (See vtkCommand.h
| for more information.)
|
| GetDebug(…)
| V.GetDebug() → bool
| C++: bool GetDebug()
|
| Get the value of the debug flag.
|
| GetGlobalWarningDisplay(…)
| V.GetGlobalWarningDisplay() → int
| C++: static int GetGlobalWarningDisplay()
|
| This is a global flag that controls whether any debug, warning or
| error messages are displayed.
|
| GetMTime(…)
| V.GetMTime() → int
| C++: virtual vtkMTimeType GetMTime()
|
| Return this object’s modified time.
|
| GlobalWarningDisplayOff(…)
| V.GlobalWarningDisplayOff()
| C++: static void GlobalWarningDisplayOff()
|
| This is a global flag that controls whether any debug, warning or
| error messages are displayed.
|
| GlobalWarningDisplayOn(…)
| V.GlobalWarningDisplayOn()
| C++: static void GlobalWarningDisplayOn()
|
| This is a global flag that controls whether any debug, warning or
| error messages are displayed.
|
| HasObserver(…)
| V.HasObserver(int, vtkCommand) → int
| C++: vtkTypeBool HasObserver(unsigned long event, vtkCommand *)
| V.HasObserver(string, vtkCommand) → int
| C++: vtkTypeBool HasObserver(const char *event, vtkCommand *)
| V.HasObserver(int) → int
| C++: vtkTypeBool HasObserver(unsigned long event)
| V.HasObserver(string) → int
| C++: vtkTypeBool HasObserver(const char *event)
|
| Allow people to add/remove/invoke observers (callbacks) to any
| VTK object. This is an implementation of the subject/observer
| design pattern. An observer is added by specifying an event to
| respond to and a vtkCommand to execute. It returns an unsigned
| long tag which can be used later to remove the event or retrieve
| the command. When events are invoked, the observers are called in
| the order they were added. If a priority value is specified, then
| the higher priority commands are called first. A command may set
| an abort flag to stop processing of the event. (See vtkCommand.h
| for more information.)
|
| InvokeEvent(…)
| V.InvokeEvent(int, void) → int
| C++: int InvokeEvent(unsigned long event, void *callData)
| V.InvokeEvent(string, void) → int
| C++: int InvokeEvent(const char *event, void *callData)
| V.InvokeEvent(int) → int
| C++: int InvokeEvent(unsigned long event)
| V.InvokeEvent(string) → int
| C++: int InvokeEvent(const char *event)
|
| This method invokes an event and return whether the event was
| aborted or not. If the event was aborted, the return value is 1,
| otherwise it is 0.
|
| RemoveAllObservers(…)
| V.RemoveAllObservers()
| C++: void RemoveAllObservers()
|
| RemoveObserver(…)
| V.RemoveObserver(vtkCommand)
| C++: void RemoveObserver(vtkCommand *)
| V.RemoveObserver(int)
| C++: void RemoveObserver(unsigned long tag)
|
| Allow people to add/remove/invoke observers (callbacks) to any
| VTK object. This is an implementation of the subject/observer
| design pattern. An observer is added by specifying an event to
| respond to and a vtkCommand to execute. It returns an unsigned
| long tag which can be used later to remove the event or retrieve
| the command. When events are invoked, the observers are called in
| the order they were added. If a priority value is specified, then
| the higher priority commands are called first. A command may set
| an abort flag to stop processing of the event. (See vtkCommand.h
| for more information.)
|
| RemoveObservers(…)
| V.RemoveObservers(int, vtkCommand)
| C++: void RemoveObservers(unsigned long event, vtkCommand *)
| V.RemoveObservers(string, vtkCommand)
| C++: void RemoveObservers(const char *event, vtkCommand *)
| V.RemoveObservers(int)
| C++: void RemoveObservers(unsigned long event)
| V.RemoveObservers(string)
| C++: void RemoveObservers(const char *event)
|
| Allow people to add/remove/invoke observers (callbacks) to any
| VTK object. This is an implementation of the subject/observer
| design pattern. An observer is added by specifying an event to
| respond to and a vtkCommand to execute. It returns an unsigned
| long tag which can be used later to remove the event or retrieve
| the command. When events are invoked, the observers are called in
| the order they were added. If a priority value is specified, then
| the higher priority commands are called first. A command may set
| an abort flag to stop processing of the event. (See vtkCommand.h
| for more information.)
|
| SetDebug(…)
| V.SetDebug(bool)
| C++: void SetDebug(bool debugFlag)
|
| Set the value of the debug flag. A true value turns debugging on.
|
| SetGlobalWarningDisplay(…)
| V.SetGlobalWarningDisplay(int)
| C++: static void SetGlobalWarningDisplay(int val)
|
| This is a global flag that controls whether any debug, warning or
| error messages are displayed.
|
| ----------------------------------------------------------------------
| Methods inherited from vtkCommonCorePython.vtkObjectBase:
|
| FastDelete(…)
| V.FastDelete()
| C++: virtual void FastDelete()
|
| Delete a reference to this object. This version will not invoke
| garbage collection and can potentially leak the object if it is
| part of a reference loop. Use this method only when it is known
| that the object has another reference and would not be collected
| if a full garbage collection check were done.
|
| GetAddressAsString(…)
| V.GetAddressAsString(string) → string
| C++: const char *GetAddressAsString()
|
| Get address of C++ object in format ‘Addr=%p’ after casting to
| the specified type. You can get the same information from o.this.
|
| GetClassName(…)
| V.GetClassName() → string
| C++: const char *GetClassName()
|
| Return the class name as a string.
|
| GetReferenceCount(…)
| V.GetReferenceCount() → int
| C++: int GetReferenceCount()
|
| Return the current reference count of this object.
|
| InitializeObjectBase(…)
| V.InitializeObjectBase()
| C++: void InitializeObjectBase()
|
| Register(…)
| V.Register(vtkObjectBase)
| C++: virtual void Register(vtkObjectBase *o)
|
| Increase the reference count by 1.
|
| SetReferenceCount(…)
| V.SetReferenceCount(int)
| C++: void SetReferenceCount(int)
|
| Sets the reference count. (This is very dangerous, use with
| care.)
|
| UnRegister(…)
| V.UnRegister(vtkObjectBase)
| C++: virtual void UnRegister(vtkObjectBase *o)
|
| Decrease the reference count (release by another object). This
| has the same effect as invoking Delete() (i.e., it reduces the
| reference count by

This looks good, your can now search for Dice in this output to find the relevant methods.

1 Like

Thank you very much,
I found 3 sections on ‘dice’ but then how do I use this to calculate pls.

Create instance of a GAD node. | | DiceResultsValidOff(…) | V.DiceResultsValidOff() | C++: virtual void DiceResultsValidOff() | | DiceResultsValidOn(…) | V.DiceResultsValidOn() | C++: virtual void DiceResultsValidOn() |

| | Get volume of the compare structure | | GetDiceCoefficient(…) | V.GetDiceCoefficient() → float | C++: virtual float GetDiceCoefficient() | | Get result dice coefficient | | GetDiceResultsValid(…) | V.GetDiceResultsValid() → bool | C++: virtual bool GetDiceResultsValid() | | Get/Set Dice results valid flag | | GetDiceTableNode(…) | V.GetDiceTableNode() → vtkMRMLTableNode | C++: vtkMRMLTableNode *GetDiceTableNode() | | Get Dice table node | | GetFalseNegativesPercent(…) | V.GetFalseNegativesPercent() → float | C++: virtual double GetFalseNegativesPercent() | | Get percentage of false negative labelmap voxels | | GetFalsePositivesPercent(…) | V.GetFalsePositivesPercent() → float | C++: virtual double GetFalsePositivesPercent() | | Get percentage of false positive labelmap voxels

| | Set compare segmentation node | | SetAndObserveDiceTableNode(…) | V.SetAndObserveDiceTableNode(vtkMRMLTableNode) | C++: void SetAndObserveDiceTableNode(vtkMRMLTableNode *node) | | Set Dice table node | | SetAndObserveHausdorffTableNode(…) | V.SetAndObserveHausdorffTableNode(vtkMRMLTableNode) | C++: void SetAndObserveHausdorffTableNode(vtkMRMLTableNode *node)

All good, Thanks very much
diceMetrics = paramNode.GetDiceCoefficient() worked

1 Like