CTL  0.6.1
Computed Tomography Library
Classes | Functions
chunk2d.h File Reference
#include "mat/matrix.h"
#include "processing/coordinates.h"
#include <QtGlobal>
#include <algorithm>
#include <array>
#include <stdexcept>
#include <string>
#include <vector>
#include "chunk2d.tpp"
Include dependency graph for chunk2d.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CTL::Chunk2DDimensions
 
class  CTL::Chunk2D< T >
 The Chunk2D class provides a simple container for storage of 2D image data. More...
 
class  CTL::Chunk2D< T >::PixelIterator< IteratorType >
 
struct  CTL::PixelIndex
 
class  CTL::Chunk2D< T >::PixelIterator< IteratorType >
 

Functions

template<typename ToType , typename FromType , typename ConversionFun = ToType (*)(const FromType&)>
Chunk2D< ToType > CTL::assist::convertTo (const Chunk2D< FromType > &chunk2d, ConversionFun f)
 Returns a Chunk2D<ToType>, where ToType must be specified as a template parameter. More...
 
float CTL::assist::interpolate2D (const Chunk2D< float > &chunk2D, const mat::Matrix< 2, 1 > &pos)
 Returns the value at position pos from chunk2D using (bi-)linear interpolation.
 
float CTL::assist::interpolate2D (const Chunk2D< float > &chunk2D, double x, double y)
 Returns the value at position (x, y) from chunk2D using (bi-)linear interpolation.
 

Function Documentation

◆ convertTo()

template<typename ToType , typename FromType , typename ConversionFun = ToType (*)(const FromType&)>
Chunk2D< ToType > CTL::assist::convertTo ( const Chunk2D< FromType > &  chunk2d,
ConversionFun  f 
)

Returns a Chunk2D<ToType>, where ToType must be specified as a template parameter.

The conversion from chunk2d is performed element-wise using the callable f. If f is not passed as a second argument, the default is a static_cast<ToType> operation.