NaviNIBS.Navigator.Model.SubjectRegistration module

Bases: GenericCollectionDictItem[str]

Parameters:
  • _key

  • _plannedCoord – Note that these (planned) coordinates are in MRI space.

  • _sampledCoords – Note that these (sampled) coordinates are in tracker space, not in MRI space. This is to not require modification when using other methods besides fiducials for defining tracker->MRI coordinate transform. Is of size Nx3, where N is the number of repeated samples of the same coordinate.

  • _sampledCoord – Is of size (3,). Can be used without sampledCoords to specify single sampled coordinate. Or can be used with sampledCoords to override the default sampledCoords->sampledCoord aggregation (a simple mean) with some other result (e.g. a trimmed mean) while still preserving all original samples. Note that this is cleared whenever sampledCoords is set, to avoid persisting an out-of-date aggregated sample.

  • _alignmentWeight – Can be used to specify a relative positive weight for how this fiducial will be incorporated into registration. For example, if the NAS fiducial is given weight 100, and the LPA and RPA fiducials have default weights of 1, then alignment will always very closely match measured NAS to planned NAS location, and allow larger deviations for LPA and RPA for the sake of closely matching NAS.

Note that these (planned) coordinates are in MRI space.

Note that these (sampled) coordinates are in tracker space, not in MRI space. This is to not require modification when using other methods besides fiducials for defining tracker->MRI coordinate transform.

Is of size Nx3, where N is the number of repeated samples of the same coordinate.

Is of size (3,).

Can be used without sampledCoords to specify single sampled coordinate. Or can be used with sampledCoords to override the default sampledCoords->sampledCoord aggregation (a simple mean) with some other result (e.g. a trimmed mean) while still preserving all original samples.

Note that this is cleared whenever sampledCoords is set, to avoid persisting an out-of-date aggregated sample.

Can be used to specify a relative positive weight for how this fiducial will be incorporated into registration.

For example, if the NAS fiducial is given weight 100, and the LPA and RPA fiducials have default weights of 1, then alignment will always very closely match measured NAS to planned NAS location, and allow larger deviations for LPA and RPA for the sake of closely matching NAS.

Always returns single vector coordinate of size (3,), or None if the fiducial has not been sampled. If multiple repeats of the same fiducial are sampled (in sampledCoords), and no separate sampledCoord has been set, this returns an average of the samples.

Return type:

dict[str, Any]

Bases: GenericCollection[str, Fiducial]

Parameters:

_items

Return type:

dict[str, Optional[ndarray]]

Note that this returns a dict where each value is a sampledCoord (always None or shape (3,)), even if multiple samples exist for a given fiducial. For full access, use allSampledFiducials instead.

Return type:

dict[str, Optional[ndarray]]

Return type:

dict[str, Optional[ndarray]]

Return type:

ndarray

Return type:

Fiducials

Bases: object

Parameters:
  • _headPoints – Note that these are coordinates are in tracker space, not in MRI space.

  • _alignmentWeights – Optional weights used for headpoint-based registration refinement, in format expected by simpleicp’s rbp_observation_weights argument (i.e. rot_x, rot_y, rot_z, t_x, t_y, t_z). Can alternatively specify as a single scalar to apply the same weight to all terms, or as two scalars to apply the first weight to all rotation term, the second weights to all translation terms. Note that values will be inverted (weightArg = 1 / weight) so that higher input values correspond to greater weighting of head points, rather than greater weighting of fiducials. Note that these weights are different in definition and usage than Fiducial.alignmentWeight.

Note that these are coordinates are in tracker space, not in MRI space.

Optional weights used for headpoint-based registration refinement, in format expected by simpleicp’s rbp_observation_weights argument (i.e. rot_x, rot_y, rot_z, t_x, t_y, t_z). Can alternatively specify as a single scalar to apply the same weight to all terms, or as two scalars to apply the first weight to all rotation term, the second weights to all translation terms.

Note that values will be inverted (weightArg = 1 / weight) so that higher input values correspond to greater weighting of head points, rather than greater weighting of fiducials.

Note that these weights are different in definition and usage than Fiducial.alignmentWeight.

This signal includes list of indices of headpoints about to change.

” This signal includes list of indices of headpoints that changed.

This signal includes keys and incoming values of attributes (besides main headPoints list) about to change.

This signal includes keys of attributes (besides main headPoints list) that changed.

Clear all previous points, set to new points.

Bases: object

Parameters:
  • _fiducials

  • _sampledHeadPoints

  • _trackerToMRITransf

  • _fiducialsHistory

  • _trackerToMRITransfHistory

Result should not be modified

Return type:

bool

Return type:

bool

Return type:

HeadPoints

Result should not be modified

Return type:

Optional[ndarray]

Return type:

Dict[str, Any]

Return type:

SubjectRegistration

Return type:

datetime

Return type:

bool