Real Time Visualization

Hello all,

I am using a Software for OCT that send me a real time frames that it takes and I want to use Slicer to make a real time 3D object Visualization. I need to modify in my software to open Slicer and start sending data feme by frame and start to view the 3D while time.

The problem that I don’t know how to interface with Slicer to make it do this from the Code or how to deal with slicer in real time.

Thanks

Slicer can receive real-time data through OpenIGTLink, a very simple socket-based protocol. Image display, processing, sequence recording/replay, etc. are all already implemented. You can learn more about these features in SlicerIGT tutorials.

We typically use PLUS toolkit to receive image streams from various imaging devices. It may be usable for you as is, if you plan to acquire image from the OCT using a framegrabber. PLUS can also acquire data from various optical, electromagnetic, and other position trackers and reconstruct 3D volumes from 2D image slices in real-time.

1 Like

Could you explain more how can I use this and generate the 3D object by sending my 2D frames.

Until recently, volume reconstruction was always performed by PlusServer, see demo below and step-by-step instructions in SlicerIGT tutorials:

In recent Slicer versions, you can reconstruct volumes in Slicer process, too. @Sunderlandkyl can provide more details if you need this.

I have a device that not supported by the Plus tool here
http://perk-software.cs.queensu.ca/plus/doc/nightly/user/Configuration.html

So I need to send frames from the code and I Can’t find how to make this. The code generate frame by frame and if I have a API that I can use it to send the frame and make volume reconstruction this will be great.

Sorry for to many questions.

You can implement OpenIGTLink protocol to send real-time image, transform, point, etc. data to Slicer. There are libraries for C++, Python, Java, Matlab that can help implementing sending of OpenIGTLink messages. You may also add a new device to Plus toolkit (by cloning and modifying source code of a similar device).

1 Like

Can you help me in this issue

I would not try to use mex files. Instead, you may try native Matlab implementations of OpenIGTLink, such as this: https://github.com/SlicerIGT/MatlabOpenIGTLink

We migrated all our projects from Matlab to Python, so we cannot help much with these Matlab implementations anymore. However, if Python is an option for you then we can definitely help you with that.

actually my project is with cpp and now I just want any easy tool to make a prototype then I will work on the integration with the cpp software.

So if you can help in python I could make the prototype with it it’s fine to make this.

Also I see in one of your comments that there is a team in vanderbilt that work with this tool as I am in vanderbilt so can you tell me who to ask ?

Thanks

Also this : https://github.com/SlicerIGT/MatlabOpenIGTLink in for only STRING, TRANSFORM and NDArray(1D Float Array) messages and I have a volume which is collection of 2D images .

There have been several OpenIGTLink Matlab implementations, some of them able to transfer images, too, but if you need C++ then you can use this SDK: https://github.com/openigtlink/OpenIGTLink. It has C++ examples that you can use as “prototypes” as is.

There is a small native Python OpenIGTLink implementation, which already supports a few basic message types: https://github.com/SlicerIGT/pyIGTLink.

I use windows 10 with amd64 what is the version of the Cmake that should I use and which generator to use with is like the attached image 1

Also after that I how tyo compile the sln as I tried to compile it with diffrent versions of Visual studio but I don’t get the 2 files that is needed as the build instructions here say:

Also this is the logs of the configration and I don’t know whats wrong

Configuration log
Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.18362.
The C compiler identification is MSVC 19.0.24215.1
The CXX compiler identification is MSVC 19.0.24215.1
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE  
Looking for getsockname in socket
Looking for getsockname in socket - not found
Checking for getsockname with socklen_t
Checking for getsockname with socklen_t -- no
Looking for strnlen
Looking for strnlen - found
Looking for SO_REUSEADDR
Looking for SO_REUSEADDR - not found
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of int
Check size of int - done
Check size of long
Check size of long - done
Check size of void*
Check size of void* - done
Check size of char
Check size of char - done
Check size of short
Check size of short - done
Check size of float
Check size of float - done
Check size of double
Check size of double - done
Check size of long long
Check size of long long - done
Check size of __int64
Check size of __int64 - done
Check size of int64_t
Check size of int64_t - done
CMake Warning (dev) at C:/Devel/OpenIGTLink_build/OpenIGTLinkConfig.cmake:67 (include):
  Policy CMP0024 is not set: Disallow include export result.  Run "cmake
  --help-policy CMP0024" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  The file

    C:/Devel/OpenIGTLink_build/OpenIGTLinkTargets.cmake

  was generated by the export() command.  It should not be used as the
  argument to the include() command.  Use ALIAS targets instead to refer to
  targets by alternative names.

Call Stack (most recent call first):
  Testing/CMakeLists.txt:4 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.18362.

-- Configuring done

-- Generating done

-- Build files have been written to: C:/Devel/OpenIGTLink_build/Testing/googletest-download

Microsoft (R) Build Engine version 14.0.25420.1
Copyright (C) Microsoft Corporation. All rights reserved.


Build started 8/12/2019 12:55:01 PM.

Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\ALL_BUILD.vcxproj" on node 1 (default targets).

Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\ALL_BUILD.vcxproj" (1) is building "C:\Devel\OpenIGTLink_build\Testing\googletest-download\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:

  Creating directory "x64\Debug\ZERO_CHECK\".

  Creating directory "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\".

InitializeBuildStatus:

  Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

CustomBuild:

  Checking Build System

  CMake does not need to re-run because C:/Devel/OpenIGTLink_build/Testing/googletest-download/CMakeFiles/generate.stamp is up-to-date.

FinalizeBuildStatus:

  Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".

  Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".

Done Building Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\ZERO_CHECK.vcxproj" (default targets).

Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\ALL_BUILD.vcxproj" (1) is building "C:\Devel\OpenIGTLink_build\Testing\googletest-download\googlemock.vcxproj" (3) on node 1 (default targets).

PrepareForBuild:
  Creating directory "x64\Debug\googlemock\".

  Creating directory "x64\Debug\googlemock\googlemock.tlog\".

InitializeBuildStatus:

  Creating "x64\Debug\googlemock\googlemock.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ComputeCustomBuildOutput:

  Creating directory "C:\Devel\OpenIGTLink_build\Testing\googletest-download\googlemock-prefix\src\googlemock-stamp\Debug\".

  Creating directory "C:\Devel\OpenIGTLink_build\Testing\googletest-download\CMakeFiles\Debug\".

CustomBuild:

  Creating directories for 'googlemock'

  Building Custom Rule C:/Devel/OpenIGTLink_build/Testing/googletest-download/CMakeLists.txt

  CMake does not need to re-run because C:/Devel/OpenIGTLink_build/Testing/googletest-download/CMakeFiles/generate.stamp is up-to-date.

  Performing download step (download, verify and extract) for 'googlemock'

  -- Downloading...

     dst='C:/Devel/OpenIGTLink_build/Testing/googletest-download/googlemock-prefix/src/release-1.7.0.zip'
     timeout='none'

  -- Using src='https://github.com/google/googlemock/archive/release-1.7.0.zip'

  -- [download 1% complete]

  -- [download 2% complete]

  -- [download 4% complete]

  -- [download 5% complete]

  -- [download 8% complete]

  -- [download 11% complete]

  -- [download 14% complete]

  -- [download 15% complete]

  -- [download 16% complete]

  -- [download 20% complete]

  -- [download 24% complete]

  -- [download 26% complete]

  -- [download 30% complete]

  -- [download 35% complete]

  -- [download 38% complete]

  -- [download 50% complete]

  -- [download 54% complete]

  -- [download 56% complete]

  -- [download 57% complete]

  -- [download 58% complete]

  -- [download 61% complete]

  -- [download 62% complete]

  -- [download 65% complete]

  -- [download 68% complete]

  -- [download 72% complete]

  -- [download 73% complete]

  -- [download 82% complete]

  -- [download 91% complete]

  -- [download 100% complete]

  -- Downloading... done

  -- extracting...

       src='C:/Devel/OpenIGTLink_build/Testing/googletest-download/googlemock-prefix/src/release-1.7.0.zip'
       dst='C:/Devel/OpenIGTLink_build/Testing/gmock'

  -- extracting... [tar xfz]

  -- extracting... [analysis]

  -- extracting... [rename]

  -- extracting... [clean up]

  -- extracting... done

  No update step for 'googlemock'

  No patch step for 'googlemock'

  No configure step for 'googlemock'

  No build step for 'googlemock'

  No install step for 'googlemock'

  No test step for 'googlemock'

  Completed 'googlemock'

FinalizeBuildStatus:

  Deleting file "x64\Debug\googlemock\googlemock.tlog\unsuccessfulbuild".

  Touching "x64\Debug\googlemock\googlemock.tlog\googlemock.lastbuildstate".

Done Building Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\googlemock.vcxproj" (default targets).

Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\ALL_BUILD.vcxproj" (1) is building "C:\Devel\OpenIGTLink_build\Testing\googletest-download\googletest.vcxproj" (4) on node 1 (default targets).

