Git Product home page Git Product logo

rg2 / xreg Goto Github PK

View Code? Open in Web Editor NEW
89.0 5.0 17.0 1.24 MB

Library and executables for modeling and registration applications in medical image analysis. Particular emphasis on intraoperative fluoroscopic (X-ray) navigation via 2D/3D registration.

License: MIT License

CMake 3.72% C++ 94.32% Shell 0.56% Batchfile 0.39% Objective-C++ 0.29% Python 0.71%
cplusplus cpp opencl registration itk x-ray ray-casting medical-image-analysis fluoroscopy similarity-metrics

xreg's Introduction

xReg: Modeling and Registration Software for Surgery

Introduction

This repository contains library routines and stand-alone programs for various modeling and registration tasks relating to surgery, with a particular focus on 2D/3D registration for intraoperative X-ray navigation. Although xReg was developed from a practical approach and provides an out-of-the-box capability for intraoperative fluoroscopic navigation, it is also very much compatible with research-oriented goals. In addition to accelerating the development of new registration components through the extendable interfaces for ray casting, image similarity computation and iterative optimization, xReg is also useful as an initial baseline for evaluating the neural network approaches du jour.

Much of the functionality provided by xReg is also useful for other computer-assisted surgery tasks. A comprehensive listing of the features of the library are provided below, along with a list of the executable programs that are also included in this repository. Please visit the wiki for descriptions on the use of the library and executable programs. Basic usage of the executables is provided via a walkthrough/tutorial here. Please submit an issue for any problems, feature requests, or suggestions.

This software was originally created while conducting research with Russell Taylor, Mehran Armand, and Mathias Unberath within the Laboratory for Computational Sensing and Robotics at Johns Hopkins University and with Yoshito Otake of the Imaging-based Computational Biomedicine Laboratory at NAIST. The current repository represents a rewrite/refactor of the original, internal, version of this software, with a focus on minimizing compile times and being reusable to novice developers and researchers.

General Capabilities

A listing of the high-level capabilities of the xReg library is provided below. Stand-alone programs provide implementations of common, but very specific, use-cases, such as 2D/3D registration of a pelvis model to a single fluoroscopic view. These programs also serve as usage examples for the xReg library.

A detailed listing of the features and programs, along with links to the appropriate source files is provided in the Features Index.

Library Features

  • Registration:
    • Efficient ray casters for 2D/3D registration and visualization
    • Image similarity metrics for driving 2D/3D registrations
    • Various optimization strategies for 2D/3D intensity-based registration
    • Pipeline for chaining together 2D/3D registrations
    • Perspective-n-Point (PnP) solvers (paired point 2D/3D)
    • Point-based 3D/3D registration methods
  • Mesh Processing
  • Image/Volume Processing
  • Numerical Optimization
  • Geometric Primitives and Spatial Data Structures
  • Spatial Transformation Utilities
  • Visualization
  • Basic Math Utilities
  • General/Common Utilities (e.g. string parsing, filesystem objects)
  • Hip Surgery (e.g. planning, modeling, simulation)

Planned Work

Although the following capabilities currently only exist in an internal version of the xReg software, they will be incorporated into this repository at a future date:

  • Executable for running a multiple-view/multiple-resolution 2D/3D registration pipeline defined using a configuration file
  • Intraoperative reconstruction of PAO bone fragments
  • Utilities for creation and manipulation of statistical shape models
  • Shape completion from partial shapes and statistical models
  • More point cloud manipulation utilities
  • Python bindings, conda integration
  • And more...

Building

A standard CMake configure/generate process is used. It is recommended to generate Ninja build files for fast compilation. Example scripts for building all dependencies and the xReg repository are provided for POSIX systems (e.g. MacOS and Linux) here and here, and also for Windows. The docker directory demonstrates how Docker may be used to build the software.

Dependencies

  • C++ 11 compatible compiler
    • Tested with various flavors of gcc and Apple clang, and Visual Studio 2019
  • External libraries (compatible versions are listed):
    • Intel Threading Building Blocks (TBB) (20170919oss, v2020.3)
    • Boost (header only) (1.74)
    • Eigen3 (3.3.4)
    • fmt (5.3.0)
    • NLOpt (2.5.0)
    • ITK (5.1.1)
    • VTK (8.2.0)
    • OpenCV (3.4.12)
    • ViennaCL (1.7.1)
    • Highly recomended for GPU acceleration: OpenCL (1.x)
      • Only needed at runtime on Windows and Linux and is typically provided with your graphics drivers or CUDA SDK
      • Included with MacOS
    • Optional: ffmpeg is used for writing videos when it is found in the system path. When ffmpeg is not found, the following fallbacks are used:
      • MacOS: a video writer using AVFoundation,
      • Windows, Linux, something else: a writer using OpenCV.

