Giter VIP home page Giter VIP logo

Comments (6)

mr-jaemin avatar mr-jaemin commented on September 26, 2024 1

Please @neurolabusc review the proposal or the above commit. I will submit the PR once you gives okay.

from dcm2niix.

brice82 avatar brice82 commented on September 26, 2024 1

Hi @neurolabusc and @mr-jaemin,

If I may make a little suggestions, even though this is nice have this field in a human readable format, it is maybe not desired in every situation (and this is very GEHC specific).

As there is already some specific fields enable only when a certain compilation flag is enabled, maybe we can create a GEHC specific compile flag.

for example in

#ifdef MY_DEBUG

There is MY_DEBUG flag for some GEHC specific parameters.
Maybe, we could make a compile flag like GEHC_EXTRA_FIELD_FLAG to have in addition AcquisitionDurationGE, and also the already existing fields lke EchoSpacingMicroSecondsGE , NotPhysicalNumberOfAcquiredPELinesGE and NotPhysicalTotalReadOutTimeGE.

What do you think ? what that be reasonable ?

from dcm2niix.

neurolabusc avatar neurolabusc commented on September 26, 2024 1

My sense is to add these features to all version of dcm2niix, so different users do not get different details. I do think that we should not included redundant tags where they include the same informatin (AcquisitionDuration vs AcquisitionDurationGE), we should use private tags when they provide more precise information than public tags (0019,105A vs 0018,9073), and we should include sequence details in the JSON files if they may aid subsequent processing (EchoSpacingMicroSecondsGE , NotPhysicalNumberOfAcquiredPELinesGE and NotPhysicalTotalReadOutTimeGE). Happy to meet and build consensus if there is disagreement on these thoughts.

from dcm2niix.

neurolabusc avatar neurolabusc commented on September 26, 2024

@mr-jaemin I have two minor comments.

First, your premise is that the private tag 0019,105A is more accurate than the public tag 0018,9073. Therefore, I would ensure that the private tag always gets precedence. While tags are typically provided sequentially, this may not be the case for nested details. Therefore, I would change nii_dicom.cpp:

		case kAcquisitionDuration:
			if (!isSameFloatGE(d.acquisitionDuration, 0.0))
				break; //issue 808: give precedence to more precise measures
			//n.b. used differently by different vendors https://github.com/rordenlab/dcm2niix/issues/225
			d.acquisitionDuration = dcmFloatDouble(lLength, &buffer[lPos], d.isLittleEndian);
			break;

Second, I would not add the AcquisitionDurationGE field to nii_dicom_batch.cpp as it is completely redundant with AcquisitionDuration (though rounded so it stores precision).

If you implement my second comment, you will delete the sprintf() call from your pull request. I recognize that your usage of sprintf is safe, but please use snprintf() instead to remove distracting clang/LLVM compiler warnings. Specifically, clang will report warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. While @yhuang43 and the FreeSurfer team have added a few sprintf() calls, they all require the USING_DCM2NIIXFSWRAPPER compilation flag and therefore do not impact the regular compilation.

from dcm2niix.

mr-jaemin avatar mr-jaemin commented on September 26, 2024

@neurolabusc Thanks for your comments.

  • Good point to give precedence to more precise measures. Added some details
case kAcquisitionDuration:
   if (!isSameFloatGE(d.acquisitionDuration, 0.0))
      break; //issue 808: give precedence to more precise measures, e.g kAcquisitionDurationGE (0019,105a)
  • Agreed that MM:SS format (AcquisitionDurationGE) is completely redundant with AcquisitionDuration in seconds.
    • I personally find this human readable format (MM:SS) quite useful to check the scan time. Will think/discuss more.
    • Regardless, thanks for the snprintf() suggestion (didn't know this compiler issue)
    • Any suggestion? C++ string like std:string vs C-style string like this example, in general?

from dcm2niix.

mr-jaemin avatar mr-jaemin commented on September 26, 2024

Agreed. Since both DICOM and BIDS AcquisitionDuration are in seconds, I would remove a redundant AcquisitionDurationGE (MM:SS) tag.

submitted PR #810

In summary,

  • While GEHC doesn't report public tag (0018,9073) AcquisitionDuration yet,
  • GEHC private tag (0019,105A) reports AcquisitionDuration in micro-seconds:
    (0019,105a) FL 3.0118515e+08 # 4, 1 AcquisitionDuration
  • dcm2niix (v1.0.20240327+) extracts the private tag (0019,105A) which gets precedence over the (0018,9073)
  • Report in the JSON files
    "AcquisitionDuration": 301.185,

from dcm2niix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.