snish1
(Snish1)
October 19, 2020, 12:17pm
1
Operating system:Windows10
Slicer version:4.1120200930
Hi.
I am a novice and learning scripting slicer.
I copied lassoan’s ExtractSkin.py to Python Interactor and got Error for line 41:
surfaceMesh = segmentationNode.GetClosedSurfaceRepresentation(addedSegmentID)
Traceback (most recent call last):
File “”, line 1, in
TypeError: GetClosedSurfaceRepresentation() takes exactly 2 arguments (1 given)
Is there any preparation I need before running the example?
There were some updates to the way representation access was handled from segmentation nodes in 4.11. It looks like ExtractSkin.py hasn’t been updated.
If you replace the line with the following, it should work as intended:
surfaceMesh = segmentationNode.GetClosedSurfaceInternalRepresentation(addedSegmentID)
1 Like
lassoan
(Andras Lasso)
October 19, 2020, 1:21pm
3
Thanks @Sunderlandkyl , I’ve updated the script.
1 Like
snish1
(Snish1)
October 22, 2020, 2:47am
4
Thank you. It worked perfectly.
2 Likes