qurit / rt-utils

A minimal Python library to facilitate the creation and manipulation of DICOM RTStructs.
MIT License
180 stars 56 forks source link

RtStruct saved from nifti appears rotated. #102

Open rtdicomexplorer opened 5 months ago

rtdicomexplorer commented 5 months ago

Hello everyone, I'm trying to export a nii segmentation file in a RTSTRUCT-DICOM file. The ROIs in DICOM appear rotated. The dataset I have from https://nbia.cancerimagingarchive.net (CT/ Whole Body). The CTs with the created RTSTRUCT I have loaded into https://dicom-web-viewer-b4139.web.app/ (they must be in the same folder) I've attached the screenshots and the nii segmentation file. vertebre.nii.gz screen2d screen3d

Anyway, Great Job

Michel

Nilser3 commented 5 months ago

Hi @rtdicomexplorer
I had the same problem:

image

To explore: https://github.com/qurit/rt-utils/issues/84

I appreciate your comments 😊 @asim-shrestha @awtkns

Best,

Nilser

rtdicomexplorer commented 5 months ago

Hi Nils Laines Medina,

I found a workaround that works for me:

I had to rotate the the mask-data-array more times as below:

mask_dataflip = np.flipud(mask_data) mask_dataflip2 = np.flip(mask_dataflip) mask_rtdata = np.rot90(mask_dataflip2)

In my case the Patient had a HFS position. I will test that also for other cases.

Regards.., Michel

Am Mi., 7. Feb. 2024 um 15:24 Uhr schrieb Nilser Laines Medina < @.***>:

Hi @rtdicomexplorer https://github.com/rtdicomexplorer I had the same problem:

  • anat_image: DICOM native (RAI orientation)
  • brain mask: rtstruct file crated from anat_image.nii.gz (using dcm2niix) (I had test different orientations for input)

image.png (view on web) https://github.com/qurit/rt-utils/assets/77469192/6cd39535-c71b-4c4f-a6dc-5109155d2eda

To explore: #84 https://github.com/qurit/rt-utils/issues/84

I appreciate your comments 😊 @asim-shrestha https://github.com/asim-shrestha @awtkns https://github.com/awtkns

Best,

Nilser

β€” Reply to this email directly, view it on GitHub https://github.com/qurit/rt-utils/issues/102#issuecomment-1932156097, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXTWLKSHMKUTCILVANCUS3YSOFAXAVCNFSM6AAAAABB5BB4ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZSGE2TMMBZG4 . You are receiving this because you were mentioned.Message ID: @.***>

awtkns commented 5 months ago

Tagging @carluri @qurit-frizi for visibility. Unfortunately @asim-shrestha and I are no longer maintainers of this project.

FabianHoerst commented 1 month ago

Is there a fix?

rtdicomexplorer commented 4 weeks ago

I think that as NIFTI will be saved automatically in RAS orientation..

regards πŸ˜‰

[image: image.png]

Am Do., 6. Juni 2024 um 15:53 Uhr schrieb Fabian HΓΆrst < @.***>:

Is there a fix?

β€” Reply to this email directly, view it on GitHub https://github.com/qurit/rt-utils/issues/102#issuecomment-2152599772, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASXTWLPUGCUFN22DNNR3YZTZGBSXFAVCNFSM6AAAAABB5BB4ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJSGU4TSNZXGI . You are receiving this because you were mentioned.Message ID: @.***>