-
Notifications
You must be signed in to change notification settings - Fork 58
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
Functions to read and write minc1 and minc2 files #504
Comments
@amie-demmans do you know if those MATLAB tools requires you to have MINC installed on your shell beforehand? The last time I touched on MINC+MATLAB (circa 2018), I know i had to have it installed and also open MATLAB through the shell for it to work. I've checked and it seems MINC isn't really updated anymore (eg no ARM chip compatibility), and they recommend you use it through their Docker images. I know there's a way to open MINC files in Python without having a full MINC tools installation (https://nipy.org/nibabel/reference/nibabel.minc1.html), but am not aware of ways to do it on MATLAB. |
@mathieuboudreau You do not need to have MINC installed beforehand. These functions are so then you can open a MINC file without having that installation. |
Hi @mathieuboudreau . I now have complete functions to read and write both minc1 and minc2 files for MATLAB. In terms of implementing it into qMRLab, would you like me to create a new branch within qMRLab and have it placed within a specific folder or should I create a separate repository on my lab's GitHub and it can be added that way through the externals? Thanks! Amie |
@amie-demmans great! For external people only, we typically recommend that you for the repository and then submit a pull request. But, if it's just a single file, you could send it as an attachment in a comment here and I can open the pull request for you using a new branch. |
Hi @mathieuboudreau . Sorry for the late response on this. For the lab I am working with we already have a forked version of qMRLab in which I have been working with for the minc read and write functions. I also added minc to qMRLab in the BrowserSet.m function so minc files would also be able to be loaded into qMRLab and used for the different models. I have tested for this in the fork of the qMRLab repository. I am ready to submit a pull request for all of the functions and changes I made to add minc as a file type to qMRLab. A couple months ago I was also working on an addition for adiabatic inversion pulses and when I was you had added me as a contributor to qMRLab so then I could push my branch into your repo and then make the pull request. Would this be the proper way to submit my pull request for minc as well? Thanks! Amie |
Great ! Go ahead when you have the chance!
Yes - and sorry for the delay, I forgot about it over the summer. I'll take a look at both ASAP! |
Perfect thank you @mathieuboudreau ! Sorry I also just have one more question. I have pushed a branch called 'minc' and pushed all of the necessary files and changes to it, however I keep getting the Octave BatchPart1 job failing because it uses version 2 of the actions to upload and download artifacts and it needs to use version4. How would I get this update/ new version? Thank you! |
Expected Behavior
This contribution aims to be used as functions that can be implemented to read and write minc1 and/or minc2 files.
minc_read was originally from this repository: https://github.com/SIMEXP/mominc however I have adjusted it to account for the matlab update of hdf5info --> h5info. Also additional variables have been added for minc2 datatype and size to match what is needed for minc_write and to display the image properly.
minc_write for minc1 is based on that from https://github.com/SIMEXP/mominc/blob/master/mom_write_minc1_matlab.m and adjusted to match minc_read. minc_write for minc2 was written from scratch to match what is needed for the minc_read.
Actual Behavior
The minc_read function will reproduce the header and volume information of a minc file and the only input value needed is the minc file itself.
The minc_write function will require the header and volume information of an image, as well as the new name of the file you are making.
Both minc_read and minc_write will first test to see if the file you have given is minc1 or minc2 and will run the appropriate function based on the result.
The text was updated successfully, but these errors were encountered: