You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am testing a script that performs several registrations and calculates the similarity coefficients for each of them.
To do so, before each registration I clear the scene using slicer.mrmlScene.Clear(0), and here the issue arises: the similarity coefficients are calculated only for the first run and, after the clean-up, never again.
Reading the source of the module, I see that in the calculateSegmentSimilarity function, only the self.segmentComparisonNode node has a check of its current presence in the scene. This check is not performed for the self.diceTableNode node
which means that, after the clean-up, the module still thinks that those tables are in the scene but, after having calculated the coefficients, finds no table in which storing them.
This can be easily fixed by adding the same check on those two nodes: if self.diceTableNode is None or self.hausdorffTableNode.GetScene() is None:
and if self.hausdorffTableNode is None or self.hausdorffTableNode.GetScene() is None:
The text was updated successfully, but these errors were encountered:
I am testing a script that performs several registrations and calculates the similarity coefficients for each of them.
To do so, before each registration I clear the scene using
slicer.mrmlScene.Clear(0)
, and here the issue arises: the similarity coefficients are calculated only for the first run and, after the clean-up, never again.Reading the source of the module, I see that in the
calculateSegmentSimilarity
function, only theself.segmentComparisonNode
node has a check of its current presence in the scene. This check is not performed for theself.diceTableNode
nodeSegmentRegistration/ProstateMRIUSContourPropagation/ProstateMRIUSContourPropagation.py
Line 1096 in 4b19e2c
nor for the
self.hausdorffTableNode
nodeSegmentRegistration/ProstateMRIUSContourPropagation/ProstateMRIUSContourPropagation.py
Line 1100 in 4b19e2c
which means that, after the clean-up, the module still thinks that those tables are in the scene but, after having calculated the coefficients, finds no table in which storing them.
This can be easily fixed by adding the same check on those two nodes:
if self.diceTableNode is None or self.hausdorffTableNode.GetScene() is None:
and
if self.hausdorffTableNode is None or self.hausdorffTableNode.GetScene() is None:
The text was updated successfully, but these errors were encountered: