Comments (11)
I have updated the repository and readme with the masks for the NIFTI files. These provide a valid workaround for this issue (after converting the original DICOMs to NIFTI files using dcm2niix), and could be useful to fix the issue in and of itself.
from prostatex_masks.
Thank you for letting me know. I will look into it as soon as possible.
from prostatex_masks.
Sorry for the wait. The mask of finding3 for the ADC map in patient 0142 should now be fixed. I can confirm the issue of the "flipped" arrays for ADC as well, if you have already scripted a fix, can I ask you to perform a pull request and upload the corrected files (including the new mask for patient 0142). This would be of great help in speeding up the fix.
from prostatex_masks.
Thank you for the confirmation. I'll upload my project in a couple of months, and could perform a pull request then. For now i've only adjusted the bounding box, not the mask.
from prostatex_masks.
The issues with ADC maps are probably due to the process used to annotate lesions. DICOM files were first converted to the NII format using dcm2niix, segmented on ITKSNAP, then flipped back to the DICOM geometry using nibabel and numpy (flipping along the Y axis if I remember correctly).
At visual inspection on ITKSNAP these ROIs appear to be correctly positioned, but at closer inspection the issue with array orientation is present.
As a stopgap solution, I will upload the NII masks (not flipped) as they are surely correctly matched with the PROSTATEx files if converted to NII format using dcm2niix. If you could provide correctly reoriented masks with a future pull request, it would be greatly appreciated as currently I am pretty swamped and don't have much time to work on this issue actively.
from prostatex_masks.
I believe that you can reverse what dcm2niix did with
mask.transpose((1, 0, 2))[::-1, :, ::-1]
- swapping x and y
- reversing order on x (was y) and z
Here's an image of proof of concept with the image that enliden1 mentioned:
P.S. for people attempting to use dcm2nii, the exact command I used was:
dcm2niix -z y -v y -a y -o nii -f %i_%s ./dicom/train/downloads/PROSTATEx/
, this gives unique names and matches the PROSTATEx_masks for nii files.
from prostatex_masks.
Thank you for the contribution. I was flipping only one axis. I will test and implement this ASAP and upload the fixed files. I was waiting for the time to fix this issue prior to submitting the dataset to TCIA.
from prostatex_masks.
Unfortunately the issue is more complex. The proposed solution causes the mask not to correspond to the lesion anymore. Currently, the only way to ensure lesions are correctly segmented is to convert the DICOM files to NIFTI using dcm2niix (there are the options used by me: dcm2niix -d 9 -z y -9). The issue also affects T2 files (lesion annotations are not correctly placed on DICOM files).
On the bright side, I was able to understand from where the issue arose. In ITKSNAP the DICOM volume is flipped and matches the masks included in the repository. This behavior is not consistent with 3DSlicer, which shows the ROI as misplaced (in all cases, the original annotation, my original transposition to DICOM space, and the fix suggested by @wassname). I am unsure of what ITKSNAP does differently when displaying DICOM images, but this is the reason the issue was undetected previously (I usually employ ITKSNAP rather than 3DSlicer for quick visual check due to ease of loading files). I think it will be better to remove DICOM masks altogether for now and only leave NIFTI masks (which work consistently).
I do not want to rehost the PROSTATEx dataset in NIFTI format here, so each user will have to convert the images to this format independently.
If there are any further suggestions on how to solve the issue, they are very welcome.
from prostatex_masks.
For @wassname, your image overlay seems indeed correct, but I was unable to save it and not have the issue present in 3DSlicer (probably due to using the affine from the unflipped mask to save). Could you test your approach with lesion 1 from the first patient and upload the files? It is the case I am using for troubleshooting right now.
from prostatex_masks.
Sure I will have a look today
from prostatex_masks.
Here we are, this gist has links to my files, and example code to load them.
I also tried using your dcm2niix command dcm2niix -d 9 -z y -9
and it still works the same.
from prostatex_masks.
Related Issues (19)
- [Q] ProstateX-0025 & ProstateX-0113 HOT 4
- Unmatched size of prostate masks HOT 4
- ADC mask slice order is inverted/flipped according to the ADC dicom slices HOT 1
- Varying T2WI sequence used for drawing prostate/zonal masks and lesion masks HOT 1
- Request for radiomic feature extraction HOT 2
- Submit to TCIA? HOT 5
- download link of image nii files HOT 5
- Can a list of training and test sets be provided? HOT 1
- Can Pirads score of each findings be provided? HOT 1
- Question about the dataset
- A question about the marked lesion mask HOT 1
- Errors in several zone segmentation masks HOT 4
- Multi-parametric lesion segmentation HOT 3
- Further details about contouring HOT 2
- Radiologist scores for annotated lesions HOT 12
- How to cite? HOT 6
- Refinements to a subset of lesion masks HOT 7
- number of slices in masks is not always the same as number of slices in the scan HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prostatex_masks.