ivmartel / dwv

DICOM Web Viewer: open source zero footprint medical image library.
https://ivmartel.github.io/dwv/
GNU General Public License v3.0
1.63k stars 588 forks source link

Question about measurement when using multiplanar reconstruction. #1458

Closed LeoReubelt closed 8 months ago

LeoReubelt commented 12 months ago

I am using the draw, measure tool in a viewer that I am working on. It works great. But when I reorient the series as shown below, I don't understand the measurements.

I reorient using...

dwvAppRef.current.setDataViewConfig({
  '*': [
    {
      divId: divContainerId,
      orientation: orientation,
    },
  ],
});

And then when I measure, I get the following... Screenshot 2023-07-26 at 7 57 13 AM

But the 33.97 dimension is too small for the aspect ratio of the image. So I just wanted to know if that number is reflecting something else.

I have a pointer x,y display that i had a similar issue with. And I ended up multiplying the position by slice thickness over pixel spacing to bring it into alignment with the image aspect ratio. But I don't know if this is as intended or not.

In any case, for our purposes, I would like to change that dimension. Is there a way that I can change the calculated value? Or can I make my own measurement tool?

ivmartel commented 11 months ago

Maybe related to #1473: the measurements were not using the proper spacing. Can you try the latest code to see if it fixes your problem?

LeoReubelt commented 11 months ago

Thanks @ivmartel . I think i am on the latest version. 0.32.1? Or do you mean on the develop branch. I can try that if you want.

ivmartel commented 11 months ago

Yes please, the develop branch.

ivmartel commented 8 months ago

Closing for now, I hope the current code fixed your problem. Feel free to comment if you need.