aimsdata  5.1.2
Neuroimaging data handling
aims::BorderFiller< T > Class Template Reference

This class contains static methods to fill the border of a VolumeRef with chosen values. More...

#include <aims/border/borderfiller.h>

Static Public Member Functions

static void fillConstant (carto::VolumeRef< T > in, const T &value=0, bool unreadOnly=false)
 Fills the border with a constant value. More...
 
static void fillMedian (carto::VolumeRef< T > in, Point4dl size=Point4dl(-1,-1,-1,-1), bool unreadOnly=false)
 Fills the border with a "median" value. More...
 
static void fillNearest (carto::VolumeRef< T > in, bool unreadOnly=false)
 Each voxel of the border is assigned with the nearest inside voxel. More...
 
static void fillMirror (carto::VolumeRef< T > in, bool unreadOnly=false)
 The border is filled by mirroring the inside border of same size. More...
 
static carto::VolumeRef< T > buildUnfilledBorderView (const carto::VolumeRef< T > &vol)
 Build a view that exposes data filled at reading time. More...
 

Detailed Description

template<typename T>
class aims::BorderFiller< T >

This class contains static methods to fill the border of a VolumeRef with chosen values.

This is useful for processing algorithms that work in a neighborhood (filtering...)

Definition at line 22 of file borderfiller.h.

Member Function Documentation

◆ buildUnfilledBorderView()

template<typename T >
carto::VolumeRef< T > aims::BorderFiller< T >::buildUnfilledBorderView ( const carto::VolumeRef< T > &  vol)
static

Build a view that exposes data filled at reading time.

Borders of this view correpond to data unfilled at reading time (i.e. borders that are outside of the read image domain). This is useful to fill borders of partialy read carto::VolumeRef.

Definition at line 155 of file borderfiller.h.

References carto::VolumeRef< class >::allocatorContext(), carto::VolumeRef< class >::getSize(), carto::const_ref< class >::isNull(), carto::VolumeRef< class >::posInRefVolume(), and carto::VolumeRef< class >::refVolume().

Referenced by aims::BorderFiller< T >::fillConstant(), aims::BorderFiller< T >::fillMedian(), and aims::BorderFiller< T >::fillNearest().

◆ fillConstant()

template<typename T >
void aims::BorderFiller< T >::fillConstant ( carto::VolumeRef< T >  in,
const T &  value = 0,
bool  unreadOnly = false 
)
static

Fills the border with a constant value.

Definition at line 49 of file borderfiller.h.

References aims::BorderIterator< T >::begin(), aims::BorderFiller< T >::buildUnfilledBorderView(), and aims::BorderIterator< T >::end().

◆ fillMedian()

template<typename T >
void aims::BorderFiller< T >::fillMedian ( carto::VolumeRef< T >  in,
Point4dl  size = Point4dl(-1,-1,-1,-1),
bool  unreadOnly = false 
)
static

Fills the border with a "median" value.

This is the median value of the inside border of equal size: if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0)

This can be overriden by the argument size.

Definition at line 66 of file borderfiller.h.

References aims::BorderIterator< T >::begin(), aims::BorderFiller< T >::buildUnfilledBorderView(), aims::BorderIterator< T >::end(), carto::VolumeRef< class >::getBorders(), and aims::MathUtil< T >::median().

◆ fillMirror()

template<typename T >
void aims::BorderFiller< T >::fillMirror ( carto::VolumeRef< T >  in,
bool  unreadOnly = false 
)
static

◆ fillNearest()

template<typename T >
void aims::BorderFiller< T >::fillNearest ( carto::VolumeRef< T >  in,
bool  unreadOnly = false 
)
static

The documentation for this class was generated from the following file: