-
Notifications
You must be signed in to change notification settings - Fork 34
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 support for sform and qform matrices as fields within the loaded nifti file header. #74
Comments
Since the header is a reflection of the actually storage format it won't change to store a literal matrix (although sqform is pretty close already). We could make it easier to interact with it as if it were a matrix though. Similar to how Rotations.jl has array like rotation objects. |
Okay so similar to a matrix but not the julia matrix itself, wondering if you were referring to the quaterns and srow values for interacting as if theyu were q and s form matrices... is that something that you were trying to entail |
Yeah, that's what I was referring to. At the same time, I'm not sure how that interface would really work in terms of the header struct itself. I think it makes more sense to extract those matrices from the header with a function than build them into it though. I'm not totally against it if you have a killer idea though. |
So originally i asked this question, because i had to forumalte a nifti struct again after loading a nifti file using NIfTi.jl, following the nifti1io.h nifti image structure, cuz they include things like grid dimensions, spacings, int ndim ; /!< last dimension greater than 1 (1..7) / float dx ; /*!< grid spacings / float scl_slope ; /*!< scaling parameter - slope / float cal_min ; /*!< calibration parameter, minimum / int qform_code ; /*!< codes for (x,y,z) space meaning / int freq_dim ; /*!< indexes (1,2,3, or 0) for MRI / int slice_code ; /*!< code for slice timing pattern / /*! quaternion transform parameters mat44 qto_xyz ; /*!< qform: transform (i,j,k) to (x,y,z) / mat44 sto_xyz ; /*!< sform: transform (i,j,k) to (x,y,z) / float toffset ; /*!< time coordinate offset */ int xyz_units ; /!< dx,dy,dz units: NIFTI_UNITS_ code / int nifti_type ; /*!< 0==ANALYZE, 1==NIFTI-1 (1 file), char descrip[80] ; /*!< optional text to describe dataset / char fname ; /!< header filename (.hdr or .nii) */ int num_ext ; /*!< number of extensions in ext_list / } nifti_image ;` like the above |
so if thats some that can be added, do let me know i will figure out how to do that within this package :) |
also if thats something not ideal, i can figure out other ways to make them interact as a matrix |
I have code laying around somewhere that can help with that. I have a lot of work I have to do at the present time so it's all dependent on if I can get away doing this sort of stuff during meetings where I'm simply supposed to be looking attentive. |
ok great, but have you taken a look at the grid spacing and dimensions of grid array |
Is there a possibility to add support for sform and qform matrices as fields within the NIfTI.NIfTI1Header type?
The text was updated successfully, but these errors were encountered: