Open prerakmody opened 1 week ago
This is expected behavior. Contours are based in 2D space, while labelmaps are 3D.
Thanks for the response.
Are there any plans in the roadmap to ensure that the 2D contours (which have an internal (x,y,z) representation ?) are also made visible in 3D space? Given that this is a feature available in commercial tools (e.g. MIM, ReLU, Eclipse, Raystation etc), having such a feature in open-source tools makes them more ecologically valid.
Maybe I can change this to a feature request?
Theoretically, you cannot display x, y, z coordinates and a plane without assuming some thickness for the point and the plane. It's impossible to make the plane pass through that exact Z coordinate due to floating-point errors. All these tools make certain assumptions.
We already have labelmaps, which are volumetric, and you can use brush tools and other editing tools to modify the segmentation mask. The ReLU example was interesting; if you watch closely, they have the labelmap (edged mask) and then generate a contour around it. This allows you to edit the contour, and the changes apply back to the labelmap.
I'm not sure about MIM, but the smooth edges on their segmentation suggest that the internal representation is labelmap-based (volume and voxel-based). However, rendering is likely done via contours. The same process occurs when the contour is updated: the voxel map is edited, and then the contour is regenerated, I assume
Alternatively, you can create surfaces from contours, cut through the surface, and display it as contours again. This is similar to what we have with our polyseg converters, although it's not yet mature enough.
Another approach is to generate or edit a contour, then run it through a contour-to-surface conversion. On other viewports, we could cut through that surface. This is certainly possible, although it requires at least two slices with the contour since we can't generate the surface from a single contour plane. This approach is most attractive to me in the short term, as we already have the infrastructure for it.
Describe the Bug
Task
ViewportType.ORTHOGRAPHIC
, making contours withPlanarFreehandContourSegmentationTool
and usingSegmentationRepresentations.Contour
, I am unable to see the contours reflected across different views (i.e. axial, sagittal, coronal). Check this netlify example1.ReferenceLines
(in green) to align the views togetherAlternative
BrushTool
and usingSegmentationRepresentations.Labelmap
I am able to see the labelmap across different contours. Check this other netlify example2.ReferenceLines
(in green) to align the views togetherVersions
Why is this important
Steps to Reproduce
Full code
visualiser/src
Basic code for both examples
(not in order)
Example 1 - with contours
Example 2 - with labelmap
The current behavior
Unable to view contours across orthographic views
But able to view labelmap across orthographic views
The expected behavior
Behaviour of contours should be similar to that of labelmap
OS
MacOS v14.2 (Sonoma)
Node version
20.8.0
Browser
Brave (Version 1.66.118)