Testing

Functional testing is available in the form of a python script that runs the commands found on the wiki walkthrough. Results of the commands need to be examined by the user and determined to be successful or failures. All necessary data is downloaded automatically. When the appropriate visualization programs are available on the system, the script also automatically loads the output data for inspection.

License and Attribution

The software is available for use under the MIT License.

If you have found this software useful in your work, we kindly ask that you cite the most appropriate references listed here.

xreg's People

Contributors

rg2 avatar zhuczhuc avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

xreg's Issues

Target Opencv contains Eigen3::Eigen but was not found.

By running the example_build_script_2,I was able to build all the third-party packages, but when I tried to build xreg, I got the following error:

CMake Warning at apps/image_io/convert_resample_dicom/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-convert-dicom-vols because files in some directories may conflict with
  libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/report_dicom/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-report-dcm
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/crop_vol/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-crop-vol because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/remap_and_tile_proj_data/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-remap-tile-proj-data because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/extract_nii_from_proj_data/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-proj-data-extract-nii because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/add_lands_to_proj_data/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-add-lands-to-proj-data because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/draw_xray_scene/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-draw-xray-scene
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/regi2d3d_replay/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-regi2d3d-replay
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/convert_rad_raw_to_proj_data/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-convert-rad-raw-to-proj-data because files in some directories may
  conflict with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/convert_sta_raw_to_itk/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-convert-sta-raw-to-itk because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/convert_radiograph_dicom_to_proj_data/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-convert-dicom-radiograph because files in some directories may
  conflict with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/make_video_from_image_dir/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-vid-from-img-dir
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/remap_dicom_dir/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-remap-dcm-dir
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/proj_cat/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-proj-cat because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/proj_make_fiducial_world/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-proj-make-fiducial-world because files in some directories may
  conflict with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/proj_est_orbital_rot/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-proj-est-orbital-rot because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/image_io/convert_spare_projs_to_proj_data/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-convert-spare-proj-data because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/mesh/create_mesh/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-create-mesh
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/mesh/show_mesh/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-show-mesh
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/mesh/sur_regi/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-sur-regi because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/point_clouds/print_lands/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-print-lands
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/point_clouds/xform_fcsv/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-xform-fcsv
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pao/create_fragment/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-pao-create-frag
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pao/draw_bones/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target xreg-pao-draw-bones
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pao/sample_frag_moves/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-pao-sample-frag-moves because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pao/create_repo_vol/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-pao-create-repo-vol because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pao/add_screw_kwires_to_vol/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-pao-add-screw-kwires-to-vol because files in some directories may
  conflict with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pao/create_synthetic_fluoro/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-pao-create-synth-fluoro because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pao/frag_multi_view_regi_2d_3d/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-pao-frag-mult-view-regi-2d-3d because files in some directories may
  conflict with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/hip_surgery/pelvis_single_view_regi_2d_3d/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-hip-surg-pelvis-single-view-regi-2d-3d because files in some
  directories may conflict with libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Warning at apps/transforms/print_rigid_transform/CMakeLists.txt:25 (add_executable):
  Cannot generate a safe runtime search path for target
  xreg-print-rigid-xform because files in some directories may conflict with
  libraries in implicit directories:

    runtime library [libtbb.so.2] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/josh/bigss/xreg_ws/xreg_deps_install/tbb/lib/intel64/gcc4.7

  Some of these libraries may not be found correctly.


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:76 (set_target_properties):
  The link interface of target "opencv_core" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:83 (set_target_properties):
  The link interface of target "opencv_flann" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:90 (set_target_properties):
  The link interface of target "opencv_imgproc" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:97 (set_target_properties):
  The link interface of target "opencv_ml" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:104 (set_target_properties):
  The link interface of target "opencv_photo" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:111 (set_target_properties):
  The link interface of target "opencv_video" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:118 (set_target_properties):
  The link interface of target "opencv_dnn" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:125 (set_target_properties):
  The link interface of target "opencv_features2d" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:132 (set_target_properties):
  The link interface of target "opencv_imgcodecs" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:139 (set_target_properties):
  The link interface of target "opencv_shape" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:146 (set_target_properties):
  The link interface of target "opencv_videoio" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:153 (set_target_properties):
  The link interface of target "opencv_calib3d" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:160 (set_target_properties):
  The link interface of target "opencv_highgui" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:167 (set_target_properties):
  The link interface of target "opencv_objdetect" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:174 (set_target_properties):
  The link interface of target "opencv_stitching" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:181 (set_target_properties):
  The link interface of target "opencv_superres" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)


