Closed neurolabusc closed 3 years ago
Also adds clipPlaneUpdate() that allows you to specify the clip plane with 3 parameters: azimuth (in range -180..180 or 0..360) elevation (in range -90..+90) depth: 0..+1.73 (e.g. 0.0 means clip plane at center of volume, 2 means clip plane too far away to cut object).
Example:
clipPlaneUpdate([90, 0, 0.1]);
New function mm2frac() converts object space (in millimeters) to normalized texture space (where each dimension is in range 0..1). This is the reverse transform of frac2mm(). Used together, this can allow yoking of niivue instances (e.g. when the mm value of one image is changed, the other one can be updated to show the equivalent location on a different image). This function is also the basis for loading overlays where the dimensions do not match the background image.
The formula is clearer in Matlab. Assuming a NIfTI image with dimensions
dim
and storm matrixm
, we can convert any coordinates in millimeters (mm
) to fractional object space (result
):