PerkLab / SlicerOpenAnatomy

3D Slicer extension for exporting Slicer scenes to use in the OpenAnatomy.org browser
14 stars 6 forks source link

Export markups planes #10

Open mauigna06 opened 1 year ago

mauigna06 commented 1 year ago

It would be nice if planes could be exported as they usually used in surgical planning to mark surgical margins

lassoan commented 1 year ago

Yes, it would be useful to export all markup types (planes, lines, point sets, etc.). It would be great if you could implement it. For example, you could create a temporary model node from the markup node here.

mauigna06 commented 1 year ago

I didn't find a trivial way to do this. A plane-markup rendering code is distributed on different actors, mappers and props. Do you have any tip on how to convert a (plane) markup to a model? In particular I would like to get the nice translucent opacity of the body of the planeNodes and their nice opaque outline with their corresponding colors

lassoan commented 1 year ago

You can create a plane mesh using vtkPlaneSource. You can get the corners by transforming the [+/-halfSize, +/-halfSize, 0, 1] point from the object coordinate system to world coordinate system by multiplying by GetObjectToWorldMatrix.

mauigna06 commented 1 year ago

Pull request opened: https://github.com/PerkLab/SlicerOpenAnatomy/pull/12