CMake Error at /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVModules.cmake:188 (set_target_properties):
  The link interface of target "opencv_videostab" contains:

    Eigen3::Eigen

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/josh/bigss/xreg_ws/xreg_deps_install/share/OpenCV/OpenCVConfig.cmake:126 (include)
  CMakeLists.txt:104 (find_package)

Any help is appreciated!

Registration fails when using AMD OpenCL device on MacOS 10.15

Run the wiki commands for registration and registration replay (https://github.com/rg2/xreg/wiki/Walkthrough%3A-Single-View-Pelvis-Registration), but pass a device ID corresponding to an AMD OpenCL device. Although the commands complete, the results are completely incorrect.

For example:

xreg-regi2d3d-replay regi_debug_example1_1_pd_003_proj0_w_seg.h5 --video-fps 10 --proj-ds 0.5 --ocl-id AMDRadeonPro5500MComputeEngine

First inspection indicates that reads to the 3D texture object (read_imagef()) are always returning zero during ray casting.

FCSV files created in recent 3D Slicer versions are not properly parsed

The default behavior of recent 3D Slicer versions (e.g. 4.11.x) is to write FCSV files with points already in LPS coordinates. The xReg parsing code assumes RAS coordinates, consistent with FCSV files saved from Slicer 4.10.

Modifications should be made that check the file version and coordinate system strings.

Adding-to-Other-Software link dead in wiki

Hi Rob, hope you are well.

I noticed the link in one of the FAQs in the wiki does not work. I was hoping to use xreg as a dependency for other code, was having some issues, and thought that whatever may have been linked here in the past could have been helpful. I've replicated the portion on the wiki below:

How do I incorporate this library into my software?
The xReg library is most easily incorporated using standard CMake practices, such as add_subdirectory() and find_package(). See this page for more details.

I will briefly ask your opinion on what I am trying to do and see if you have a quick suggestion:
I have been using / expanding on some of Cong's 2d/3d CM registration work. I would prefer not to continue using an 'unofficial fork' of xreg as has been done to this point, but rather build xreg and then use it as a dependency for any custom code development. This development doesn't lend itself to living within xreg (e.g. specific applications for our robot and ROS wrappers for triggering image registration, etc.).

At the moment, the plan is as follows:
Build xreg e.g. at ~/xreg/ and then have a separate package e.g. at ~/cm_robot_regi/ that would find and use xreg as a dependency.

An excerpt from the CMakeLists for cm_robot_regi might be something like (where test.cpp has some xreg includes):

project(cm_robot_regi)
cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR)
set (CMAKE_CXX_STANDARD "17" CACHE STRING "C++ Standard (needs at least 17)")
find_package(xreg REQUIRED HINTS ~/xreg/build)
add_executable(TEST_EXE test.cpp)
target_link_libraries(TEST_EXE xreg::xreg)

This doesn't work as I've written it, at the moment it seems like I may need to add additional find_package() for e.g. VTK, ITK, etc. (I get cmake errors expecting links to e.g. VTK::XYZ whenever I do the target_link_libraries()). I'm pursuing this avenue, but I feel I might be missing the big picture here.

I'm interested in your thoughts: 1) does this approach make sense? and 2) do you have a better suggested method for doing it if so?

Thanks!

implementation of gradient orientation

I have found GO metric is widely used in papers from your research team. And this metric is proposed also from your research team:

@Article{DeSilva2016,
  author    = {De Silva, T and Uneri, A and Ketcha, M D and Reaungamornrat, S and Kleinszig, G and Vogt, S and Aygun, N and Lo, S-F and Wolinsky, J-P and Siewerdsen, J H},
  journal   = {Physics in Medicine and Biology},
  title     = {3Dโ€“2D image registration for target localization in spine surgery: investigation of similarity metrics providing robustness to content mismatch},
  year      = {2016},
  issn      = {1361-6560},
  month     = mar,
  number    = {8},
  pages     = {3009--3025},
  volume    = {61},
  doi       = {10.1088/0031-9155/61/8/3009},
  publisher = {IOP Publishing},
}

