PlanarFreehandROITool as segmentation tool

Hey! I’d like to have simple (continuous) line segmentation for OCT dicom files. PlanarFreehandROITool might be sufficient for me but I’m curious if I can use it out-of-the box as segmentation tool. Or what I need to modify to make it work, is there some documentation available for that? I didn’t have luck looking into OHIF docs so far.

Any feedback/suggestions are welcomed, thanks for great tool!

@alireza do you have maybe some hints for that?

We already have this it is called planar PlanarFreehandContourSegmentationTool

see this

https://www.cornerstonejs.org/live-examples/planarfreehandcontoursegmentationtool

There are other examples here too Examples | Cornerstone.js


If you are talking about in OHIF, we will add it sometime in future, but you should be able to do so yourself right now

Hey @alireza thanks for input!

Yes I was talking about ohif. Can you maybe point me to some links or give me few hints how to add such a tool to ohif?

Thank you!

You need to create a new method in the Segmentation Service, similar to createLabelmapForDisplaySet, but for contours. You can refer to examples here:

https://www.cornerstonejs.org/live-examples/planarfreehandcontoursegmentationtool

Next, assign it to a button or another element to create an empty contour map.

After that, add our tools. You can see how we add our brush tools.

Then, assign these tools to buttons. You can find examples of how we do this in the toolbar in the file modes/segmentation/src/segmentationButtons.ts.

That should cover everything.