Code Monkey home page Code Monkey logo

lumpnav's Introduction

SlicerIGT

This repository contains the SlicerIGT extension for 3D Slicer, which provides components for implementing image-guided intervention systems.

User documentation

To learn how to use SlicerIGT, refer to SlicerIGT tutorials.

Modules provided by this extension:

Breach warning

Display distance of tracked tool from an object and give visual and audible warning if the tool gets too close. Helps users to avoid certain regions during surgical resection or other interventions.

Collect points

Record motion trajectory of a tracked tool into markups fiducial list, markups curve, or model node.

Create models

Module for creating simple shapes, such as sphere, cylinder, prism, needle, and coordinate system axes.

Fiducial registration wizard

Register images, models, or any other nodes to each other using manually placed landmark points. Rigid, affine, and warping transforms are supported.

Fiducials to model registration

Automatic registration of model (surface mesh) to markups fiducials (point list) using iterative closest points (ICP) method.

Model registration

Automatic registration of models (surface meshes) using iterative closest points (ICP) method.

Path explorer

Module for specifying tool trajectories by entry and target points and reslice image along and orthogonal to the trajectory line.

Hit E or T key to switch between placement of entry and target point.

Pivot calibration

Determine transformation between tooltip and tracking sensor attached to a tracked tool.

Texture model

Apply texture to a surface model. Useful for displaying models acquired by surface scanners.

Transform processor

This module allows combining, inverting, stabilizing, termporal smoothing of transforms in real-time and writing results into a new output.

Processing modes:

  • Quaternion Average: Compute the quaternion average of all Source transforms provided.
  • Compute Rotation Only: Compute a copy of the rotation from the Source to the Reference.
  • Compute Translation Only: Compute a copy of the translation from the Source to the Reference.
  • Compute Full Transform: Compute a copy of the full transform from the Source to the Reference.
  • Compute Inverse: Compute the inverse of transform to parent, and store it in another node.
  • Compute Shaft Pivot: Compute a constrained version of an Source transform, the translation and z direction are preserved but the other axes resemble the Target coordinate system.
  • Stabilize: Compute a stabilized transform by low-pass filtering. Computation based on the former TrackerStabilizer extension.

Stabilize mode

Position tracking systems are useful for tracking surgical tools, robots, patient motion, etc. However, some tracking systems provide noisy (shaky) measurements and it can be useful to reduce random noise by filtering. Filtering can be also useful for converting abrupt position/orientation changes to smooth transitions, for example for moving a virtual camera.

TrackerStabilizer module provides temporal low-pass filtering for any situations requiring stable position/orientation where time delays are tolerable. User can adjust cut-off frequency (i.e., smoothing parameter): the lower the value, the smoother the motion is but it is important to note that the delay is also increased.

The GUI of the TrackerStabilizer module contains 4 elements:

  • Input Transform: This is the raw data, usually raw tracker data, represented by a vtkMRMLLinearTransformNode
  • Output Transform: This is the filtered transform represented also by a vtkMRMLLinearTransformNode. This node can be created directly from the list
  • Filter checkbox: This checkbox turn on/off the filtering
  • Smoothing slider: This slider control the smoothing parameter. In the left, smoother, with relatively important delay. In the right, faster (almost no delay), but noisier.

Ultrasound snapshots

Module for taking a snapshot of a position tracked ultrasound image and display it as a model node.

Viewpoint

Control 3D view camera using tracked tools and objects. It can either simulate a camera mounted on a tool or can continuously update camera position to keep a selected node in the center of the view.

Volume reslice driver

Move slice view (e.g., to show slice of an image) driven by position and orientation of a tracked tool (or any linear transform), or ROI or line markup.

Watchdog

Displays warning if selected transforms are not continuously updated. It is useful for detecting tracking errors, such as occluded marker or network connection error.

Developer documentation

Basic information for developers is available here.

Software release process

SlicerIGT packages are generated automatically every night from latest code version on master branch and a branch matching the name of the latest Slicer stable branch (e.g., master-48). Exact content can be determined from git hash included in the relase package name and content of SlicerIGT repository.

Nightly test results are available on Slicer dashboard: stable, nightly.

Acknowledgements

This work was partially funded by Cancer Care Ontario and the Ontario Consortium for Adaptive Interventions in Radiation Oncology (OCAIRO), and by National Institute of Health (grants 5P01CA067165, 5R01CA124377, 5R01CA138586, 2R44DE019322, 7R01CA124377, 5R42CA137886, 8P41EB015898).

