1 #ifndef AIMSDATA_BORDER_BORDERFILLER_H 2 #define AIMSDATA_BORDER_BORDERFILLER_H 7 #include <aims/resampling/splineresampler.h> 47 for( i = brd.
begin(); i != brd.
end(); ++i )
56 size[0] = ( bs[0] >= bs[1] ? bs[0] : bs[1] );
58 size[1] = ( bs[2] >= bs[3] ? bs[2] : bs[3] );
60 size[2] = ( bs[4] >= bs[5] ? bs[4] : bs[5] );
62 size[3] = ( bs[6] >= bs[7] ? bs[6] : bs[7] );
68 for( i = brdout.begin(); i != brdout.end(); ++i )
78 for( i = brd.
begin(); i != brd.
end(); ++i )
83 else if( current[0] >= in.
getSizeX() )
87 else if( current[1] >= in.
getSizeX() )
91 else if( current[2] >= in.
getSizeX() )
95 else if( current[3] >= in.
getSizeX() )
97 *i = in( current[0], current[1], current[2], current[3] );
102 template <
typename T>
108 for( i = brd.
begin(); i != brd.
end(); ++i )
111 current[0] = mirrorCoeff( current[0], in.
getSizeX() );
112 current[1] = mirrorCoeff( current[1], in.
getSizeY() );
113 current[2] = mirrorCoeff( current[2], in.
getSizeZ() );
114 current[3] = mirrorCoeff( current[3], in.
getSizeT() );
115 *i = in( current[0], current[1], current[2], current[3] );
121 #endif // AIMSDATA_BORDER_BORDERFILLER_H
This class contains static methods to fill the border of a VolumeRef with chosen values.
The class for EcatSino data write operation.
static void fillNearest(carto::VolumeRef< T > in)
Each voxel of the border is assigned with the nearest inside voxel.
static void fillMedian(carto::VolumeRef< T > in, Point4dl size=Point4dl(-1,-1,-1,-1))
Fills the border with a "median" value.
Point4dl coordinate() const
Returns the coordinates of the current point in the linked volume.
static void fillConstant(carto::VolumeRef< T > in, const T &value=0)
Fills the border with a constant value.
Represents the border of a volume.
static void fillMirror(carto::VolumeRef< T > in)
The border is filled by mirroring the inside border of same size.
static T median(Iterator b, Iterator e, T default_value=(T) 0)
std::vector< int > getBorders() const