C++ template library for linear algebra

SNUV_TOMO: 2D CT using SNUV with IRCD

Project tree and description

File/folder Description
Eigen C++ template library for linear algebra
include Contains self-made functions to save & load Eigen sparse matrices or arrays into & from a binary file; MP.h contains the main IRCD routine.
objects Contains different synthetic images to test reconstruction
settings.h Specifies the studied object and some important quantities for the forward projection, and some algorithm details
projection.cpp Perform the distance-driven projection for the 2D fan-beam geometry
mainSNUV_IRCD.cpp Perform reconstruction using Iterative Reweighted Coordinate Descent (IRCD) Algorithm with Smoothed-NUV priors
mainASDPOCS.cpp Perform ASDPOCS reconstruction using TV/L1 regularization
transformer.cpp Transform normal images into binary files
CMakeLists.txt CMake file used to generate a Makefile

Before running the applications

  • Create 4 folders build, projections, reconstructions and reconstructions/intermediate_results.

  • Open a terminal and check the version of CMake installed on your computer with the command cmake -version. If the version is below 3.0 then modify the first line of CMakeLists.txt.

  • Attention: OPENCV dependencies needed!!! Try to install opencv first.

Example

The objects folder contains different, for example, the binary file SheppLogan256_UltraGrad corresponds to a Shepp-Logan phantom with gradient of dimension 256 x 256, flattened column-wise (if a pixel has coordinates (m,n) with 0 <= m,n <= 255 then it has index m + 255*n in the flattened image).

As a first example you can project this phantom and reconstruct it from the projections using SNUV_IRCD or ASDPOCS reconstruction methods.

First you have to compile the different applications listed in the CMake file (CMakeLists.txt):

  1. Open a Terminal window

  2. Access the build folder: cd path/to/SNUV_TOMO/build/

  3. Run the command cmake .. to create Makefile from CMakeLists.txt.

  4. Run the command make to compile all the applications at once. If you want to compile just one application, say PROJECTION, then run the command make PROJECTION.

After step 4, you should have 4 applications in the build folder (the files PROJECTION, ASDPOCS, SNUV_IRCD, TRANSFORMER).

Now you can project the phantom and use the projection to reconstruct the image:

  1. Open a Terminal window.

  2. Access the build folder: cd path/to/SNUV_TOMO/build/.

  3. If the input image is not binary, please first run ./TRANSFORMER to transform it into binary files.

  4. Run the command ./PROJECTION to perform the distance-driven projection for the different angles specified in the header settings.h. The resulting projection vector and projection matrix are saved in 2 separate binary files located in the projections folder.

  5. The maximal iteration number of IRCD, and whether the intermediate results should be saved, can be specified in settings.h.

  6. Run the commands ./SNUV_IRCD and ./ASDPOCS to reconstruct the image from the projection vector using SNUV_IRCD and TV_ASDPOCS, respectively. The reconstructions are saved in binary & png files located in the reconstructions folder.

Similar Resources

Template library and blog that explain how JSI modules are built from scratch in React Native

react-native-jsi-template This is an example library that explains how anyone can build jsi modules from scratch in React Native. This code is written

Nov 19, 2022

C language simulation CXX template library

lib.xtl This is the implementation of a C language imitation cxx template library Explain This library simulates some operations in STL. Simulation ve

Jan 8, 2022

BNFLite is a C++ template library for lightweight flexible grammar parsers

BNFLite is a C++ template library for lightweight flexible grammar parsers. BNFLite offers creative approach when the developer can specify a language for further parsing directly in the C++ code. Moreover, such "specifications" are executable now!

Nov 20, 2022

Xtl - eXtended Template Library

eXtended Template Library Open Hub Linux Windows Coverage Technical Debt Code Quality License Contribute with Gratipay Contribute with Beerpay View th

Sep 26, 2022

Generic Math Template Library

Generic Math Template Library

Jul 29, 2022

🦇Roguelike (Dungeon Template Library)

🦇Roguelike (Dungeon Template Library)

Roguelike (Dungeon Template Library) Supported Compilers 🔧 Compiler Run MSVC None GCC Wandbox Clang Wandbox Generated Image 🖼️ Example #include "Rog

Oct 6, 2022

Import of the DIY Dynamic Template v2, retrieved from the Internet Archive

Import of the DIY Dynamic Template v2, retrieved from the Internet Archive

Dynamic Templates This is a copy of the D*I*Y Planner Dynamic Template application that was posted to diyplanner.com/node/6210 back in 2009,

Aug 7, 2022

Some hypervisor research notes. There is also a useful exploit template that you can use to verify / falsify any assumptions you may make while auditing code, and for exploit development.

Introduction Over the past few weeks, I've been doing some hypervisor research here and there, with most of my focus being on PCI device emulation cod

Nov 18, 2022

Simple template project to build a firmware for the STM32F4 Discovery board with FreeRTOS and libopencm3

STM32F4 Discovery FreeRTOS Makfile This is a simple template project to build a firmware for the STM32F4 Discovery board with FreeRTOS and libopencm3

May 22, 2022
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.

OpenGL Template Engine is a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects. This is the template I personally use for my own projects and provides me with the general OpenGL 3D render setup with model import and UI.

May 16, 2022
A header-only C++ library that enables the representation of a range of values in a linear space

Numeric Range A header-only C++ library that enables the representation of a range of values in a linear space (via the NumericRange class). The linea

Mar 22, 2022
Recognize stairs with lidar. Project the laser points to X-Z plane and use least squares for linear fitting.
Recognize stairs with lidar. Project the laser points to X-Z plane and use least squares for linear fitting.

stairs_recogniton Recognize stairs with lidar. Project the laser points to X-Z plane and use least squares for linear fitting. Dependencies PCL 1.8 Ei

Nov 25, 2022
Online multi-agent trajectory planner using linear safe corridor (LSC)

lsc_planner This package presents an efficient multi-agent trajectory planning algorithm which generates safe trajectories in obstacle-dense environme

Nov 17, 2022
Display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together
Display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together

The display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together, and leaving individual access to the cs lines of each display, This board allows you to display images with a resolution of 480x160px.

Oct 29, 2022
An open collection of tools and experiments for rendering wide-gamut scene-linear data into an image for an SDR or HDR display device.

Open Display Transform An open collection of tools and experiments for rendering wide-gamut scene-linear data into an image for an SDR or HDR display

Nov 14, 2022
Flat map - Header only associative linear container.

flat_map flat_map is a header only associative container library that constructed on linear container. It compliants C++17/20 standard associative con

Aug 26, 2022
Parsing Expression Grammar Template Library
Parsing Expression Grammar Template Library

Welcome to the PEGTL The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creati

Nov 24, 2022
First open source android modding library for Geometry Dash Based on Hooking-and-Patching-android-template

Android-ML First open source android modding library for Geometry Dash Based on Hooking-and-Patching-android-template Installation Download this githu

Jul 17, 2022
free template opensource with minimal depends library flutter & dart

Project Name Sosial Media Donate ID: Jika Anda Menyukai karya saya dan ingin memberikan dana untuk saya membeli beberapa snack silahkan donasi seberap

Jan 1, 2022