Giter VIP home page Giter VIP logo

Comments (2)

neurolabusc avatar neurolabusc commented on September 27, 2024 1

This question is out of scope for dcm2niix. dcm2niix uses nifti_clib for these transforms, so that would be the appropriate place for questions. In particular, see nifti_quatern_to_mat44

In brief:

  • The NIfTI header includes two independent spatial transforms: the Matrix-based SForm (12 degrees of freedom: shear, zoom, rotation, translation each in three dimensions) and the Quaternion-based QForm (9 DoG: zoom, rotation, translation in 3D). In general, both initially map the image to native scanner space, and a co-registration can update one or both to warp the image to standard space. You can use the sform_code/q form_code to determine the spatial reference (e.g. native vs standard) of each, but most tools give precedence to the SForm.
  • Your R-matrix is only 3x3, but you need a 4x4 matrix to include the translations. You must include the qoffset_x/y/z.
  • You can easily convert a matrix to a quaternion. However, this transform will be lossy if your transform includes a shear (CT gantry tilt).
  • Note you can losslessly convert a quaternion to a 4x4 matrix.
  • Note that for 3D acquisitions (but not 2D EPI sequences), dcm2niix will losslessly reorient sagittal and coronal slices to be axial slices, with the spatial transforms rotated appropriately.

from dcm2niix.

BrunoFFPP avatar BrunoFFPP commented on September 27, 2024

Sorry for use the wrong site to post my doubt but thanks for your tips and explanations, they help me a lot.

from dcm2niix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.