User Tools

Site Tools


optitrack_calib

Optitrack Calibration - Stylus, Needle, Probe, Probe Image

  • Connect the camera, place the sensors and open Motive Software

Creating all necessary files

  • In Motive, make sure you only see the points (markers) placed on your tools. Be careful about reflections, as they can cause a lot of problems, so choose the placement of your work environment until you see them clearly. Here are two examples, one with reflection, one without.

  • Define your tools: by selecting every point on the same tool, Right click → Rigid Body → Create from selected markers. Repeat for every tool (Patient, Probe, Stylus, Needle, etc.)

  • Go to the Project tab, you should see the tools you have just defined. Right click on every tool and Rename Asset# to Probe, Patient, Stylus, etc.)
  • After renaming, export every tool by Right Click → Export Rigid Body. Save it to a preferred empty directory, with the same name you used for the tool in the previous step. All tools should be in the same directory. Repeat for every tool.
  • Save the project by File→Save project as.. . Choose a project name and save it in the same directory where you saved the tools.

HINT! Do not close the Motive Software during the process. If this happens, start everything for the beginning

Plus connection

  • To connect to the Plus Server, place the Plus Config file in the same Directory with the project and the tools. Find an example of the config file .CHANGE CONFIG FILE Note you may have to check the config file contents to see if the project name and the tool names match yours.
  • For example, we have our tools (Patient, Stylus and Probe. Beware! names are case sensitive). We change the ProjectFile Tag in the config and for our tools we change the Data sources Tag, The Output Channel Tag and the Transforms. If you use more, tools, access this details page about the Plus Config file
  • Optionally, you can change the name of the configuration by adjusting the DeviceSet → Name Tag
  • Save the config file! Make sure it is in the same directory as the project and the tools as stated before.
  • The folder structure should look like this:

  • Launch the Plus Server, choose the directory of your project. You should see the previously created config file in the Device Set List (Don't forget to connect the Ultrasound if you are using one).
  • Launch Server → The status indicator on bottom right should be green and the Output Console should say Connection Successful

Prepare Slicer for the Calibration

  • In the Connector Area, Click on + to create a new connection.
  • In the Properties section, Client should be checked. Also make sure that it is the same port defined in your Plus Config File.
  • Check the Active box to start the connection
  • Under I/O Configuration, you should see under the Connection all transforms defined in the Plus Config File.
  • Load the Patient model (Phantom) into the slicer using drag and drop. A model example can be downloaded here.

The actual Calibration

Stylus

  • Create the stylus model by going to IGT Module → Create Models
  • Choose create needle. The needle should appear on the screen and NeedleModel should appear in the list:

  • Since we are actually using a Stylus, not a Needle, we will rename NeedleModel to StylusModel. The naming does not influence the project, but we choose to do it for clarity
  • Go to Data → Transform Hierarchy tab → Right click on Scene and Insert Transform

  • A LinearTransform appears in the list. Rename to StylusTipToStylus (or NeedleTipToNeedle)

  • Create the following tree structure by dragging the items with your mouse. NeedleModel should be under StylusTipToStylus and StylusTipToStylus should be under StylusToTracker

  • To start the calibration go to IGT → Pivot Calibration

  • In the IO Section, Input(ToolToReference) should be StylusToPatient and Output(ToolTipToTool) should be StylusTipToStylus

  • Start Pivot Calibration (Optionally you can check in Motive that you see the movement of the Stylus
  • Rotate the Stylus as shown in the following Video:

  • This step needs some skill, so you may have to repeat it. If the calibration is not successful, 3DSlicer shows Pivot calibration failed You may also get a suggestion about what went wrong. Repeat until it says:Sampling complete and the Root-Mean-Square Error is under the value of 1. Make sure the markers of the Stylus are oriented towards the camera. Make sure the Stylus or your hand is bot between the camera and other markers. Do not go to fast. Adjust the angle of the rotation between 10 and 20 degrees.
  • Start Spin Calibration. Move the Stylus as shown in the video. As previously, the error should be under 1

HINT! If you already have a NeedleModel, import it into 3dSlicer using Drag and Drop and do the Pivoting and Spinning calibration

Patient

  • In the Transform Hierarchy (Accessible by clicking the Data button in the Slicer, as shown in the previous chapter) move the StylusToTracker node inside TrackerToPatient.
  • Insert a new transform (Right Click on Scene)
  • Rename it to PhantomModelToPatient. Note this is only in the Scene, it's outside the TrackerToPatientNode
  • The following image describes all the transforms in the scene:

  • Go to IGT → Fiducial Registration Wizzard

  • In the From fiducials screen, create the PhantomModelFids. In the From.. section, select Create new point list as… (instead of the current None)
  • SELECT the points in REAL LIFE MODEL in the same order you will select them in THE VIRTUAL MODEL In 3D Slicer. THE POINTS HAVE TO BE CHOSEN FOLLOWING THE CRITERIA OF BEING EASY TO IDENTIFY AND BE UNMISTAKABLE.
  • In the To fiducials screen, create the PatientFids (2)
  • In the Place fiducials using transforms screen, choose StylusTipToStylus in the second DropDown (3)
  • In the Registration result screen, choose the PhantomModelToPatient transform (4)

  • In the From section - click Place a control point for each calibration point of the model

  • Place the Stylus Tip in the Model Markers(located usually on the most exterior points of the model) and click on Place to In the To fiducial section

  • Go to Data, and move the Phantom models and the PhantomModelFids under PhantomModelToPatient
  • It should look like this image:

Probe

  • Load the Ultrasound Model using Drag and Drop. You can download an ultrasound Probe Model here

  • Move the StylusToTracker inside TrackerToProbe (only for Calibration)

  • Create a new transform named ProbeModelToProbe
  • Go to IGT → Fiducial Registration Wizzard
  • Create a new Fiducials Registration Wizard

  • In the From fiducials screen, create the ProbeModelFids
  • In the To fiducials screen, create the ProbeFids
  • In the Place fiducials using transforms screen, choose StylusTipToStylus in the second DropDown.
  • In the Registration result screen, choose the ProbeModelToProbe transform
  • In the From section - click Place a control point for each calibration point of the model

  • Place the Stylus Tip in the Model Markers(located usually in the extremities of the model/object) and click on Place to In the To fiducial section

  • Go to Data, and move all Probe related nodes under ProbeModelToProbe

  • Move the ProbeModelToProbe under ProbeToTracker
  • Move ProbeToTracker under TrackerToPatient
  • Move the StylustoTracker under TrackerToPatient

Image from the probe

Option 1 (With Stylus)

  • Go to Data, in the Subject Hierachy Tab and make the Image Reference visible
  • By default, it will appear in the Green screen. It is more common to use it in the red screen. So you can drag it there.
  • Fill a recipient with water. The water should be at least 10 cm deep
  • Move the ProbeToTracker under Scene
  • Move StylusToTracker under TrackerToProbe
  • Create a new Transform named ImageToProbe
  • Go to IGT → Fiducial Registration Wizzard
  • Create new Fiducial Registration Wizzard
  • In the From fiducials screen, create the ImageModelFids
  • IN the To fiducials screen, create the ProbeImageFids
  • In the Place fiducials using transforms screen, choose StylusTipToStylus in the second DropDown.
  • In the Registration result screen, choose the ImageToProbe
  • Set Result Transform Type to Similarity
  • Introduce the tip of the Probe in the water, together with the stylus
  • In the From section - click Place 8 control points by clicking on the ultrasound image in the red screen, where you see the stylus tip
  • After each control point, click on Place to in the To fiducial section
  • You will probably need some help with these steps
  • Go to Data, and move StylusToTracker and ProbeToTracker under TrackerToPatient
  • Move ImageToProbe under ProbeToTracker
  • Your tranforms tree should look like this:

Option 2

(With Hook. Work in progress)
  • Change the Motive project by creating a new RigidBody for the Hook, export and save it following the same steps yo did at the begining.
  • Add the tool in the config file. Also you have to create three new transforms: HookToTracker, TrackerToHook and StylusToHook.
  • Check the Project name in the config file.
  • Perform the same steps as Option 1, using the hook instead of the Stylus

Option 3 (The safe choice)

  • For this option, you need to know the dimensions of the ultrasound image
  • Build a plane model with this dimensions. An example can be be found here for (5×4 cm)
  • In the Transform Hierarchy move the Probe Model under Scene together with the Plane Model and the Image Reference
  • The plane should be an extension of the probe. If it's not the case, you need to adjust it with a transform.
  • Go to Data, in the Subject Hierachy Tab and make the Image Reference visible
  • By default, it will appear in the Green screen. It is more common to use it in the red screen. So you can drag it there.
  • Define a new Transform named ImageToProbe
  • Go to IGT → Fiducial Registration Wizzard
  • Create new Fiducial Registration Wizzard
  • In the From fiducials screen, create the ImageFids
  • IN the To fiducials screen, create the PLaneModelFids
  • Do the the fiducials registration from ImageFids(Image_References corners) to PlaneModelFids(corners), in the same order.
  • Remember, it is just a plane rectangular surface, so adapt ce coefficients manually to be perfect like this: SCREENSHOT
  • In the Registration result screen, choose the ImageToProbe
  • Set Result Transform Type to Similarity
  • Build the following transform tree structure

  • Go to IGT → Volume reslice driver
  • In the red screen, set Driver to Image_Reference and Mode to Transverse
  • If the ultra sound image is not complete, you may need to center it in the red screen.

Hint! At this point you have two options to save everything, so that you don't have to repeat this the next time

Troubleshooting

Q: The image of the Probe looks like a dotted line

A: Go to IGT → Volume Reslice Driver. Driver should be Image_Reference and Mode should be Transverse

optitrack_calib.txt · Last modified: 2024/02/02 15:00 by costin