Header file containing functions for loading pixel values from 2D image or 3D image stack (volume) stored in a binary file onto an openFPM grid. More...
#include <iostream>
#include <typeinfo>
#include <cmath>
#include <sys/stat.h>
#include "Vector/vector_dist.hpp"
#include "Grid/grid_dist_id.hpp"
#include "data_type/aggregate.hpp"
#include "Decomposition/CartDecomposition.hpp"
#include "level_set/redistancing_Sussman/HelpFunctionsForGrid.hpp"
Go to the source code of this file.
Typedefs | |
typedef signed char | BYTE |
Functions | |
bool | exists_test (const std::string &name) |
std::vector< int > | get_size (const std::string &path_to_file) |
Read the number of pixels per dimension from a csv-file in order to create a grid with the same size. | |
template<size_t Phi_0, typename grid_type > | |
void | load_pixel_onto_grid (grid_type &grid, std::string file_name, std::vector< int > &stack_dims) |
Converts the pixel values stored in a binary file into doubles and loads them onto an OpenFPM grid. | |
Header file containing functions for loading pixel values from 2D image or 3D image stack (volume) stored in a binary file onto an openFPM grid.
Can be run in parallel.
Definition in file InitGridWithPixel.hpp.
typedef signed char BYTE |
Definition at line 29 of file InitGridWithPixel.hpp.
|
inline |
Definition at line 31 of file InitGridWithPixel.hpp.
std::vector< int > get_size | ( | const std::string & | path_to_file | ) |
Read the number of pixels per dimension from a csv-file in order to create a grid with the same size.
path_to_file | Std::string containing the path to the csv file that holds the image/volume size in pixels per dimension. |
Definition at line 44 of file InitGridWithPixel.hpp.
void load_pixel_onto_grid | ( | grid_type & | grid, |
std::string | file_name, | ||
std::vector< int > & | stack_dims | ||
) |
Converts the pixel values stored in a binary file into doubles and loads them onto an OpenFPM grid.
Phi_0 | Index of property in which pixel value should be stored. |
grid_type | Type of OpenFPM grid. |
grid | Grid of type grid_type, on which image / image-stack should be loaded. |
file_name | Std::string containing the path + name of the binary file that stores the pixel values. |
stack_dims | Size_t variable that contains the dimensionality of the image / image stack. Can be given manually or loaded from a csv file before (see: get_size()) |
Definition at line 92 of file InitGridWithPixel.hpp.