NaviNIBS.Navigator.Model.Tools module¶
- class NaviNIBS.Navigator.Model.Tools.Tool(key, usedFor, label=None, trackerKey=None, isActive=True, doRenderTool=True, doRenderTracker=True, doShowTrackingState=True, romFilepath=None, trackerStlFilepath=None, toolStlFilepath=None, filepathsRelTo='<userDataDir>', toolToTrackerTransf=None, toolStlToToolTransf=None, trackerStlToTrackerTransf=None, toolColor=None, trackerColor=None, toolOpacity=None, trackerOpacity=None, installPath=None, sessionPath=None, initialTrackerPose=None, initialTrackerPoseRelativeTo='world', toolToTrackerTransfHistory=NOTHING)[source]¶
Bases:
GenericCollectionDictItem
[str
]- Parameters:
_key
_usedFor
_label – Optional “nice” label for display. If not specified,
key
will be used instead. Label does not need to be unique, but could be confusing in some GUI displays if multiple tools with the same label are shown._trackerKey – Optional key to match up to tracking data. If not specified,
key
will be used instead._isActive – Whether to actively use for tracking/pointing
_doRenderTool – Whether to show tool in camera view, etc. To actually render, a valid pose and mesh must be available.
_doRenderTracker – Whether to show tracker in camera view, etc. To actually render, a valid pose and mesh must be available.
_doShowTrackingState – Whether to include this tool in tracking status widget(s). To actually show, must not also be excluded by other hide filters on the widget.
_romFilepath – Path to a .rom file describing optical marker positions on a rigid body tracker, as used by NDI Polaris systems.
_trackerStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tracker.
_toolStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tool.
_filepathsRelTo – Can be one of: -
'<install>'
: relative to NaviNIBS install dir -'<userDataDir>'
: relative to user data dir -'<session>'
: relative to session file - absolute path_toolToTrackerTransf – Used for aligning actual tool position to Polaris-reported tracker position (e.g. actual coil to coil tracker, or actual pointer to uncalibrated pointer tracker)
_toolStlToToolTransf – Used for visualization of tool surface mesh only; can be used to align mesh with actual tool orientation
_trackerStlToTrackerTransf
_toolColor
_trackerColor – Note: some surf file formats (e.g. .ply) allow specifying color of elements within the file; if color is None here and colors are available in the surf file, those colors will be used.
_toolOpacity
_trackerOpacity
_installPath
_sessionPath
_initialTrackerPose – For defining initial pose of tool, e.g. for tools that never get a camera-reported position, or for a default (simulated) position when a camera is not connected.
_initialTrackerPoseRelativeTo
_toolToTrackerTransfHistory
- _usedFor: str¶
- _label: tp.Optional[str]¶
Optional “nice” label for display. If not specified,
key
will be used instead. Label does not need to be unique, but could be confusing in some GUI displays if multiple tools with the same label are shown.
- _trackerKey: tp.Optional[str]¶
Optional key to match up to tracking data. If not specified,
key
will be used instead.
- _isActive: bool¶
Whether to actively use for tracking/pointing
- _doRenderTool: bool¶
Whether to show tool in camera view, etc. To actually render, a valid pose and mesh must be available.
- _doRenderTracker: bool¶
Whether to show tracker in camera view, etc. To actually render, a valid pose and mesh must be available.
- _doShowTrackingState: bool¶
Whether to include this tool in tracking status widget(s). To actually show, must not also be excluded by other hide filters on the widget.
- _romFilepath: tp.Optional[str]¶
Path to a .rom file describing optical marker positions on a rigid body tracker, as used by NDI Polaris systems.
- _trackerStlFilepath: tp.Optional[str]¶
Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tracker.
- _toolStlFilepath: tp.Optional[str]¶
Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tool.
- _filepathsRelTo: str¶
Can be one of:
'<install>'
: relative to NaviNIBS install dir'<userDataDir>'
: relative to user data dir'<session>'
: relative to session fileabsolute path
- _toolToTrackerTransf: tp.Optional[np.ndarray]¶
Used for aligning actual tool position to Polaris-reported tracker position (e.g. actual coil to coil tracker, or actual pointer to uncalibrated pointer tracker)
- _toolStlToToolTransf: tp.Optional[np.ndarray]¶
Used for visualization of tool surface mesh only; can be used to align mesh with actual tool orientation
- _trackerStlToTrackerTransf: tp.Optional[np.ndarray]¶
- _toolColor: str | None¶
- _trackerColor: str | None¶
Note: some surf file formats (e.g. .ply) allow specifying color of elements within the file; if color is None here and colors are available in the surf file, those colors will be used.
- _toolOpacity: float | None¶
- _trackerOpacity: float | None¶
- _installPath: tp.Optional[str]¶
- _sessionPath: tp.Optional[str]¶
- property label¶
- property labelIsSet¶
- property trackerKey¶
- property trackerKeyIsSet¶
- property usedFor¶
- property isActive¶
- property doRenderTool¶
- property doRenderTracker¶
- property doShowTrackingState¶
- property romFilepath¶
- property toolStlFilepath¶
- property trackerStlFilepath¶
- property filepathsRelTo¶
- property filepathsRelToKey¶
- property sessionPath¶
- property toolToTrackerTransf¶
- property toolStlToToolTransf¶
- property trackerStlToTrackerTransf¶
- property trackerColor¶
- property toolColor¶
- property trackerOpacity¶
- property toolOpacity¶
- property toolToTrackerTransfHistory¶
- property trackerSurf¶
- property toolSurf¶
- property initialTrackerPose¶
- property initialTrackerPoseRelativeTo¶
- sigKeyAboutToChange: Signal¶
- sigKeyChanged: Signal¶
- sigItemAboutToChange: Signal¶
This signal includes the key of the item, and optionally a list of keys of attributes about to change; if second arg is None, all attributes should be assumed to be about to change.
Not emitted when key changed (use sigKeyAboutToChange instead!)
- sigItemChanged: Signal¶
This signal includes the key of the item, and optionally a list of keys of changed attributes; if second arg is None, all attributes should be assumed to have changed.
Not emitted when key changed (use sigKeyChanged instead!)
- class NaviNIBS.Navigator.Model.Tools.SubjectTracker(key, label=None, trackerKey=None, isActive=True, doRenderTool=True, doRenderTracker=True, doShowTrackingState=True, romFilepath=None, trackerStlFilepath=None, toolStlFilepath=None, filepathsRelTo='<userDataDir>', toolToTrackerTransf=None, toolStlToToolTransf=None, trackerStlToTrackerTransf=None, toolColor=None, trackerColor=None, toolOpacity=None, trackerOpacity=None, installPath=None, sessionPath=None, initialTrackerPose=None, initialTrackerPoseRelativeTo='world', toolToTrackerTransfHistory=NOTHING, usedFor='subject')[source]¶
Bases:
Tool
- Parameters:
_key
_label – Optional “nice” label for display. If not specified,
key
will be used instead. Label does not need to be unique, but could be confusing in some GUI displays if multiple tools with the same label are shown._trackerKey – Optional key to match up to tracking data. If not specified,
key
will be used instead._isActive – Whether to actively use for tracking/pointing
_doRenderTool – Whether to show tool in camera view, etc. To actually render, a valid pose and mesh must be available.
_doRenderTracker – Whether to show tracker in camera view, etc. To actually render, a valid pose and mesh must be available.
_doShowTrackingState – Whether to include this tool in tracking status widget(s). To actually show, must not also be excluded by other hide filters on the widget.
_romFilepath – Path to a .rom file describing optical marker positions on a rigid body tracker, as used by NDI Polaris systems.
_trackerStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tracker.
_toolStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tool.
_filepathsRelTo – Can be one of: -
'<install>'
: relative to NaviNIBS install dir -'<userDataDir>'
: relative to user data dir -'<session>'
: relative to session file - absolute path_toolToTrackerTransf – Used for aligning actual tool position to Polaris-reported tracker position (e.g. actual coil to coil tracker, or actual pointer to uncalibrated pointer tracker)
_toolStlToToolTransf – Used for visualization of tool surface mesh only; can be used to align mesh with actual tool orientation
_trackerStlToTrackerTransf
_toolColor
_trackerColor – Note: some surf file formats (e.g. .ply) allow specifying color of elements within the file; if color is None here and colors are available in the surf file, those colors will be used.
_toolOpacity
_trackerOpacity
_installPath
_sessionPath
_initialTrackerPose – For defining initial pose of tool, e.g. for tools that never get a camera-reported position, or for a default (simulated) position when a camera is not connected.
_initialTrackerPoseRelativeTo
_toolToTrackerTransfHistory
_usedFor
- property toolToTrackerTransf¶
- class NaviNIBS.Navigator.Model.Tools.CoilTool(key, label=None, trackerKey=None, isActive=True, doRenderTool=True, doRenderTracker=True, doShowTrackingState=True, romFilepath=None, trackerStlFilepath=None, toolStlFilepath=None, filepathsRelTo='<userDataDir>', toolToTrackerTransf=None, toolStlToToolTransf=None, trackerStlToTrackerTransf=None, toolColor=None, trackerColor=None, toolOpacity=None, trackerOpacity=None, installPath=None, sessionPath=None, initialTrackerPose=None, initialTrackerPoseRelativeTo='world', toolToTrackerTransfHistory=NOTHING, usedFor='coil')[source]¶
Bases:
Tool
- Parameters:
_key
_label – Optional “nice” label for display. If not specified,
key
will be used instead. Label does not need to be unique, but could be confusing in some GUI displays if multiple tools with the same label are shown._trackerKey – Optional key to match up to tracking data. If not specified,
key
will be used instead._isActive – Whether to actively use for tracking/pointing
_doRenderTool – Whether to show tool in camera view, etc. To actually render, a valid pose and mesh must be available.
_doRenderTracker – Whether to show tracker in camera view, etc. To actually render, a valid pose and mesh must be available.
_doShowTrackingState – Whether to include this tool in tracking status widget(s). To actually show, must not also be excluded by other hide filters on the widget.
_romFilepath – Path to a .rom file describing optical marker positions on a rigid body tracker, as used by NDI Polaris systems.
_trackerStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tracker.
_toolStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tool.
_filepathsRelTo – Can be one of: -
'<install>'
: relative to NaviNIBS install dir -'<userDataDir>'
: relative to user data dir -'<session>'
: relative to session file - absolute path_toolToTrackerTransf – Used for aligning actual tool position to Polaris-reported tracker position (e.g. actual coil to coil tracker, or actual pointer to uncalibrated pointer tracker)
_toolStlToToolTransf – Used for visualization of tool surface mesh only; can be used to align mesh with actual tool orientation
_trackerStlToTrackerTransf
_toolColor
_trackerColor – Note: some surf file formats (e.g. .ply) allow specifying color of elements within the file; if color is None here and colors are available in the surf file, those colors will be used.
_toolOpacity
_trackerOpacity
_installPath
_sessionPath
_initialTrackerPose – For defining initial pose of tool, e.g. for tools that never get a camera-reported position, or for a default (simulated) position when a camera is not connected.
_initialTrackerPoseRelativeTo
_toolToTrackerTransfHistory
_usedFor
- property toolToTrackerTransf: ndarray | None¶
Override parent class to not assume identity transform by default. Unlike other tools, this will return None if no transform is set.
- Return type:
Optional
[ndarray
]
- class NaviNIBS.Navigator.Model.Tools.Pointer(key, label=None, trackerKey=None, isActive=True, doRenderTool=True, doRenderTracker=True, doShowTrackingState=True, romFilepath=None, trackerStlFilepath=None, toolStlFilepath=None, filepathsRelTo='<userDataDir>', toolToTrackerTransf=None, toolStlToToolTransf=None, trackerStlToTrackerTransf=None, toolColor=None, trackerColor=None, toolOpacity=None, trackerOpacity=None, installPath=None, sessionPath=None, initialTrackerPose=None, initialTrackerPoseRelativeTo='world', toolToTrackerTransfHistory=NOTHING, usedFor='pointer')[source]¶
Bases:
Tool
- Parameters:
_key
_label – Optional “nice” label for display. If not specified,
key
will be used instead. Label does not need to be unique, but could be confusing in some GUI displays if multiple tools with the same label are shown._trackerKey – Optional key to match up to tracking data. If not specified,
key
will be used instead._isActive – Whether to actively use for tracking/pointing
_doRenderTool – Whether to show tool in camera view, etc. To actually render, a valid pose and mesh must be available.
_doRenderTracker – Whether to show tracker in camera view, etc. To actually render, a valid pose and mesh must be available.
_doShowTrackingState – Whether to include this tool in tracking status widget(s). To actually show, must not also be excluded by other hide filters on the widget.
_romFilepath – Path to a .rom file describing optical marker positions on a rigid body tracker, as used by NDI Polaris systems.
_trackerStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tracker.
_toolStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tool.
_filepathsRelTo – Can be one of: -
'<install>'
: relative to NaviNIBS install dir -'<userDataDir>'
: relative to user data dir -'<session>'
: relative to session file - absolute path_toolToTrackerTransf – Used for aligning actual tool position to Polaris-reported tracker position (e.g. actual coil to coil tracker, or actual pointer to uncalibrated pointer tracker)
_toolStlToToolTransf – Used for visualization of tool surface mesh only; can be used to align mesh with actual tool orientation
_trackerStlToTrackerTransf
_toolColor
_trackerColor – Note: some surf file formats (e.g. .ply) allow specifying color of elements within the file; if color is None here and colors are available in the surf file, those colors will be used.
_toolOpacity
_trackerOpacity
_installPath
_sessionPath
_initialTrackerPose – For defining initial pose of tool, e.g. for tools that never get a camera-reported position, or for a default (simulated) position when a camera is not connected.
_initialTrackerPoseRelativeTo
_toolToTrackerTransfHistory
_usedFor
- class NaviNIBS.Navigator.Model.Tools.CalibrationPlate(key, label=None, trackerKey=None, isActive=True, doRenderTool=True, doRenderTracker=True, doShowTrackingState=True, romFilepath=None, trackerStlFilepath=None, toolStlFilepath=None, filepathsRelTo='<userDataDir>', toolToTrackerTransf=None, toolStlToToolTransf=None, trackerStlToTrackerTransf=None, toolColor=None, trackerColor=None, toolOpacity=None, trackerOpacity=None, installPath=None, sessionPath=None, initialTrackerPose=None, initialTrackerPoseRelativeTo='world', toolToTrackerTransfHistory=NOTHING, usedFor='calibration')[source]¶
Bases:
Tool
- Parameters:
_key
_label – Optional “nice” label for display. If not specified,
key
will be used instead. Label does not need to be unique, but could be confusing in some GUI displays if multiple tools with the same label are shown._trackerKey – Optional key to match up to tracking data. If not specified,
key
will be used instead._isActive – Whether to actively use for tracking/pointing
_doRenderTool – Whether to show tool in camera view, etc. To actually render, a valid pose and mesh must be available.
_doRenderTracker – Whether to show tracker in camera view, etc. To actually render, a valid pose and mesh must be available.
_doShowTrackingState – Whether to include this tool in tracking status widget(s). To actually show, must not also be excluded by other hide filters on the widget.
_romFilepath – Path to a .rom file describing optical marker positions on a rigid body tracker, as used by NDI Polaris systems.
_trackerStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tracker.
_toolStlFilepath – Path to a surface mesh file (e.g. .stl, .ply) for visualization of the tool.
_filepathsRelTo – Can be one of: -
'<install>'
: relative to NaviNIBS install dir -'<userDataDir>'
: relative to user data dir -'<session>'
: relative to session file - absolute path_toolToTrackerTransf – Used for aligning actual tool position to Polaris-reported tracker position (e.g. actual coil to coil tracker, or actual pointer to uncalibrated pointer tracker)
_toolStlToToolTransf – Used for visualization of tool surface mesh only; can be used to align mesh with actual tool orientation
_trackerStlToTrackerTransf
_toolColor
_trackerColor – Note: some surf file formats (e.g. .ply) allow specifying color of elements within the file; if color is None here and colors are available in the surf file, those colors will be used.
_toolOpacity
_trackerOpacity
_installPath
_sessionPath
_initialTrackerPose – For defining initial pose of tool, e.g. for tools that never get a camera-reported position, or for a default (simulated) position when a camera is not connected.
_initialTrackerPoseRelativeTo
_toolToTrackerTransfHistory
_usedFor
- class NaviNIBS.Navigator.Model.Tools.ToolPositionsServerInfo(hostname='127.0.0.1', pubPort=18950, cmdPort=18951, type='IGTLink', doAutostart=True, initKwargs=NOTHING)[source]¶
Bases:
object
- Parameters:
_hostname
_pubPort
_cmdPort
_type
_doAutostart
_initKwargs
- _hostname: str¶
- _pubPort: int¶
- _cmdPort: int¶
- _type: str¶
- _doAutostart: bool¶
- _initKwargs: dict[str, Any]¶
- sigInfoChanged: Signal¶
- property hostname¶
- property pubPort¶
- property cmdPort¶
- property type¶
- property doAutostart¶
- property initKwargs¶
- class NaviNIBS.Navigator.Model.Tools.Tools(items=NOTHING, positionsServerInfo=NOTHING, sessionPath=None)[source]¶
Bases:
GenericCollection
[str
,Tool
]- Parameters:
_items
_positionsServerInfo
_sessionPath
- _positionsServerInfo: ToolPositionsServerInfo¶
- _sessionPath: tp.Optional[str]¶
- sigPositionsServerInfoChanged: Signal¶
includes list of keys of changed info attributes
- property subjectTracker: SubjectTracker | None¶
- Return type:
Optional
[SubjectTracker
]
- property calibrationPlate: CalibrationPlate | None¶
- Return type:
Optional
[CalibrationPlate
]
- property positionsServerInfo¶
- property sessionPath¶