API Reference¶
This page provides a concise reference for the public API of each class.
Full Doxygen documentation is available in the header files under include/.
itk::TrxStreamlineData¶
Central data container for TRX tractography data. Inherits itk::DataObject.
Holds lazy-loaded streamline positions (float16, float32, or float64) and
per-streamline offsets. Supports AABB spatial queries, lazy and eager subsetting,
named group access, DPS/DPV field retrieval, and group connectivity computation.
Streamline access
Method |
Description |
|---|---|
|
Total number of streamlines |
|
Total number of vertices across all streamlines |
|
Streamline i as |
|
Forward-iterable range over LPS+ points of streamline i |
|
Zero-copy raw pointer view; returns false if positions are not yet loaded |
|
Iterate all streamlines with on-the-fly coordinate conversion |
Subsetting and queries
Method |
Description |
|---|---|
|
Streamlines whose bounding boxes intersect the LPS+ box |
|
As above, capped at maxN streamlines (random sample when over limit) |
|
Eager subset by index list |
|
Lazy subset; delegates to TRX handle when available |
Groups
Method |
Description |
|---|---|
|
True if the file contains at least one named group |
|
Names of all groups in file order |
|
|
|
Streamline count for a group without loading indices |
DPS / DPV fields
Method |
Description |
|---|---|
|
Names of all per-streamline scalar fields |
|
Names of all per-vertex scalar fields |
|
Per-streamline values widened to |
|
Per-vertex values widened to |
Transforms
Method |
Description |
|---|---|
|
Apply ITK transform to all positions in memory |
|
Stream transformed positions to a |
|
As above, reusing a caller-supplied |
Connectivity
Method |
Description |
|---|---|
|
N×N symmetric matrix of shared streamline counts (or weighted sums) |
Metadata
Method |
Description |
|---|---|
|
4×4 voxel-to-RAS affine from the TRX header |
|
4×4 voxel-to-LPS affine |
|
Grid dimensions from the TRX header |
|
Write the data to a new TRX file |
itk::TrxStreamWriter¶
Incremental streaming writer for TRX files. Inherits itk::Object. DPS and
DPV fields must be registered before the first PushStreamline() call. Every
push must supply values for all registered fields with consistent lengths.
Method |
Description |
|---|---|
|
Output file path |
|
Enable or disable ZIP compression (default: off) |
|
Declare a per-streamline field; |
|
Declare a per-vertex field |
|
Push one streamline as |
|
Push one streamline as an N×3 |
|
Seal the ZIP archive; required before the file is usable |
|
Buffer positions in memory before flushing (useful on slow disks) |
itk::TrxFileReader¶
ProcessObject wrapper for reading TRX files into a TrxStreamlineData.
Follows the itk::ImageFileReader interface pattern.
Method |
Description |
|---|---|
|
Input file path |
|
Open the file and populate the output object (positions remain lazy) |
|
|
itk::TrxFileWriter¶
ProcessObject wrapper for writing a TrxStreamlineData to a TRX file.
Method |
Description |
|---|---|
|
Output file path |
|
|
|
Write the file |
itk::TrxGroup¶
Represents a named bundle of streamlines. Inherits itk::Object. Created
by TrxStreamlineData::GetGroup(); do not construct directly. Streamline
indices are loaded lazily on first access.
Method |
Description |
|---|---|
|
Group name as stored in the TRX file |
|
Indices into the parent |
|
Lazy |
|
Names of per-group scalar metadata fields |
|
True if the named DPG field exists |
|
Per-group scalar values as |
|
Observer-pattern visibility toggle (for GUI integration) |
|
Observer-pattern color assignment (for GUI integration) |
itk::TrxParcellationLabeler¶
Assigns streamlines to named TRX groups based on one or more NIfTI-1
parcellation images. Inherits itk::Object. Each label image contributes
groups whose names follow the pattern <prefix>_<label_name>.
Method |
Description |
|---|---|
|
|
|
Register a parcellation atlas; may be called multiple times |
|
Expand each parcel by n voxels before intersection testing |
|
Run parcellation and populate output groups |
|
|
itk::TrxGroupTdiMapper¶
Maps streamlines from selected groups onto a reference NIfTI grid to produce
a track density image. Inherits itk::Object.
Method |
Description |
|---|---|
|
|
|
NIfTI reference image defining the output grid |
|
Select streamlines by group membership (all-of, any-of, none-of) |
|
DPS field to use as per-streamline weight (empty = unweighted count) |
|
Compute the density image |
|
|