Comments (6)
Please @neurolabusc review the proposal or the above commit. I will submit the PR once you gives okay.
from dcm2niix.
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
dcm2niix/console/nii_dicom_batch.cpp
Line 2135 in e2ead4b
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.
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.
@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.
@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 withAcquisitionDuration
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.
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)
- What is `offset` and `Valid 0` HOT 7
- Suppress ROI1, ROI2, etc. in conversion HOT 1
- Add Return Codes other than 0 HOT 4
- git clone failure? HOT 2
- Error in bvec extraction when UIH diffusion data is converted to nifti HOT 3
- Problems with b2500 and b700 dwi data HOT 5
- GE slice timing error
- Incorrect 3D reconstruction for enhanced multi-frame MRI HOT 4
- Feature request: Instead of providing a source directory, would it be possible to provide dcm2niix a list of files to be processed? HOT 1
- Store DICOM field (0018,9093) NumberOfKSpaceTrajectories ? HOT 2
- XA30 myomaps BEATs triggers conversion warnings, unusable nifti HOT 6
- Different study/data time, -m option not working HOT 1
- XA-series missing minor version tracking in sidecar HOT 8
- Incorrect value of PhaseEncodingDirection on Siemens 3D T2w SPACE scans HOT 4
- Addition of MAGNITUDE to ImageType of Siemens data HOT 4
- Error in Mediso Dynamic PET Conversion HOT 1
- segmentation fault on s390x systems (big endian) HOT 2
- Add github pages demo for dcm2niix WASM with Niivue
- SIEMENS XA50 DIFFUSION DATA HOT 4
- PR813 issues
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcm2niix.