-
Notifications
You must be signed in to change notification settings - Fork 229
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
json sidecar invalid UTF-8: "ReconstructionMethod": "ÿÿÿ", #476
Comments
@yarikoptic I really do not think conda should install from the development branch. Commits to this branch are only subjected to a minimal automatic QA and are not vetted by other users. I introduce experimental features to this branch. @dmd this specific issue should be fixed in the development branch. |
FWIW, indeed better then not to use development branch in conda releases. But how even that version came about? I don't see it now among tags here - the location where |
@neurolabusc Is it possible this was a tag that was uploaded and subsequently deleted? Looks like the url for tag and release archives is the same format, so I suspect it's hard for the conda-forge build bot to know the difference. I feel like I added that one (or maybe the auto-merge did?) so for the time being I guess we can manually check the repo to see if a new build is an official release. But I'd be curious to see if there's any other automated way to tell the two apart. A quick search doesn't come up with much (shirt of something complicated like firing off a GitHub action specifically on release), but I'll look again. |
OK, so this is another unintended consequence of generating a tag for the development branch noted in issues 470 and 467. It is unfortunate we are unable to restrict condo to the master branch, but going forward we will only generate tags for new stable releases. Given things have gotten out of sync, maybe we should issue the next stable release a few months early. @yarikoptic since you have large datasets and use dcm2niix in different ways from me, can you test out this current stable release. Likewise, @captainnova and @baxpr I would be grateful if you could provide confidence regarding the output. A lot of the changes in this release were driven by Philips enhanced DICOMs and BEP009. Unfortunately, I have very few exemplars of those formats. |
it is up to maintainer to decide what to upload. But IMHO just do not tag with release like tags in develop. Could have some
do you mean |
@yarikoptic Please test the latest commit to the dcm2niix development branch (currently v1.0.20210124). Consider this a release candidate for the next stable release.
|
there is no such tag, correct? so I should just take this one?
(doesn't sound right since you do not release from development branch typically IIRC)? |
ie, what should be the "version" for this thing if it doesn't have |
The version is the value reported when you run
|
from #467 (comment) I can say that you agreed that merging master into development is a good idea ;) FWIW:
Such a version does not uniquely identify the state, since it would be the same today and tomorrow (when e.g. you push new commits and ask me to retest again) thus making it impossible (without coming up with my own adhoc version) to upload some "perspective" packages anywhere while making them sortable etc. That is why I like
here, if
(local to me since I was doing merge locally, so nobody else would have that exact hexsha) and thus could mint a version for "development" neurodebian package such as |
@duettwe can you take a look here? |
@yarikoptic the development branch is not for mass distribution. I just wanted you to test it with your own data and routines, as you use the software in ways that I did not expect when developing this software. Your large dataset and routines can be used to validate the development branch prior to generating a new stable release. While each commit is tested against my own internal datasets, these do not explore edge cases. |
We tested some DICOM conversions on the most recent development branch (e32fb1b). Verifying with fsleyes, we could see that the NIFTIs appeared correct. |
Thanks @duettwe. To expand a bit, we checked a few specific things that we had trouble with in the past:
|
Hi, I am not sure if I should be commenting here or in issue #473, but when I tested the development branch with my local test script it broke all the GE filenames. The script uses dcm2niix -f 'M_%i_%t_%s_%d', i.e. it expects the output filenames to have (0008, 103e) SeriesDescription (or a filesystem safe version of it) in the %s slot. Instead the development branch is putting in (0018, 1030) ProtocolName. Which is exactly what #473 said it would do, but I don't understand why that's considered good. I'm not seeing GE swapping SeriesDescription and ProtocolName around, so I don't need dcm2niix to swap them itself. The series descriptions and protocol names look reasonable in the DICOM, i.e. the series descriptions describe the individual series, and (0018, 1030) ProtocolName describe the scan session. Examples: An axial dMRI, with GE's new interleave-b-values-within-volumes scheme: Since we would only use (0018, 1030) Protocol Name to name a directory of series (if at all), I greatly prefer dcm2niix's old behavior. Please let me know if I can help sort this out, or if we should continue this in #473. |
Interesting. To contribute some info about Philips on that - I believe Philips puts the series description (such as |
@baxpr , I can confirm that Philips puts the series description in both the usual (0008, 103e) spot and (0018, 1030), although I'd have to go hunting to find one with a WIP. To be honest our lab tends to ignore (0018, 1030), so creatively reinterpreting it doesn't bother us much. |
@andersonwinkler and @captainnova thanks for your feedback. Thanks to help from GE engineers including @mr-jaemin dcm2niix contains a lot more meta-data for users. I had decided to use the series description for protocol name due to samples like this one. However, swapping the series protocol name and series description does seem like a mistake. I think the latest commit should resolve this. Consider a conversion where the file name should be composed of the series number (%s), series description (%d) and the protocol name (%d):
Given a DICOM file with the tags:
Here is the filenames generated by versions of dcm2niix:
Coming from Siemens, I always use the meaningful protocol name (%p). But often for GE the description (%d) is more meaningful. So GE users like @captainnova have simply used the relevant name for their vendor. The latest commit does allow you to extract both series name and protocol name. I think this is the most parsimonious solution, but it will change file names for GE users who have previously used %p. |
Many thanks @neurolabusc! We have a wrapper around dcm2niix and in it I was swapping the two fields in the JSON, a step that will now be no longer needed. Many thanks (also to everyone who contributed). |
Thanks @neurolabusc! It passes our local test suite now. |
Thanks all for testing. Expect a new stable release shortly. |
Hello, i got the same error when installing with conda the latest version of heudiconv (which in turned installed dcm2niix from conda)
And when looking at the culprit
$ heudiconv --version
0.9.0
$ dcm2niix --version
Chris Rorden's dcm2niiX version v1.0.20201224 GCC9.3.0 x86-64 (64-bit Linux)
v1.0.20201224 |
My solution for now to remove latest conda remove --force dcm2niix
sudo apt install dcm2niix |
v1.0.20201224 was never meant for public consumption. There will be a new stable release shortly. |
Sure, just letting it out there for people installing |
Hello apologies for the new message as I know you are working on it, but i just want to mention that two new persons contacted me since the last message about the bug they are facing when installing @yarikoptic I don't know if it is possible meanwhile to temporarily indicate a different version of |
@neurorepro there will be a new stable release of dcm2niix when issue 493 is resolved. I am just waiting for @drmclem to confirm that we will now default to using the Philips precise scaling instead of the real world values when both exist. So I expect a new release in a couple of days. In addition to issue 491, the new stable release will make substantial changes. I would encourage the heudiconv team to test the latest version of the development branch, as there a number of changes:
|
@neurolabusc Great to know it's coming along very soon, thank you for the update ! |
@neurolabusc Will |
@dmd thanks to @kastman it is done. You can now get v1.0.20210317 from conda-forge |
* tag 'v1.0.20210317': (23 commits) CI: Travis updates submodules always from remote. Update dcm_qa_nih submodule. Remove diagnostic message help should describe accession number (rordenlab#496) Describe and provide kludge for mangled Canon DICOMs (rordenlab#495) Update Philips notes (rordenlab#493) Update dcm_qa submodule. Support Canon Enhanced DICOM (rordenlab#491) Use first recognized manufacturer tag (rordenlab#487) If mosaics where ANY volume is non-planar, save ALL volumes as 3D(rordenlab#481) Add notes Kludge to separate vNav files as 3D (rordenlab#481) Tell user to override merging (-m o) to separate coils, specific with fmrib usage that disrupts Siemens DCE processing (rordenlab#187) Forbid semicolon in filenames as Linux uses this for command concatenation and Windows function GetOpenFileName will truncate (rordenlab#425) report totalReadoutTime once EstimatedEffectiveEchoSpacing -> EffectiveEchoSpacing (rordenlab#480) GE Round factor for Total Readout Time Update explicit naming of DICOMs (rordenlab#252), GE file naming changes (rordenlab#476) Update issue templates GE TotalReadouTime, BEP009 fixes (rordenlab#476) ...
Describe the bug
In v1.0.20201224, but not in v1.0.20201102, the JSON sidecar contains a field containing invalid UTF-8:
To Reproduce
Steps to reproduce the behavior:
dcm2niix -o out anon.dcm
using the attached fileanon.dcm.zip
Expected behavior
A valid, BIDS-compatible JSON sidecar encoded as valid UTF-8.
Output Log
If applicable, output generated converting data.
** Version (please complete the following information):**
Is this the latest stable release? NO, it is v1.0.20201224 which is what
conda install -y -c conda-forge dcm2niix
providesIf the latest stable version fails, and you are using macOS or Linux. Does the latest commit on the development branch resolve your issue? YES ... the field is gone
The text was updated successfully, but these errors were encountered: