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

ENH: harden transformToWorld of exported models #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mauigna06
Copy link
Contributor

Related #14

Copy link
Collaborator

@lassoan lassoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this will be good, just please address the inline comment.

OpenAnatomyExport/OpenAnatomyExport.py Show resolved Hide resolved
Copy link
Collaborator

@lassoan lassoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this will be good, I just added a few nitpicky comments.

You can make changes in Slicer using the web interface. A pull request is automatically created and tests are executed on it.

transformer.SetTransform(ras2lpsTransform)
transformer.SetInputConnection(outputModelNode.GetPolyDataConnection())
transformOutputModelToWorldRAS = vtk.vtkGeneralTransform()
transformOutputModelToWorldRAS.PostMultiply()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to come after the slicer.vtkMRMLTransformNode.GetTransformBetweenNodes(inputModelNode.GetParentTransformNode() call.

transformOutputModelToWorldRAS.PostMultiply()
slicer.vtkMRMLTransformNode.GetTransformBetweenNodes(inputModelNode.GetParentTransformNode(), None, transformOutputModelToWorldRAS)

transformOutputModelToWorldLPS = transformOutputModelToWorldRAS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really explain things. You could create a new vtkGeneralTransform instead just assigning a new name but that would be a bit overcomplicated,l. Probably using just the transformOutputModelToWorldLPS name and a good comment would be sufficient.

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

Successfully merging this pull request may close these issues.

2 participants