Skip to content

frankyeh/TIPL-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Template Image Processing Library (TIPL) is a lightweight C++ template library designed mainly for medical imaging processing. The design paradigm is to provide an "easy-to-use" and also "ready-to-use" header-only library.

Design paradigm

Most image processing libraries are not designed for medical image analysis and have suboptimal performance. TIPL was developed for high-performance medical analysis. The design paradigm follows several coding guidelines and principles that make it highly efficient and reusable.

The following is the main paradigm behind TIPL:

  • Decouple image type and image processing method: Most of the image processing libraries are limited to their defined image type. TIPL is not. You may use a pointer or any kind of memory block to as the input. This reduces unnecessary memory storage and copy.

  • Not limited to RGB pixel type: In medical imaging, the most common pixel type is "short" or "float", not the RGB value. TIPL makes no assumption on the pixel type to achieve the best applicability.

  • Minimize class inheritance: Class inheritance is known to cause difficulties in code maintenance and unfriendly for extensions. TIPL uses template variable coupling to minimize the need for inheritance unless a strong case for inheritance is suggested. This provide a "flat" library structures that is easy to maintain and modify.

  • Minimize between-header dependency: TIPL couples function and type at very late stage in the cpp to reduce header dependency. This allows for fast compilation time and achieve better abstraction.

  • Avoid using plateform dependency functions or syntax: TIPL will be compiled against MSVC, CLANG, and GCC to ensure the best cross-platform capability.

Installation

TIPL is header only. You may clon the repo or use CMake to install the package.

  1. Get header files from Github
!git clone http://github.com/frankyeh/TIPL/
  1. Include the header
#include "TIPL/tipl.hpp"  

Now you can use TIPL

Building the C++ examples using CMake

It is possible to install TIPL using CMake, in which case C++ packages using CMake can easily build with it. In this package C++ examples are available in the cpp subdirectory. To build these using CMake:

  • Make sure TIPL is installed with CMake, e.g. in a directory called <TIPL_install_directory> (see the TIPL README.md file how to do this).
  • Execute the commands from the root of your cloned TIPL-example directory:
export CMAKE_PREFIX_PATH=<TIPL_install_directory>:$CMAKE_PREFIX_PATH
mkdir build ; cd build
cmake ..
cmake --build .
cd cpp
  • At this point one should be able to execute the exmaple, e.g.:
./linear_reg
  • We also made a directory cpp/TIPL-examples and symbolic linked the source data directory there so that the exmaples can find their inputs.

Naturally one can also locate the CMake TIPLConfig.cmake file using other CMake means than CMAKE_PREFIX_PATH e.g. by providing the CMake option: -DTIPL_DIR=<TIPL_install_directory>/lib/cmake/TIPL to cmake. One should also be able to build out of source (the build directory can really be anywhere).

Installation of the examples is not yet supported

Example

  • Notebooks examples:

    • Image IO Binder
    • Volume and Slicer Operations Binder
    • Pixel Operations (Filters) Binder
    • Morphological Operations Binder
    • NIFTI file viewer Binder
  • Google colab examples:

    • Load NIFTI file Colab
    • Image registration Colab

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages