Merged
Conversation
- Move some JSON handling out of cmd/mrinfo.cpp and into core/file/json_utils.* so that improvements are utilised consistently across "mrinfo -json_*" and "mrconvert -json_export". - For new functions in File::JSON, provide function argument to toggle reorientation of header keys that are dependent on image axis orientations, so that such data can be reoriented when loading / saving data alongside NIfTI images but not when wanting to see the data "as interpreted by MRtrix3". - mrinfo: Preclude use of -json_all if multiple input images are specified. - Improve formatting of output JSON files, by inferring the format of key-value data stored as plain text in image headers and honouring those formats when writing to the JSON object.
This was referenced Oct 21, 2019
This was referenced Dec 10, 2019
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Well that was tremendous fun. Details in 2d279b2. Related to attempting to resolve bids-apps/MRtrix3_connectome#59 via #1735.
master:{ "EchoTime": "0.028", "FlipAngle": "90", "MultibandAccelerationFactor": "1", "PhaseEncodingDirection": "j-", "RepetitionTime": "3.93", "SliceEncodingDirection": "k", "SliceTiming": [ [ 1.96500003, 0.0, 2.03250003, 0.0675000027, 2.09750009, 0.132499993, 2.1624999, 0.197500005, 2.22749996, 0.262499988, 2.29250002, 0.327499986, 2.3599999, 0.395000011, 2.42499995, 0.460000008, 2.49000001, 0.524999976, 2.55500007, 0.589999974, 2.61999989, 0.654999971, 2.68499994, 0.722500026, 2.75250006, 0.787500024, 2.81750011, 0.852500021, 2.88249993, 0.917500019, 2.94749999, 0.982500017, 3.01250005, 1.04999995, 3.07999992, 1.11500001, 3.14499998, 1.17999995, 3.21000004, 1.245, 3.2750001, 1.30999994, 3.33999991, 1.37750006, 3.40750003, 1.4425, 3.47250009, 1.50750005, 3.5374999, 1.57249999, 3.60249996, 1.63750005, 3.66750002, 1.70500004, 3.7349999, 1.76999998, 3.79999995, 1.83500004, 3.86500001, 1.89999998 ] ], "TotalReadoutTime": "0.0447", "comments": "ORIENTATION TEST (2016_10_05) [MR] ep2d_se AXIAL A-P\nstudy: BRI_PROTOCOLS VE11A Post 08-03-2016 SB.2002.060RS EPI - ROB - 20 [ ORIGINAL PRIMARY M ND NORM ]\nDOB: 01/01/1975\nDOS: 06/10/2016 14:09:38" }This branch:
{ "EchoTime": 0.028, "FlipAngle": 90, "MultibandAccelerationFactor": 1, "PhaseEncodingDirection": "j-", "RepetitionTime": 3.93, "SliceEncodingDirection": "k", "SliceTiming": [ 1.96500003, 0.0, 2.03250003, 0.0675000027, 2.09750009, 0.132499993, 2.1624999, 0.197500005, 2.22749996, 0.262499988, 2.29250002, 0.327499986, 2.3599999, 0.395000011, 2.42499995, 0.460000008, 2.49000001, 0.524999976, 2.55500007, 0.589999974, 2.61999989, 0.654999971, 2.68499994, 0.722500026, 2.75250006, 0.787500024, 2.81750011, 0.852500021, 2.88249993, 0.917500019, 2.94749999, 0.982500017, 3.01250005, 1.04999995, 3.07999992, 1.11500001, 3.14499998, 1.17999995, 3.21000004, 1.245, 3.2750001, 1.30999994, 3.33999991, 1.37750006, 3.40750003, 1.4425, 3.47250009, 1.50750005, 3.5374999, 1.57249999, 3.60249996, 1.63750005, 3.66750002, 1.70500004, 3.7349999, 1.76999998, 3.79999995, 1.83500004, 3.86500001, 1.89999998 ], "TotalReadoutTime": 0.0447, "comments": [ "ORIENTATION TEST (2016_10_05) [MR] ep2d_se AXIAL A-P", "study: BRI_PROTOCOLS VE11A Post 08-03-2016 SB.2002.060RS EPI - ROB - 20 [ ORIGINAL PRIMARY M ND NORM ]", "DOB: 01/01/1975", "DOS: 06/10/2016 14:09:38" ] }Note in
master:Quotation marks around numerical values;
Erroneous double-nesting of
SliceTiming(whichdwipreprocis currently assuming is present, hence Fixes to slice timing handling #1735 being tomaster);commentsbeing a single string containing newline characters, rather than an array of strings.Needs to go to
devsince it's behaviour-changing.