Orthogonal-plane resampler (axial / coronal / sagittal) from MriVolData to MriSliceImage. More...
#include <mri_slicer.h>
Static Public Member Functions | |
| static MriSliceImage | extractSlice (const QVector< float > &volData, const QVector< int > &dims, const Eigen::Matrix4f &vox2ras, SliceOrientation orientation, int sliceIndex) |
| static int | voxelAxisForOrientation (const Eigen::Matrix4f &vox2ras, SliceOrientation orientation) |
| static int | dimensionForOrientation (const QVector< int > &dims, const Eigen::Matrix4f &vox2ras, SliceOrientation orientation) |
| static int | sliceIndexForOrientation (const Eigen::Matrix4f &vox2ras, SliceOrientation orientation, const Eigen::Vector3i &voxel) |
| static QVector< MriSliceImage > | extractOrthogonal (const QVector< float > &volData, const QVector< int > &dims, const Eigen::Matrix4f &vox2ras, const Eigen::Vector3f &rasPoint) |
| static Eigen::Vector3i | rasToVoxel (const Eigen::Matrix4f &vox2ras, const Eigen::Vector3f &rasPoint) |
| static Eigen::Vector3f | voxelToRas (const Eigen::Matrix4f &vox2ras, const Eigen::Vector3i &voxel) |
| static MriSliceImage | extractSlice (const MriVolData &vol, SliceOrientation orientation, int sliceIndex) |
| static int | voxelAxisForOrientation (const MriVolData &vol, SliceOrientation orientation) |
| static int | dimensionForOrientation (const MriVolData &vol, SliceOrientation orientation) |
| static int | sliceIndexForOrientation (const MriVolData &vol, SliceOrientation orientation, const Eigen::Vector3i &voxel) |
| static QVector< MriSliceImage > | extractOrthogonal (const MriVolData &vol, const Eigen::Vector3f &rasPoint) |
| static Eigen::Vector3i | rasToVoxel (const MriVolData &vol, const Eigen::Vector3f &rasPoint) |
| static Eigen::Vector3f | voxelToRas (const MriVolData &vol, const Eigen::Vector3i &voxel) |
Orthogonal-plane resampler (axial / coronal / sagittal) from MriVolData to MriSliceImage.
Pure static methods — no instance state is owned. For a given orientation and slice index, samples the source volume at the matching row/column/depth plane, normalises voxel intensities into 8-bit grayscale via the volume's percentile-clipped window, and emits the result with the slice→RAS transform the viewer needs to draw rulers and crosshairs in millimetres.
Definition at line 107 of file mri_slicer.h.
|
static |
Return the volume dimension used by an anatomical slice orientation.
Definition at line 303 of file mri_slicer.cpp.
|
static |
Return the volume dimension used by an anatomical slice orientation.
| [in] | dims | Volume dimensions {dimX, dimY, dimZ}. |
| [in] | vox2ras | 4x4 voxel-to-RAS transform. |
| [in] | orientation | Anatomical slice orientation. |
|
static |
Extract all three orthogonal slices at a given RAS point.
| [in] | vol | Loaded MRI volume. |
| [in] | rasPoint | RAS coordinate to slice through. |
|
static |
Extract all three orthogonal slices at a given RAS point.
| [in] | volData | Flat array of voxel intensities. |
| [in] | dims | Volume dimensions {dimX, dimY, dimZ}. |
| [in] | vox2ras | 4x4 voxel-to-RAS transform. |
| [in] | rasPoint | RAS coordinate to slice through. |
|
static |
Extract a 2D slice from an MriVolData volume.
| [in] | vol | Loaded MRI volume. |
| [in] | orientation | Slice orientation. |
| [in] | sliceIndex | Index along the slicing axis. |
Definition at line 285 of file mri_slicer.cpp.
|
static |
Extract a 2D slice from a 3D volume stored as a flat array.
| [in] | volData | Flat array of voxel intensities (dimX x dimY x dimZ, x-fastest). |
| [in] | dims | Volume dimensions {dimX, dimY, dimZ}. |
| [in] | vox2ras | 4x4 voxel-to-RAS transform. |
| [in] | orientation | Slice orientation (Axial, Coronal, or Sagittal). |
| [in] | sliceIndex | Index along the slicing axis. |
|
static |
Convert RAS coordinate to voxel index.
| [in] | vox2ras | 4x4 voxel-to-RAS transform. |
| [in] | rasPoint | RAS coordinate. |
|
static |
Convert RAS coordinate to voxel index using a volume's transform.
| [in] | vol | Loaded MRI volume. |
| [in] | rasPoint | RAS coordinate. |
|
static |
Return the slice index for an anatomical orientation from a voxel coordinate.
| [in] | vox2ras | 4x4 voxel-to-RAS transform. |
| [in] | orientation | Anatomical slice orientation. |
| [in] | voxel | Voxel coordinate. |
|
static |
Return the slice index for an anatomical orientation from a voxel coordinate.
|
static |
Return the voxel axis used as the fixed slicing axis for an anatomical orientation.
Uses the voxel-to-RAS transform to map anatomical planes onto the source volume's storage axes. For FreeSurfer tkRAS volumes, axial maps to voxel Y and coronal maps to voxel Z, while an identity transform keeps the conventional Z/Y/X mapping.
| [in] | vox2ras | 4x4 voxel-to-RAS transform. |
| [in] | orientation | Anatomical slice orientation. |
|
static |
Return the voxel axis used as the fixed slicing axis for an anatomical orientation.
Definition at line 295 of file mri_slicer.cpp.
|
static |
Convert voxel index to RAS coordinate.
| [in] | vox2ras | 4x4 voxel-to-RAS transform. |
| [in] | voxel | Voxel index. |
|
static |
Convert voxel index to RAS coordinate using a volume's transform.
| [in] | vol | Loaded MRI volume. |
| [in] | voxel | Voxel index. |