But I just noticed you compute the GO metric with cosine distance for moving and fixed gradient magnitute image in 2.3.2.1 in above paper(filted with a threshold). And the code basicly followed the formela (4), also gradient magnitute used, not gradient orientation.

$$ Ga=\sqrt(G_x^2+G_y^2) \\ Go = \arctan(\frac{G_y}{G_x}) $$

Here is my question, why you use cosine distance for moving and fixed gradient magnitute image, not gradient orientation image?

Visualization of meshes stored in HDF5 files fails on Windows

From the wiki section on simulated fluoroscopy (https://github.com/rg2/xreg/wiki/Walkthrough%3A-Simulated-Fluoroscopy), the following command does not show the expected interactive scene and instead silently exits:

xreg-draw-xray-scene -i example1_1_pd_003.h5 pao_w_kwire_mesh.h5 example1_1_pose_003.h5

xreg-show-mesh pao_w_kwire_mesh.h5 has the same issue.

STL and PLY meshes created from the same volume work as expected.

This only happens when running on Windows - Linux and Mac work as expected.

why xreg has so many errors

I try this 2d/3d registration example:
https://github.com/rg2/xreg/wiki/Example%3A-TCIA-Hip-Radiograph-Rigid-Registration
all the data I downloaded from all the links on the page. after data is ready I began to run the program xreg-ipcai-intraop-pelvis-femurs-regi.exe. At once I got error. then I try to debug it. firstly at RunPelvisAndFemursIntraopRegi() function in IPCAICommon.cpp, when running into this:
const bool pat_is_up = *pd.rot_to_pat_up == ProjDataRotToPatUp::kZERO;
it report error, then I remove the * and modified it as:
const bool pat_is_up = pd.rot_to_pat_up == ProjDataRotToPatUp::kZERO;
the error disappeared.
but when I running into void xreg::MultiLevelMultiObjRegi::run() function of xregMultiObjMultiLevel2D3DRegi.cpp another error appeared at:
auto& cur_mask_to_ds = masks_2d[global_fixed_idx];
the reason is masks_2d is empty. but before this there is a assert:
const bool masks_provided = !masks_2d.empty();
xregASSERT(!masks_provided || (masks_2d.size() == num_fixed_imgs));
this assertion has not any usage because it would not report error only if one of two conditions is satisfied. since there is no error report on assertion. then "auto& cur_mask_to_ds = masks_2d[global_fixed_idx];" report error. it has no check for empty masks_2d.
this made me confused. why xreg has so many errors. I dont know how to continue

pelvis_single_view_regi_2d_3d report assert error

I try to run this project with arguments below:
pelvis.nii.gz pelvis_regi_2d_3d_lands.fcsv example1_2_pd_003.h5 regi_pose_example1_1_pd_003_proj0.h5 regi_debug_example1_1_pd_003_proj0_w_seg.h5 -s pelvis_seg.nii.gz

when running into PnPPOSITAndReprojCMAES() function then at set_inds_2d_and_world_pts_3d() function

for (const auto& cur_inds_2d : inds_2d)
{
common_lands = str_set_inter(common_lands, ExtractKeys(cur_inds_2d));
}

const size_type num_lands = common_lands.size();

xregASSERT(num_lands);

num_lands = 0 so report assert error.
what is wrong

Interactive visualizations only occupy the lower quarter of the window on MacOS 10.15

With the v2020.09.26.0 release for MacOS, the interactive visualizations (e.g. xreg-show-mesh, xreg-draw-xray-scene) only occupy the lower quarter of the window. This happens on MacOS 10.15 (catalina), but not on MacOS 10.14 (mojave).

Screenshot of the following command is attached.

xreg-show-mesh pelvis_sur.ply

pelvis_sur.ply is found here: https://raw.githubusercontent.com/wiki/rg2/xreg/walkthrough/mesh_creation/pelvis_sur.ply
Screen Shot 2020-10-08 at 18 25 40

Issue about build project on windows10

Hi @rg2

Sorry to bother you again, I come to ask you for help since i stucked in this trouble in days.

There is something wrong about the H5File when i build this project on win10. Detail is in this screenshot below.
p

Some tool like print_lans or xform_fcsv that is not related on H5File can be built.

Is there anything i missing about H5 related preparation before building this project?

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.