Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tables not creating again after deleting them #7

Open
ilVecc opened this issue Mar 24, 2022 · 0 comments
Open

Tables not creating again after deleting them #7

ilVecc opened this issue Mar 24, 2022 · 0 comments

Comments

@ilVecc
Copy link

ilVecc commented Mar 24, 2022

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


nor for the self.hausdorffTableNode 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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant