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

Adding a --version argument #280

Closed
cbedetti opened this issue Mar 11, 2019 · 1 comment
Closed

Adding a --version argument #280

cbedetti opened this issue Mar 11, 2019 · 1 comment

Comments

@cbedetti
Copy link

It could be a nice feature to have.
It's not difficult to parse automatically but if the output format of dcm2niix change, the parsing method will probably break.

@neurolabusc
Copy link
Collaborator

Do you want to try the latest commit to the development branch. Normally the verbose command is always followed by an argument (-v y or -v n). The latest commit changes the behavior, so if -v is the last argument it will output the version date on a separate line. The program will also terminate with the exit code "3", whereas prior versions (which did not have this feature) will exit with "0". This allows you to discriminate new versions from versions that pre-dated this feature. Alternatively, just parse the first line for the first occurrence of "v1." - I do not anticipate a v2 (or even a 1.1) ever, but this would indicate a dramatic break in the API.

$ ./dcm2niix -v
Chris Rorden's dcm2niiX version v1.0.20190308  GCC8.2.0 (64-bit MacOS)
v1.0.20190308
$ echo $?
3

yarikoptic added a commit to neurodebian/dcm2niix that referenced this issue May 6, 2020
* tag 'v1.0.20190410': (52 commits)
  Update dcm_qa submodule.
  Prevent MSVC compilation warnings
  Siemens PASL 3D BIDS tags (http://adni.loni.usc.edu/wp-content/uploads/2010/05/ADNI3_Basic_Siemens_Skyra_E11.pdf)
  Reduce Microsoft Visual Studio 14 warnings (rordenlab#288)
  Use fgets not getline (rordenlab#288)
  Fixes (rordenlab#286; rordenlab#287)
  Added missing space (coding standard).
  Supported dicom tag Accession Number (0008,0050). Struct TDICOMdata extended with accessionNumber property, modified dicom loader and supported exporting accession number into json file and using it as filename with %g modifier.
  Terminate when corrupted DICOM detected (rordenlab#283)
  Keep more characters for institution address (VR is ST)
  "dcm2niix -v" returns version (rordenlab#280)
  NRRD export supports oldmin/oldmax (http://teem.sourceforge.net/nrrd/format.html#oldmin)
  Assume 1.2.840.10008.1.2 if transfer syntax is empty
  Option to modify overwrite behavior (rordenlab#276)
  XA11 classic DICOM uses private tags for DWI (rordenlab#274)
  Detect Philips when manufacturer (0008,0070) has been erased (rordenlab#267)
  Detect discrepancies in PAR/REC slice thicknesses (rordenlab#273)
  New "-x i" option (https://www.nitrc.org/forum/forum.php?thread_id=9324&forum_id=4703)
  bvecs for Philips DWI using  0019,10bb, 0019,10bc
  Adjust negative MosaicRefAcqTimes (rordenlab#271)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants