Skip to content

Commit

Permalink
feat(checks): Add check to ensure MatrixSize and nifti_header.dim are…
Browse files Browse the repository at this point in the history
… consistent
  • Loading branch information
effigies committed May 31, 2024
1 parent 07d2ec8 commit 0181150
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/schema/rules/checks/mrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,18 @@ MRSNiftiConsistency:
checks:
- sidecar.ResonantNucleus == nifti_header.mrs.ResonantNucleus
- sidecar.SpectrometerFrequency == nifti_header.mrs.SpectrometerFrequency

MRSMatrixSize:
issue:
code: MRS_MATRIX_SIZE
message: |
MatrixSize metadata must match NIfTI header field `dim[1:4]`.
level: error
selectors:
- datatype == "mrs"
- nifti_header
- type(sidecar.MatrixSize) != "null"
checks:
- sidecar.MatrixSize[0] == nifti_header.dim[1]
- sidecar.MatrixSize[1] == nifti_header.dim[2]
- sidecar.MatrixSize[2] == nifti_header.dim[3]

0 comments on commit 0181150

Please sign in to comment.