Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Convert the PROSTATEx-Seg-HiRes dataset to nii format.

License

NotificationsYou must be signed in to change notification settings

zagoli/ProstateX2nii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I used these scripts to convert thePROSTATEx-Seg-HiResDICOM dataset to a more friendly nii format. This dataset is not straightforward to convert for various reasons,for example, you can usedcm2niix to convert the mri images but not thesegmentations, there isn't a one-to-one relation between segmentation slices and mri slices and so on.Remember: this code is far from perfect, it's not well engineered, and it was written for personal necessity.For a much cleaner code with automated downloads of data and tools seethis gist.

Usage

  1. Download the dataset with classic directory names option (both mri and segmentations).

  2. Create a new folder (for example named ProstateX) with two sub-folders in it, one for the mri images and one for the segmentations.

  3. Place all the folders (ProstateX-0004, ecc...) in the respective sub-folder.Do this for both the mri images and the segmentations. Your folder structure should look like this (truncated for clarity):

    ProstateX├───mri│   ├───ProstateX-0004│   ├───ProstateX-0007│   ├───ProstateX-0009│   └───ProstateX-...└───seg    ├───ProstateX-0004    ├───ProstateX-0007    ├───ProstateX-0009    └───ProstateX-...
  4. Run rename_all_folders.py two times: the first time thedcm_path variableshould point to the mri sub-folder, the second time it should point to the segmentations sub-folder.

  5. Download thedcm2niix executable (dcm2niix.exe) and store itwhere you can use it.

  6. Run mri2nii.py adjusting the various paths in it.dcm_dataset_path shouldpoint to the mri sub-folder,nii_dataset_path to your preferred output folderandconverter to dcm2niix.exe.

  7. Run seg2nii.py adjusting the various paths in it.dcm_dataset_path shouldpoint to the segmentations sub-folder, andnii_dataset_path should pointto the same location as before.

  8. Enjoy the converted dataset!

About

Convert the PROSTATEx-Seg-HiRes dataset to nii format.

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp