RTK installation problem any help appreciated

Hi,

Firstly thank you for the help!

  1. I did download the RTK, then I separately from ITK tried to build the RTK source code but failed with different configuration errors in CMake before generate and build it in vs2017 just like I did with VTK & ITK. Then I saw article that I should copy it to the Modules folder of ITK and build and install them together! this worked but when I tried to test my installation with HelloWorld of RTK it gives error in configure in CMake that RTK is not installed!? technically RTK is all under ITK and there is no path for RTK in my system path!

  2. This is HelloWorld/CMakeList.txt file:

cmake_minimum_required(VERSION 2.8)
project(HelloWorld)

if(NOT TARGET RTK)
   find_package(RTK REQUIRED)
   include(${RTK_USE_FILE})
endif

add_executable(HelloWorld    HelloWorld.cxx)
target_link_libraries(HelloWorld ${RTK_LIBRARIES})
target_link_libraries(HelloWorld ${ITK_LIBRARIES})

can I set the path for RTK which is nested inside the ITK with set or set path inside this HelloWorld/CMakeLists.txt file so the build process can go and find RTK build inside the ITK build which is on my system path of PC?

  1. How do you install RTK separately from ITK without getting stuck in CMake configure step?

Regards
sag

@simon.rit can best answer this. But have you tried:

find_package(ITK REQUIRED)
include(${ITK_USE_FILE})

If you placed RTK into Modules (or enabled Module_RTK when configuring ITK), RTK should be one of ITK’s modules and you should not need special configuration for it.

RTK needs to be added to the find_package(ITK [...] COMPONENTS. i.e.

cmake_minimum_required(VERSION 2.8)
project(HelloWorld)

find_package(ITK REQUIRED
  COMPONENTS
    RTK
    ITKCommon
    ITKImageIO
    # [...]
    # Any other ITK modules identified by the WhatModulesITK.py
  )
include(${ITK_USE_FILE})

add_executable(HelloWorld    HelloWorld.cxx)
target_link_libraries(HelloWorld ${ITK_LIBRARIES})

See also the WhatModulesITK.py script.

1 Like

Hi mat,

thanks for the help it worked. I have been struggling with the file format for example firstReconstruction in rtf examples. I managed to build it.
it seems that I have to run it as follows:

FirstReconstruction.exe outputimage.xxx outputgeometry.rtk
question: what would be the format for output image.xxx?
secondly is that correct to set geometry file format to .rtk?
thirdly, it seems that the output image is a 3D image I assume! but how to view this image?

Regards,
sag

hi dzenanz,

thanks for the help it worked. I have been struggling with the file format for example firstReconstruction in rtf examples. I managed to build it.
it seems that I have to run it as follows:

FirstReconstruction.exe outputimage.xxx outputgeometry.rtk
question: what would be the format for output image.xxx?
secondly is that correct to set geometry file format to .rtk?
thirdly, it seems that the output image is a 3D image I assume! but how to view this image?

Regards,
sag

Hi @sag,

In case it is helpful, note that there is a CMakeLists.txt for the FirstReconstruction example.

ITK supports many formats, but standby’s are MetaImage, *.mha or NRRD, *.nrrd.

XML (.xml)

A few good options:

I hope this helps,
Matt

hi matt,

Thank you it worked. I would like to write a 3d viewer myself any ideas where I can get some info, code, anything that help me to write it. I would like to use it in MFC, android, mobile app, etc. and place it in a grid like view to process it with mouse interaction.

Regards,
sag

1 Like

The most universal applications now are progressive web apps like itk-vtk-viewer or ParaViewGlance.

1 Like

Hi matt,

Thanks you, I just saw my first reconstruction using RTK.

Regards,

1 Like

Thanks a lot @matt.mccormick and @dzenanz for helping @sag. I hadn’t realize that the HelloWorld code was on RTK’s wiki, I have removed it from the tree a few weeks ago because it was outdated (precisely the issue that @sag encountered) and I thought that FirstReconstruction was sufficient. I have updated the wiki to correct this but a few other things are outdated and I’ll work on a better introduction for users.

2 Likes