Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setBidsGE fails to recognize Gradient Echo EPI #790

Closed
mr-jaemin opened this issue Feb 13, 2024 · 4 comments
Closed

setBidsGE fails to recognize Gradient Echo EPI #790

mr-jaemin opened this issue Feb 13, 2024 · 4 comments

Comments

@mr-jaemin
Copy link
Collaborator

setBidsGE fails to recognize Gradient Echo EPI when (0040,0254) kProcedureStepDescription is non-empty

//research mode EP\RM does not discriminate between SE and GE (EP\SE and EP||GR)
	//solution: check procedureStepDescription
	//if (strstr(d->scanningSequence, "EP\\RM")) {
	reportProtocolBlockGE(d, filename, isVerbose);
	if (strstr(d->procedureStepDescription, "Gradient Echo")) {
		isGR = true;
		if (strstr(d->scanningSequence, "EP\\RM"))
			isEPGR = true;
	}
	if (strstr(d->procedureStepDescription, "Spin Echo")) {
		if (strstr(d->scanningSequence, "EP\\RM"))
			isEPSE = true;
	}

The routine reportProtocolBlockGE() include the following line

if (strlen(d->procedureStepDescription) < 2)
		strcpy(d->procedureStepDescription, seqName);

So, if DICOM tag (0040,0254) kProcedureStepDescription > 1
seqName such as Gradient Echo or Spin Echo will not be copied to procedureStepDescription

::autoBids:GE usedSeqName:'EPI' seqName:'epialtoff' internalSeqName:'EPI' seriesDesc:'rsfMRI_Run' scanSeq:'EP\RM' stepDesc:'MR30.1 prodrive2' bidsData:'' bidsSuffix:'_acq-EPIm6_dir-PA_run-7'

Could you have any concern with removing if (strlen(d->procedureStepDescription) < 2)?

I can share sample DICOM.

@mr-jaemin
Copy link
Collaborator Author

@neurolabusc Do you know whether the ProcedureStepDescription is a part of BIDS specs?
If not, we could ignore ProcedureStepDescription and replace with seqName, assuming we don't want to add another entry such as d->seqName for this.

@brice82

@neurolabusc
Copy link
Collaborator

@mr-jaemin what do you think about replacing

if (strlen(d->procedureStepDescription) < 2)
	strcpy(d->procedureStepDescription, seqName);

with

strcat(d->procedureStepDescription, seqName);

This should allow the subsequent test to discriminate spin from gradient echo if it is in either location.

@mr-jaemin
Copy link
Collaborator Author

@neurolabusc I and @brice82 are fine with this.

neurolabusc added a commit that referenced this issue Feb 14, 2024
@mr-jaemin
Copy link
Collaborator Author

@neurolabusc Thanks!

I confirmed that v1.0.20240202 addressed the issue.

yarikoptic added a commit to neurodebian/dcm2niix that referenced this issue Apr 29, 2024
* tag 'v1.0.20240202': (135 commits)
  Update submodules
  Refactor (rordenlab#791)
  gantry tilt tolerance (rordenlab#791)
  GE step description (rordenlab#790)
  PatientOrient -> Patient Position (rordenlab#786)
  Prevent shell expansion (rordenlab#789)
  Replace presumably accidental bitwise AND operations
  Update JasPer API calls for compatibility with newer versions of the library
  Update divest logic, reducing duplication and supporting new mode of operation
  Fix PhaseEncodingDirectionDisplayed for GE
  Update date
  GE Diffusion issue rordenlab#777 minor
  GE Diffusion issue rordenlab#777
  Kludge for issue 775 (rordenlab#775)
  add docstrings
  better python wrapper I/O
  issue 769: Mildly relax the check for bvec components > 1.
  PRs (rordenlab#745; rordenlab#768)
  Edge cases (rordenlab#763, rordenlab#749)
  Code spell
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants