InsightSoftwareConsortium / ITK-Wasm

High performance spatial analysis in a web browser and across programming languages and hardware architectures
https://wasm.itk.org
Apache License 2.0
198 stars 52 forks source link

NIFTI Reader issue #122

Closed katiamar63 closed 6 years ago

katiamar63 commented 6 years ago

I tried to use ITK Readers in VTK to read NIFTI images but I could not display them properly (I checked a few examples and none of them was displayed properly). So I tried to read these NIFTI with ParaView Glance and the result was the same as bad. So I checked these NIFTI in other viewers (ITK-Snap, 3D Slicer) and they were displayed properly.

Moreover, I converted this NIFTI file: https://nifti.nimh.nih.gov/nifti-1/data/avg152T1_LR_nifti.nii.gz to a few other formats using 3D slicer and then displayed results in ParaView:

  1. mnc - NOT DISPLAYING PROPERLY
  2. nrrd - OK
  3. vtk - NOT DISPLAYING PROPERLY
  4. mgz - OK

The most stunning for me is that when I try to read original NIFTI file it is not working, but after conversion to nrrd or mgz, it is displayed properly. I compared the meta-data in headers and values in data tables (get by getOutputData(), getPointData().getScalars().getData(), getExtent(), getRange() and so on) among all the above formats using Inspector Debugger. It seems that headers are identical, for all the cases, but the raw data tables are different in case of mnc, nifti and vtk (the remaining ones are identical and displayed properly). The images displayed improperly looked as they were shrinked onto one direction (projected on a single plane)

I am attaching examples of nifti files from public dbs Landman_3253_20110818_366806254_301_WIP_MPRAGE_SENSE_MPRAGE_SENSE.nii.gz avg152T1_LR_nifti.nii.gz

The examples are from: https://www.nitrc.org/projects/multimodal .

thewtex commented 6 years ago

Thanks, @katiamar63 .

It sounds like there is an issue with the zlib decompression.

I plan on looking at this issue over the next few weeks.

thewtex commented 6 years ago

The bug was actually a different issue, fixed in #130 and available in release 9.1.1.

katiamar63 commented 6 years ago

Well done guys!!! Many, many thanks to you

Best Andrzej

2018-06-13 16:25 GMT-04:00 Matt McCormick notifications@github.com:

The bug was actually a different issue, fixed in #130 https://github.com/InsightSoftwareConsortium/itk-js/pull/130 and available in release 9.1.1.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/InsightSoftwareConsortium/itk-js/issues/122#issuecomment-397073964, or mute the thread https://github.com/notifications/unsubscribe-auth/ADlLYND4On0lT0bVOpGUstmIKZDll47Lks5t8XUugaJpZM4TcgG1 .