1 #ifndef AIMSDATA_BORDER_BORDERFILLER_H 
    2 #define AIMSDATA_BORDER_BORDERFILLER_H 
    7 #include <aims/resampling/splineresampler.h>                     
   27                               bool unreadOnly = 
false );
 
   37                             bool unreadOnly = 
false );
 
   61     for( i = brd.
begin(); i != brd.
end(); ++i )
 
   77       size[0] = ( bs[0] >= bs[1] ? bs[0] : bs[1] );
 
   79       size[1] = ( bs[2] >= bs[3] ? bs[2] : bs[3] );
 
   81       size[2] = ( bs[4] >= bs[5] ? bs[4] : bs[5] );
 
   83       size[3] = ( bs[6] >= bs[7] ? bs[6] : bs[7] );
 
   89     for( i = brdout.
begin(); i != brdout.
end(); ++i )
 
  106     for( i = brd.
begin(); i != brd.
end(); ++i )
 
  111       else if( current[0] >= vol.
getSizeX() )
 
  115       else if( current[1] >= vol.
getSizeX() )
 
  119       else if( current[2] >= vol.
getSizeX() )
 
  123       else if( current[3] >= vol.
getSizeX() )
 
  125       *i = vol( current[0], current[1], current[2], current[3] );
 
  130   template <
typename T>
 
  136         vol = buildUnfilledBorderView(in);
 
  143     for( i = brd.
begin(); i != brd.
end(); ++i )
 
  146       current[0] = mirrorCoeff( current[0], vol.
getSizeX() );
 
  147       current[1] = mirrorCoeff( current[1], vol.
getSizeY() );
 
  148       current[2] = mirrorCoeff( current[2], vol.
getSizeZ() );
 
  149       current[3] = mirrorCoeff( current[3], vol.
getSizeT() );
 
  150       *i = vol( current[0], current[1], current[2], current[3] );
 
  171                 Position size1 = parent1.
getSize();
 
  172                 Position size2 = parent2.
getSize();
 
  174                 size_t dims = pos.size();
 
  176                 for(
size_t d=0; d<dims; ++d) {
 
  177                     pos[d] =std::max(pos1[d], 0) - pos1[d];
 
  178                     size[d] = std::min(size1[d], size2[d] - pos1[d]) - pos[d];
 
This class contains static methods to fill the border of a VolumeRef with chosen values.
static void fillNearest(carto::VolumeRef< T > in, bool unreadOnly=false)
Each voxel of the border is assigned with the nearest inside voxel.
static void fillConstant(carto::VolumeRef< T > in, const T &value=0, bool unreadOnly=false)
Fills the border with a constant value.
static carto::VolumeRef< T > buildUnfilledBorderView(const carto::VolumeRef< T > &vol)
Build a view that exposes data filled at reading time.
static void fillMedian(carto::VolumeRef< T > in, Point4dl size=Point4dl(-1,-1,-1,-1), bool unreadOnly=false)
Fills the border with a "median" value.
static void fillMirror(carto::VolumeRef< T > in, bool unreadOnly=false)
The border is filled by mirroring the inside border of same size.
Point4dl coordinate() const
Returns the coordinates of the current point in the linked volume.
Represents the border of a volume.
static T median(Iterator b, Iterator e, T default_value=(T) 0)
std::vector< int > getBorders() const
rc_ptr< Volume< T > > refVolume() const
std::vector< int > getSize() const
const AllocatorContext & allocatorContext() const
const Position4Di posInRefVolume() const
std::vector< int > Position
The class for EcatSino data write operation.