Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Use Segmentation tools with Stack Viewport #712

Open
1isten opened this issue Jul 31, 2023 · 12 comments
Open

[Bug] Use Segmentation tools with Stack Viewport #712

1isten opened this issue Jul 31, 2023 · 12 comments

Comments

@1isten
Copy link

1isten commented Jul 31, 2023

Describe the Bug

This documentation link is broken:
https://www.cornerstonejs.org/docs/tutorials/basic-segmentation-tools/#read-more
image

https://www.cornerstonejs.org/live-examples/segmentationRendering.html
image

Steps to Reproduce

Checkout above link

The current behavior

The segmentation rendering example is broken, can't find any example of using segmentation tool for stack viewport.

The expected behavior

Please give an example of using segmentation tool for stack viewport. In my case, I render single dicom file from my local filesystem (using stack viewport like this example). But I can't figure out how to add segmentation tool then

OS

macOS 13.3

Node version

16.17.1

Browser

Chrome 115.0.5790.114

@sedghi
Copy link
Member

sedghi commented Aug 2, 2023

sorry about that it is wrong. I will edit it
Stack Viewport segmentation is not ready yet unfortunately but we are working on it

@1isten
Copy link
Author

1isten commented Aug 2, 2023

@sedghi So currently we can only use segmentation in volume viewport?

If that's the case, may I ask another question (sorry I'm not familiar with cornerstone...)

Can I create a volume viewport to display just a single dicom file from my local filesystem?

@sedghi
Copy link
Member

sedghi commented Aug 2, 2023

yes currently only in volume viewports. I haven't tried it it might work

@1isten
Copy link
Author

1isten commented Aug 2, 2023

May I know if it is possible to load a single local dicom file such as this example: https://www.cornerstonejs.org/live-examples/local.html, but use volume viewport instead of stack viewport?

@JiaBob
Copy link

JiaBob commented Aug 2, 2023

I also have such questions. The example shows how to load data from a server. What if I just want to load local dicom or nifti files? Could you also let me know how to create a server to provide such files? Thank you very much!

@sedghi
Copy link
Member

sedghi commented Aug 3, 2023

You can look into our dicomImageLoader package for more infor on how to load.

Nifti -> still in progress PR #696

DICOM ->

see for instance example here

 const imageIds = await createImageIdsAndCacheMetaData({
    StudyInstanceUID:
      '1.3.6.1.4.1.14519.5.2.1.7009.2403.334240657131972136850343327463',
    SeriesInstanceUID:
      '1.3.6.1.4.1.14519.5.2.1.7009.2403.226151125820845824875394858561',
    wadoRsRoot: 'https://d3t6nz73ql33tx.cloudfront.net/dicomweb',
  });

Then imageIds are the path to the data that is created by cornerstone3D. Read more about imageIds here

@sedghi
Copy link
Member

sedghi commented Aug 3, 2023

May I know if it is possible to load a single local dicom file such as this example: cornerstonejs.org/live-examples/local.html, but use volume viewport instead of stack viewport?

You can convert stack to volumes and vice versa if you need, look at this example

@sedghi
Copy link
Member

sedghi commented Aug 3, 2023

Could you also let me know how to create a server to provide such files? Thank you very much!

If you don't want to deal with all these you can look into OHIF which handles these complexities. For instance https://docs.ohif.org/configuration/dataSources/dicom-web#running-orthanc

@JiaBob
Copy link

JiaBob commented Aug 8, 2023

Thanks for your answers! It takes time to dive into them. Let me try.

@1isten
Copy link
Author

1isten commented Oct 11, 2023

Now I've used the orthanc server to retrieve metadata and successfully created the volume viewport to render some dicoms

But I found that even if the dicomweb server is used, cornerstone's volume viewport still cannot render some dicoms (such as US dicom files) which missing below tags:

  • 0020,0037 - ImageOrientationPatient
  • 0020,0032 - ImagePositionPatient
  • etc...

when those tags metadata is missing, creating volume viewport causes below error:
image

I think the error is raised because imagePlaneModule metadata is missing some required value:
image

So does that mean the volume viewport cannot be used for such dicom files or do you have any other solutions? @sedghi

Btw, may we know when Stack Viewport segmentation would be ready? Thanks

@sedghi
Copy link
Member

sedghi commented Oct 14, 2023

No you are correct, if that metadata is missing you can't reconstruct a volume.
We are pushing on making the stack segmentation work soon #666

@sedghi
Copy link
Member

sedghi commented Oct 14, 2023

#670

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants