I am using python scrip to access Intersection operation from Logical Operators. I might did the script wrong. Using Logical Operators manually, the intersection between the orbit and the plate is:
I used segmentEditorNode.SetSelectedSegmentID(plateSegID) to set up the plate segment to be modified by the bone. I think I did this wrong. Can someone tell me how to properly set up the segment to be modified? This Segment editor — 3D Slicer documentation only shows setting up the modifier ID.
In the default Segment editor node, or if you show yours (segmentEditorWidget.show()), we can see that the geometry of ‘5 DummySeriesDesc!’ does not fit in the segmentation or output geometry.
@chir.set Thank you for the response and solution! I cropped the volume to save the space but did not notify that I over cropped it.
As you suggested, my script did work after disable segmentationNode.SetReferenceImageGeometryParameterFromVolumeNode(masterVolumeNode).
However, when I tried to load the original volume of the masterVolumeNode set up, it stilled showed the same effect of not generating a proper intersection (here is the volume that fits the segmentation)
It also output this error message. It still shows there is a geometry mismatch between inputImage and imageToAppend
[VTK] Generic Warning: In vtkOrientedImageDataResample.cxx, line 1126
[VTK] vtkOrientedImageDataResample::MergeImage failed: geometry mismatch between inputImage and imageToAppend
[VTK] vtkSegmentationModifier::SetBinaryLabelmapToSegment: Invalid input labelmap
[Qt] virtual void qSlicerSegmentEditorAbstractEffect::modifySegmentByLabelmap(vtkMRMLSegmentationNode *, const char *, vtkOrientedImageData *, qSlicerSegmentEditorAbstractEffect::ModificationMode, const int *, bool) : Failed to add modifier labelmap to selected segment
Perhaps I simply should not set up a master volume for intersection? I wonder if it is due to the two segments were converted back from surface models. I also acquired these samples segmented by other people. The Segment Editor did work well though even with the original unfitted master volume.