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 can I convert DCM to NRRD with SimpleITK? #361

Closed
QiChen2014 opened this issue Mar 16, 2018 · 8 comments
Closed

How can I convert DCM to NRRD with SimpleITK? #361

QiChen2014 opened this issue Mar 16, 2018 · 8 comments

Comments

@QiChen2014
Copy link

QiChen2014 commented Mar 16, 2018

Hi everyone!
I'm trying to use the PyRadiomics to extract features from a serious DICOM images(2D), and I have two questions.

  1. As the document says, PyRadiomics can not process the DCM image directly, so I translate my data from DCM to NRRD by simpleITK, code like this:
    `
    reader = sitk.ImageSeriesReader()

    dicomReader = reader.GetGDCMSeriesFileNames(inputPath) #input is the DCM file path

    reader.SetFileNames(dicomReader)

    dicoms = reader.Execute()

    sitk.WriteImage(dicoms, fileName) #fileName like "brain.nrrd"
    `
    Then, I input a NRRD file as img, which generated by above codes, and a nii(NIFTI) file as mask, it works! But I'm not sure if this is feasible, what do you think?

  2. How to determine the appropriate parameters to extract good features? Do you have any good suggestions?

Thanks a lot.
Qi Chen

@fedorov
Copy link
Collaborator

fedorov commented Mar 16, 2018

The approach you use may not result in geometrically ordered slices. You can use existing tools, such as dcm2niix or plastimatch to convert a DICOM series into a volume. Prior to running the converter, you will need to ensure the input DICOM folder contains just one series, and that series is a scalar volume.

@QiChen2014
Copy link
Author

@fedorov Thank you for your reply. Can PyRadiomics process nii directly?

@fedorov
Copy link
Collaborator

fedorov commented Mar 16, 2018

Yes

@QiChen2014
Copy link
Author

OK,I got it. Thanks again!

@muween
Copy link

muween commented Nov 30, 2018

Yes

The approach you use may not result in geometrically ordered slices. You can use existing tools, such as dcm2niix or plastimatch to convert a DICOM series into a volume. Prior to running the converter, you will need to ensure the input DICOM folder contains just one series, and that series is a scalar volume.

After I used dcm2nii to convert a DICOM series into a nii volume, the direction changed and led to mismatch between the image and segmentation. My image is DICOM and segmentation is Nifti, I want to process them in Nii format. Why the problem happened?

@fedorov
Copy link
Collaborator

fedorov commented Nov 30, 2018

The only way to investigate this is to look at the dataset where you observed this issue.

@zexllin
Copy link

zexllin commented Oct 16, 2019

how to use stk-snap to make mask?when I segmentate dcm format file used to pyradiomics。

@JoostJM
Copy link
Collaborator

JoostJM commented Oct 16, 2019

@zexllin, I myself use 3D Slicer for segmenting images, so I'm afraid I can't really help you with ITK snap. Still, here is a tutorial for ITK snap that may be able to answer your question.

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

5 participants