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

conversion of DICOM Segmentation object to nifti file #218

Open
deepakri201 opened this issue Mar 6, 2023 · 2 comments
Open

conversion of DICOM Segmentation object to nifti file #218

deepakri201 opened this issue Mar 6, 2023 · 2 comments

Comments

@deepakri201
Copy link

Hi,

I'm interested in using highdicom to convert a DICOM Segmentation object to a nifti file (one per segment). I know that there are other converters available (dcmqi segimage2itkimage, pydicom-seg), but wanted to know if this was also an option using highdicom.

I've tried this from the documentation:
image
,but this does not return numpy arrays of the same dimensions as the underlying image data. It seems like I would have to extract any orientation information for each slice of the segmentation and create the volume myself in order for it to align with the image data.

Thanks!

Deepa

@deepakri201 deepakri201 changed the title conversion of DICOM Segmentation object to nifti file conversion of DICOM Segmentation object to nifti file Mar 6, 2023
@CPBridge
Copy link
Collaborator

CPBridge commented Mar 7, 2023

Hi @deepakri201, highdicom cannot convert directly to nifti but you should be able to do this via numpy and then nibabel/sitk.

You are using an old API for getting segments out of the segmentation dataset. Please refer to this similar issue for some hints on how to do this now: #202

@CPBridge
Copy link
Collaborator

CPBridge commented Mar 8, 2023

See the new docs in #219 for more information on this

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