lumpnav's People

Contributors

chr1stinayan avatar chriscyyeung avatar jamzad avatar joshehrlich avatar jrobinrodgers avatar kanyala avatar lassoan avatar lauraconnolly avatar shaunlund avatar tavaughan avatar ungi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lumpnav's Issues

Allow loading of saved scenes

If a scene is saved from LumpNav and then I restart Slicer, load that saved scene and start LumpNav, then the scene should be fully functional.

Tested this use case some time ago, LumpNav did not start after loading the saved scene and attempting to start LumpNav. Need to double-check that all the OpenIGTLink connection, markups, model, etc. nodes are not duplicated but properly found by the module.

Add sequences to record data

Create one seq.br. for ultrasound scans that we only record when scanning tissue with ultrasound.

Create another seq.br. for tracking that is recording constantly (transforms only). No need to stop it when we record images.

sequenceBrowser = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLSequenceBrowserNode", sequenceBrowserName)
sequenceNode = sequenceLogic.AddSynchronizedNode(None, transformNode, sequenceBrowser)
sequenceBrowser.SetRecording(sequenceNode, True)
sequenceBrowser.SetPlayback(sequenceNode, True)

sequenceBrowser.SetRecordingActive(True) # Actually start recording

Markups should not be visible on slice view

Red circles (the added markups) appear in the slice view in contouring mode. As it's quite random when the markups are exactly in the slice plane, they randomly appear/disappear, which is not nice. Turn off visibility of the markups to avoid this.

Fix erase button

When erase button is checked in tumor contouring, then when a new point is added, find closest and delete last and closest.
After that, tumor contour should be updated to reflect the deleted point change.

Save scene if there were changes

Add a parameter to the parameter node that tells if it has been changed since last save or not. If user wants to exit with unsaved changes, then save automatically.

Camera setup default parameters should be configurable

Values of

self.cameraXPosSlider, y, z
self.cameraViewAngleSlider

should be saved in the configuration parameters.

Without that the tool appears not in the center (depending on where the sensor is mounted on the tool).

Fix prediction image

  • Prediction image does not have the same dimensions as input image. They should be the same.
  • Push the AI model file in resources
  • During prediction and volume reconstruction, rearrange the transform hierarchy so Needle is effectively World.

Implement Undo cautery calibration

The previous CauteryTipToCautery should be saved when a new pivot calibration is started. This button would change the current one to the saved last one.

each time you do a cautery calibration, save the previous one so we can revert back if the older one has better accuracy and lower error

Notes section

Create a notes submission through vtkMRML text node and created within setup and added to tracking sequence browser

Fix displayed orientation of cautery model

Rotation around the long axis is probably wrong and so the button of the cautery probably appears in incorrect position. The CauteryModelToCauteryTip transform in LumpNav.py should be updated to fix the orientation.

Add AI ultrasound segmentation option

Probably use the module in AIGT extension for this

  • Create a TransdToNeedle transform node
  • When ultrasound recording is started, create a ROI node around the current image position (e.g. 10x10x10 cm)
  • While recording, keep TransdToNeedle updated whenever TransdToReference or NeedleToReference changes
  • While recording, move ImageToTransd to TransdToNeedle, so the images are in Needle coordinate system
  • While recording, continuously run prediction on a separate process
  • While recording, continuously reconstruct a volume
  • While recording, show the cross section of that volume on the live ultrasound image (2D)

Mark points button state can become out of sync

Mark points button state should correspond to the current cursor mode: if in markup placement mode and the selected markup is the tumor markup node then the button should be enabled, otherwise it should be disabled.

These code snippets should help:

Observe selections and interaction node:
https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/Markups/Widgets/qSlicerSimpleMarkupsWidget.cxx#L769..L770

Update button state:
https://github.com/Slicer/Slicer/blob/master/Modules/Loadable/Markups/Widgets/qSlicerSimpleMarkupsWidget.cxx#L686..L693

Add Exit button

Add Exit button. It should not be in a very prominent position - maybe in the advanced tab?

LumpNav fails to initialize when starting with saved scene

  1. Save the scene
  2. Close Slicer
  3. Open the Scene
  4. Start LumpNav

It seems like self.stickModel_CauteryTip is not assigned. I haven't checked yet to see if the "StickModel" is saved together with the other Lump Nav files. Needs investigation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.