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

Fix regarding expected behavior of diff when finding image size #3

Open
wants to merge 501 commits into
base: master
Choose a base branch
from

Conversation

DanNBullock
Copy link
Member

As described in comment, this is probably due to presuming a particular orientation of input image. If the image has an alternative orientation (As described in the xform) negative values can be returned which interacts poorly with line 35.

Noah C. Benson and others added 30 commits August 16, 2016 10:48
Cleaned up the README.md and added Installation section
Added some helpful error messages
… to grab the FREESURFER_HOME or SUBJECTS_DIR when they are not set in the matlab environment; the shell is now launched interactively, so should always read the bash_profile
Fixed a minor bug in which a bash shell is launched non-interactively…
Reorganized the parameters and used inputParser for niftiAssignZeros.m
…s based. So, if you

pass in thisFile rather than thisFile.nii.gz we check for thisFile.nii.gz.  If it exists
we read it.  Otherwise we tell you that we couldn't find thisFile or thisFile.nii.gz.
….tck files0. Refactored fgRead.m using matlab fileparts to sort input.
Add features for testing MATLAB2014b and later
rosemary-le and others added 28 commits April 20, 2018 13:29
Minor bugs in rmSearchFit that was preventing ovals from being fit
Original code expected one "counts:" field in a mrtrix .tck header.  This is problematic when using the mrtrix command cat_tracks to combine .tcks, which appends an additional "counts:" field to the end of the .tck header. Change is to just grab the max index and passing that through.
Update dtiImportFibersMrtrix.m
use of false() as a means of getting an array of zeros on sz resulted in an empty dimension when a negative is passed in.  The previous structure seemed to be predicated on a presumption of either RAS or LPI.  Use of Abs(sz) ensures that the actual dimensions are passed.
per Dan Bullock (git user DanNBullock), use of false() as a means of getting an array of zeros on sz resulted in an empty dimension when a negative is passed in. The previous structure seemed to be predicated on a presumption of either RAS or LPI. Use of Abs(sz) ensures that the actual dimensions are passed.
removed check for spm2 which uses function that breaks in deployed mode
Some updates on the gifti/OBJ stuff. This still needs work.
See comments about gifti and github and SPM12 in the files.
Per the comment in the main repo, the inability to deal with alternate orientations is leading to negative numbers here, which interacts poorly with the addition step.  (if the diff value ends up being negative, the addition of one reduces the actual size).
@giulia-berto
Copy link

With the original function, I got an output volume with wrong dimensions (reduced by 2 units). This fix can deal correctly with negative values, and thus the resulting volume has the correct dimensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.