tomdoel / pulmonarytoolkit

Lung medical image analysis and visualisation software for Matlab.
GNU General Public License v3.0
84 stars 57 forks source link

Nifti and compressed nifti, orientation support, load and save #52

Open ashkanpakzad opened 3 years ago

ashkanpakzad commented 3 years ago

Side note: Couldn't find a dev branch so chosen master as destination.

saving images as nifti resulted in orientation information to not be saved.

This meant that exported nifti images were not compatible with the original source image from which it was derived. Now added support so that orientation information from PTKDicomImage object is saved to the nifti header in NIFTI's RAS format. Also removed the flip on dimensions 1 and 2 as NIFTI stores data in opposite convention to DICOM.

Feature added to be to save and load compressed NIFTI files

Convenient to be able to directly work with compressed NIFTI files on disk rather than raw nifti as they can be several times smaller.