ReferenceLines (get all points to draw all reference lines)

  • I use OHIF version 3

In OHIF, the ReferenceLines tool allows you to draw a slice line relative to the active viewport and relative to the active image in the viewport. I want to display all possible slice lines relative to the active viewport instead of just one. But I don’t understand how to get all possible coordinates. For drawing with the drawLineSvg function. Please tell me how can I get coordinate values for each image.
Path to tool in cornerstone: src/node_modules/@cornerstonejs/tools/dist/esm/tools/ReferenceLinesTool.js

Hello @AslimTaslam and welcome to the OHIF community.

I am having a bit of trouble understanding what you are looking for. Could you please maybe sketch/draw an example of what you are trying to achieve and include it in a post? That would be great.

Or perhaps maybe you are looking for something like crosshairs?

Please let me know.

Right now this tool only shows one line per image when scrolling. I want to extend the referenceLines tool so that it draws all the possible lines at once, which are possible on every scroll of the series. In the Cornerston tool (referenceLines), the coordinates are calculated in the private _init method. And after all the necessary coordinates have been calculated, this line is drawn in the renderAnnotation method for each scroll of the series. I want to understand how can I calculate all possible coordinates in order to draw all lines at once for each possible series by extending this tool.

Thanks in advance for any help

Ok just to clarify further. In the left viewport, you want to draw a reference line for EVERY image of the stack in the active viewport on the right AND you want them ALL to appear when the viewport on the right is active. Is that correct? I suspect you might also want to indicate which of all the lines represents the current image displayed on the left.

Is this correct?

The image I attached has two viewports, there may be more. The main idea is to display all referenceLines for the active viewport in inactive viewports. Do you know how you can get the coordinates for each without changing the viewport?