PrepareForBuild:
  Creating directory "x64\Debug\googletest\".

  Creating directory "x64\Debug\googletest\googletest.tlog\".

InitializeBuildStatus:

  Creating "x64\Debug\googletest\googletest.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

ComputeCustomBuildOutput:

  Creating directory "C:\Devel\OpenIGTLink_build\Testing\googletest-download\googletest-prefix\src\googletest-stamp\Debug\".

CustomBuild:

  Creating directories for 'googletest'

  Building Custom Rule C:/Devel/OpenIGTLink_build/Testing/googletest-download/CMakeLists.txt

  CMake does not need to re-run because C:/Devel/OpenIGTLink_build/Testing/googletest-download/CMakeFiles/generate.stamp is up-to-date.

  Performing download step (download, verify and extract) for 'googletest'

  -- Downloading...

     dst='C:/Devel/OpenIGTLink_build/Testing/googletest-download/googletest-prefix/src/release-1.7.0.zip'
     timeout='none'

  -- Using src='https://github.com/google/googletest/archive/release-1.7.0.zip'

  -- [download 0% complete]

  -- [download 2% complete]

  -- [download 4% complete]

  -- [download 5% complete]

  -- [download 6% complete]

  -- [download 7% complete]

  -- [download 8% complete]

  -- [download 10% complete]

  -- [download 12% complete]

  -- [download 13% complete]

  -- [download 15% complete]

  -- [download 18% complete]

  -- [download 20% complete]

  -- [download 23% complete]

  -- [download 25% complete]

  -- [download 29% complete]

  -- [download 32% complete]

  -- [download 33% complete]

  -- [download 34% complete]

  -- [download 35% complete]

  -- [download 36% complete]

  -- [download 37% complete]

  -- [download 40% complete]

  -- [download 42% complete]

  -- [download 43% complete]

  -- [download 46% complete]

  -- [download 56% complete]

  -- [download 61% complete]

  -- [download 64% complete]

  -- [download 66% complete]

  -- [download 69% complete]

  -- [download 72% complete]

  -- [download 79% complete]

  -- [download 87% complete]

  -- [download 90% complete]

  -- [download 97% complete]

  -- [download 100% complete]

  -- Downloading... done

  -- extracting...

       src='C:/Devel/OpenIGTLink_build/Testing/googletest-download/googletest-prefix/src/release-1.7.0.zip'
       dst='C:/Devel/OpenIGTLink_build/Testing/gtest'

  -- extracting... [tar xfz]

  -- extracting... [analysis]

  -- extracting... [rename]

  -- extracting... [clean up]

  -- extracting... done

  No update step for 'googletest'

  No patch step for 'googletest'

  No configure step for 'googletest'

  No build step for 'googletest'

  No install step for 'googletest'

  No test step for 'googletest'

  Completed 'googletest'

FinalizeBuildStatus:

  Deleting file "x64\Debug\googletest\googletest.tlog\unsuccessfulbuild".

  Touching "x64\Debug\googletest\googletest.tlog\googletest.lastbuildstate".

Done Building Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\googletest.vcxproj" (default targets).

PrepareForBuild:

  Creating directory "x64\Debug\ALL_BUILD\".

  Creating directory "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\".

InitializeBuildStatus:

  Creating "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.

CustomBuild:

  Building Custom Rule C:/Devel/OpenIGTLink_build/Testing/googletest-download/CMakeLists.txt

  CMake does not need to re-run because C:/Devel/OpenIGTLink_build/Testing/googletest-download/CMakeFiles/generate.stamp is up-to-date.

FinalizeBuildStatus:

  Deleting file "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".

  Touching "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".

Done Building Project "C:\Devel\OpenIGTLink_build\Testing\googletest-download\ALL_BUILD.vcxproj" (default targets).



Build succeeded.

    0 Warning(s)
    0 Error(s)


Time Elapsed 00:00:03.70

Found PythonInterp: C:/Users/diigi/Anaconda2/python.exe (found version "2.7.15") 
Configuring done

@ahmed_elshreif Your OpenIGTLink build succeeded as evident by the following:

Build succeeded.

0 Warning(s)
0 Error(s)

igtlSocketTest.cxx is currently commented out from the OpenIGTLinkTesting project. Someone had a similar issue and the developer that previously spent a lot of time on the project responded here. As you have noticed the build instructions are not completely up-to-date, however you have built the project successfully.