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

How do we access the labelmaps2D? #276

Closed
ahlaughland opened this issue Nov 1, 2022 · 4 comments
Closed

How do we access the labelmaps2D? #276

ahlaughland opened this issue Nov 1, 2022 · 4 comments

Comments

@ahlaughland
Copy link

Thanks for Cornerstone as it makes the hard simple and the simple attainable!

I'm having trouble finding the labelmaps2D on the labelmap3D. I searched the Issues and didn't find any infos regarding labelmaps2D.

Here is the scenario I am in:

DCMJS requires that there is a labelmaps2D on the labelmap3D sent to it by cornerstone:
https://github.com/dcmjs-org/dcmjs/blob/9023d1eb9f722a68f117dedc5e9088a70d907f38/examples/createSegmentation/index.html#L155

I'm drawing a segment and getting the labelmapVolume:
const labelmaps3D = cornerstoneCore.cache.getVolume(segmentationId);

But when I pass the labelmaps3D to dcm.js:

const segBlob = dcmjs.adapters.Cornerstone.Segmentation.generateSegmentation(
            images,
            labelmaps3D,
            options
          );

It throws and error that labelmaps2D.length is undefined:
image

Dcm.js:
image

This is because there is/are no labelmaps2D on the labelmap:
image

How would I acquire the labelmaps2D required by dcm.js?

@sedghi
Copy link
Member

sedghi commented Nov 9, 2022

Hi, cornerstone3D does not have labelmap2D like cornerstone legacy had. Do you want to load a DICOM SEG? I have a big PR coming up to OHIF very soon that adds the support with OHIF v3 and cornerstone3D

@ahlaughland
Copy link
Author

ahlaughland commented Nov 10, 2022

Hi Sedghi. Yes we would like to load (and save) the DICOM SEG. Can you pass along a link to your PR or what branch you are merging it into?

Thanks again!

@sedghi
Copy link
Member

sedghi commented Nov 10, 2022

Yes, I will post it here for you

@ahlaughland
Copy link
Author

Hi Sedghi. I see you have created a PR for SEGs: OHIF/Viewers#3015

This is some amazing work and I am excited to review it an learn how the code works.

I will close this issue and track changes from the PR.

Thanks again!
-Andrew

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

2 participants