Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Nexus Vicon into 3D Slicer through PlusServer #1208

Open
AurelieSar opened this issue Oct 15, 2024 · 5 comments
Open

Integration Nexus Vicon into 3D Slicer through PlusServer #1208

AurelieSar opened this issue Oct 15, 2024 · 5 comments

Comments

@AurelieSar
Copy link

Dear PlusToolkit team,

As you may already know, we are working on the integration of Nexus Vicon into 3D Slicer through PlusServer, to perform 3D freehand ultrasound with Vicon and Qualisys systems.

Here are the attached files :
Configfile_Server.zip

We already succeeded in :

  • creating a OpenIGTLink server using Python that sends random quaternions into the port 18944 (file "my_server.py" attached in the zip). Let's call him "NexusServer" (later we will send the Vicon Nexus data from the rigidbody into this server)
  • creating a OpenIGTLink server using PlusServer that receives data from the NexusServer (18944) and sends data into the port 18946 (config file "my_OpenIGTLinkTracker.xml"), to be read by 3D Slicer. Later, we want to use the PlusServer server to mix data from NexusServer and from the ultrasound, either Telemed or from a videograbber.
  • reading the PlusServer data with 3D Slicer.

We confirm that, when we launch PlusServer server, we do have a client connection to our NexusServer. We also confirm that 3D Slicer connects to the PlusServer server, by displaying "ON", however we have no transform appearing in "IN".

We suspect that the data sent into PlusServer from the NexusServer are not in the right format.

Could you help us with the format of transform needed by PlusServer ?

Best regards,
Aurélie

@lassoan
Copy link
Contributor

lassoan commented Oct 15, 2024

You can see the error in the Slicer Python console:

[VTK] Received unknown device type POSITION, device=Tracker

This means that Slicer ignores POSITION messages. You can use TRANSFORM messages instead.

@AurelieSar
Copy link
Author

Yes indeed thank you very much, we realized our error a few hours after. We now have something appearing in "IN", however it is not yet detected as a transform, we must have forgotten a parameter in the TRANSFORM MESSAGE setting in python.

@lassoan
Copy link
Contributor

lassoan commented Oct 17, 2024

@aaa34169
Copy link

thank for this reply.
I am Aurelie's colleague
I am not sure about the argument "device_name" of the TransformMessage Instance.

if i have the following the plusserver config :

<PlusConfiguration version="2.2">

  <DataCollection StartupDelaySec="1.0" >
    <DeviceSet 
      Name="Fabien - OpenIGTLink tracker connection (Probe, Reference)"
      Description="" 
    />


    <Device
      Id="TrackerDevice"
      Type="OpenIGTLinkTracker"
      MessageType="TRANSFORM"
      ServerAddress="127.0.0.1"
      ServerPort="18944"
      IgtlMessageCrcCheckEnabled="true"
      AcquisitionRate="30"
      LocalTimeOffset="0.0"
      TrackerInternalCoordinateSystemName="Reference"
      ToolReferenceFrame="Reference">
      <DataSources>
        <DataSource Type="Tool" Id="Tracker" />
      </DataSources>
      <OutputChannels>
        <OutputChannel Id="TrackerStream">
          <DataSource Id="Tracker" />
        </OutputChannel>
      </OutputChannels>
    </Device>

  </DataCollection>

  <PlusOpenIGTLinkServer
    MaxNumberOfIgtlMessagesToSend="1"
    MaxTimeSpentWithProcessingMs="50"
    ListeningPort="18946"
    SendValidTransformsOnly="TRUE"
    OutputChannelId="TrackerStream" >
    <DefaultClientInfo>
      <MessageTypes>
        <Message Type="TRANSFORM" />
      </MessageTypes>
      <TransformNames>
        <Transform Name="TrackerToReference" />
      </TransformNames>
    </DefaultClientInfo>
  </PlusOpenIGTLinkServer>

</PlusConfiguration>

I suspect the device_name should point the transform name ( ie TrackerToReference) and not an actual device

am i wrong ?

regards

Fabien

@lassoan
Copy link
Contributor

lassoan commented Oct 17, 2024

Plus always uses the "(FromCoordinateSystem)To(To CoordinateSystem)" as device name. Device name is used as node name in Slicer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants