Skip to content

Commit

Permalink
BF: Insert extract dump on non compliant files (#85)
Browse files Browse the repository at this point in the history
* Allow spec2nii dump insert and extract to work on no compliant files.

* Update nidti-mrs version requirment.

* prep for release
  • Loading branch information
wtclarke authored Jul 28, 2023
1 parent 7c2013b commit 7f3c577
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
This document contains the Spec2nii release history in reverse chronological order.

0.6.11 (WIP)
0.6.11 (Friday 28th July 2023)
------------------------------
- Fixed a bug in Philips spar/sdat orientations - this will affect voxels with rotations in more than one axes.
- Fixed a bug in Philips DICOM orientations - this will affect voxels with rotations in more than one axes.
- Python 3.7 now in [end of life](https://devguide.python.org/versions/) status and is no longer supported.
- `spec2nii dump/extract/insert` can now be used to inspect and fix non-compliant NIfTI-MRS files.

0.6.10 (Monday 10th July 2023)
------------------------------
Expand Down
2 changes: 1 addition & 1 deletion requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dependencies:
- scipy
- brukerapi>=0.1.8
- pandas
- nifti-mrs>=1.0.0
- nifti-mrs>=1.0.2
6 changes: 3 additions & 3 deletions spec2nii/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def dump_headers(args):
:param args: Command line arguments
"""
# Load file
nifti_mrs_img = NIFTI_MRS(args.file)
nifti_mrs_img = NIFTI_MRS(args.file, validate_on_creation=False)

# Print NIfTI header
print('NIfTI header: ')
Expand All @@ -31,7 +31,7 @@ def extract_hdr_ext(args):
:param args: Command line arguments
"""
nifti_mrs_img = NIFTI_MRS(args.file)
nifti_mrs_img = NIFTI_MRS(args.file, validate_on_creation=False)

if args.outdir:
args.outdir.mkdir(exist_ok=True, parents=True)
Expand All @@ -58,7 +58,7 @@ def insert_hdr_ext(args):

# Load data
try:
nifti_mrs_img = NIFTI_MRS(args.file)
nifti_mrs_img = NIFTI_MRS(args.file, validate_on_creation=False)
nifti_mrs_img.hdr_ext = new_hdr

except NotNIFTI_MRS:
Expand Down

0 comments on commit 7f3c577

Please sign in to comment.