Skip to content

Commit

Permalink
Store mulbiband factor in NIfTI descrip field (e.g. "mb=2") https://w…
Browse files Browse the repository at this point in the history
  • Loading branch information
neurolabusc committed Oct 12, 2017
1 parent 686a9a8 commit ab1af98
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 276 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This software should run on macOS, Linux and Windows typically without requiring
- Compiles with recent releases of [OpenJPEG](https://github.com/neurolabusc/dcm_qa/issues/5#issuecomment-317443179) for JPEG2000 support.

23-June-2017
- [Ensure slice timing always encoded for Siemens EPI](https://github.com/neurolabusc/dcm_qa/issues/4#issuecomment-310707906)
- [Ensure slice timing always reported for Siemens EPI](https://github.com/neurolabusc/dcm_qa/issues/4#issuecomment-310707906)
- [Integrates validation](https://github.com/neurolabusc/dcm_qa)
- JSON fix (InstitutionName -> InstitutionAddress)

Expand Down
5 changes: 5 additions & 0 deletions console/nii_dicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,11 @@ int headerDcm2Nii2(struct TDICOMdata d, struct TDICOMdata d2, struct nifti_1_hea
h->dim_info = (3 << 4) + (1 << 2) + 2;
if (d.phaseEncodingRC =='C')
h->dim_info = (3 << 4) + (2 << 2) + 1;
if (d.CSA.multiBandFactor > 1) {
char dtxt[1024] = {""};
sprintf(dtxt, ";mb=%d", d.CSA.multiBandFactor);
strcat(txt,dtxt);
}
snprintf(h->descrip,80, "%s",txt);
if (strlen(d.imageComments) > 0)
snprintf(h->aux_file,24,"%s",d.imageComments);
Expand Down
3 changes: 2 additions & 1 deletion console/nii_dicom_batch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2438,6 +2438,7 @@ int saveDcm2Nii(int nConvert, struct TDCMsort dcmSort[],struct TDICOMdata dcmLis
free(imgM);
return EXIT_FAILURE;
}
checkSliceTiming(&dcmList[indx0], &dcmList[indx1]);
int sliceDir = 0;
if (hdr0.dim[3] > 1)sliceDir = headerDcm2Nii2(dcmList[dcmSort[0].indx],dcmList[dcmSort[nConvert-1].indx] , &hdr0, true);
//UNCOMMENT NEXT TWO LINES TO RE-ORDER MOSAIC WHERE CSA's protocolSliceNumber does not start with 1
Expand All @@ -2450,7 +2451,7 @@ int saveDcm2Nii(int nConvert, struct TDCMsort dcmSort[],struct TDICOMdata dcmLis
imgM = nii_flipZ(imgM, &hdr0);
sliceDir = abs(sliceDir); //change this, we have flipped the image so GE DTI bvecs no longer need to be flipped!
}
checkSliceTiming(&dcmList[indx0], &dcmList[indx1]);
//move before headerDcm2Nii2 checkSliceTiming(&dcmList[indx0], &dcmList[indx1]);
//nii_SaveBIDS(pathoutname, dcmList[dcmSort[0].indx], opts, dti4D, &hdr0, nameList->str[dcmSort[0].indx]);
nii_SaveBIDS(pathoutname, dcmList[dcmSort[0].indx], opts, &hdr0, nameList->str[dcmSort[0].indx]);
if (opts.isOnlyBIDS) {
Expand Down
274 changes: 0 additions & 274 deletions old_nii_SaveBIDS.cpp

This file was deleted.

0 comments on commit ab1af98

Please sign in to comment.