aimsdata  5.0.5
Neuroimaging data handling
aims::Border Class Reference

The base class to manage borders on data containers. More...

#include <aims/border/border.h>

Inheritance diagram for aims::Border:
Collaboration diagram for aims::Border:

Public Member Functions

Constructor and Destructor
 Border (int dimx, int dimy, int dimz, int width=0)
 The constructor precalculates offsets to speed-up access to data during loops. More...
 
 Border (int dimx, int dimy, int dimz, int bx1, int bx2, int by1, int by2, int bz1, int bz2)
 The constructor precalculates offsets to speed-up access to data during loops. More...
 
 Border (int dimx, int dimy, int dimz, const std::vector< int > &borders)
 The constructor precalculates offsets to speed-up access to data during loops. More...
 
virtual ~Border ()
 
int borderWidth () const
 Usefull offsets for A.I.M.S. More...
 
int oFirstPoint () const
 Offset from the start of the allocated memory to the first point. More...
 
int oLastPoint () const
 Offset from the start of the allocated memory to the last point. More...
 
int oLine () const
 Offset between 2 consecutive lines. More...
 
int oPointBetweenLine () const
 Offset between the end of a line and the start of the consecutive line. More...
 
int oSlice () const
 Offset between 2 consecutive slices. More...
 
int oLineBetweenSlice () const
 Number of lines between 2 consecutive slices. More...
 
int oVolume () const
 Offset between 2 consecutive volumes. More...
 
int oSliceBetweenVolume () const
 Number of slices between 2 consecutive volumes. More...
 
const std::vector< int > & borders () const
 Sizes of the border. More...
 

Protected Member Functions

Functions
void _setBorder (int dimx, int dimy, int dimz, int width)
 Function that sets up all protected datas. More...
 
void _setBorder (int dimx, int dimy, int dimz, int bx1, int bx2, int by1, int by2, int bz1, int bz2)
 Function that sets up all protected datas for non uniform borders. More...
 
void _setBorder (int dimx, int dimy, int dimz, const std::vector< int > &borders)
 Function that sets up all protected datas for non uniform borders. More...
 

Protected Attributes

Data
std::vector< int > _borders
 Borders. More...
 
int _oFirstPoint
 Offset up to first point. More...
 
int _oLastPoint
 Offset up to last point. More...
 
int _oLine
 Length of a line. More...
 
int _oPointBetweenLine
 Offset between two consecutive lines. More...
 
int _oSlice
 Length of a slice. More...
 
int _oLineBetweenSlice
 Offset between two consecutive slices. More...
 
int _oVolume
 Length of a volume. More...
 
int _oSliceBetweenVolume
 Offset between two consecutive volumes. More...
 

Detailed Description

The base class to manage borders on data containers.

Definition at line 49 of file border.h.

Constructor & Destructor Documentation

◆ Border() [1/3]

aims::Border::Border ( int  dimx,
int  dimy,
int  dimz,
int  width = 0 
)
inline

The constructor precalculates offsets to speed-up access to data during loops.

Parameters
dimxX dimension
dimyY dimension
dimzZ dimension
widthborder width

Definition at line 168 of file border.h.

References _setBorder().

◆ Border() [2/3]

aims::Border::Border ( int  dimx,
int  dimy,
int  dimz,
int  bx1,
int  bx2,
int  by1,
int  by2,
int  bz1,
int  bz2 
)
inline

The constructor precalculates offsets to speed-up access to data during loops.

Parameters
dimxX dimension
dimyY dimension
dimzZ dimension
bx1first border along X dimension
bx2second border along X dimension
by1first border along Y dimension
by2second border along Y dimension
bz1first border along Z dimension
bz2second border along Z dimension

Definition at line 175 of file border.h.

References _setBorder().

◆ Border() [3/3]

aims::Border::Border ( int  dimx,
int  dimy,
int  dimz,
const std::vector< int > &  borders 
)
inline

The constructor precalculates offsets to speed-up access to data during loops.

Parameters
dimxX dimension
dimyY dimension
dimzZ dimension
bordersstd::vector<int> containing border sizes

Definition at line 186 of file border.h.

References _setBorder().

◆ ~Border()

aims::Border::~Border ( )
inlinevirtual

Definition at line 194 of file border.h.

Member Function Documentation

◆ _setBorder() [1/3]

void aims::Border::_setBorder ( int  dimx,
int  dimy,
int  dimz,
int  width 
)
protected

Function that sets up all protected datas.

Referenced by Border(), and AimsData< AimsData< AimsData< T > > >::operator=().

◆ _setBorder() [2/3]

void aims::Border::_setBorder ( int  dimx,
int  dimy,
int  dimz,
int  bx1,
int  bx2,
int  by1,
int  by2,
int  bz1,
int  bz2 
)
protected

Function that sets up all protected datas for non uniform borders.

◆ _setBorder() [3/3]

void aims::Border::_setBorder ( int  dimx,
int  dimy,
int  dimz,
const std::vector< int > &  borders 
)
protected

Function that sets up all protected datas for non uniform borders.

◆ borders()

const std::vector<int>& aims::Border::borders ( ) const

◆ borderWidth()

◆ oFirstPoint()

int aims::Border::oFirstPoint ( ) const
inline

Offset from the start of the allocated memory to the first point.

Definition at line 215 of file border.h.

References _oFirstPoint.

Referenced by AimsData< AimsData< AimsData< T > > >::maxIndex(), AimsData< AimsData< AimsData< T > > >::minIndex(), aims::minmax(), and AimsData< AimsData< AimsData< T > > >::operator=().

◆ oLastPoint()

int aims::Border::oLastPoint ( ) const
inline

Offset from the start of the allocated memory to the last point.

Definition at line 222 of file border.h.

References _oLastPoint.

◆ oLine()

int aims::Border::oLine ( ) const
inline

◆ oLineBetweenSlice()

int aims::Border::oLineBetweenSlice ( ) const
inline

◆ oPointBetweenLine()

int aims::Border::oPointBetweenLine ( ) const
inline

Offset between the end of a line and the start of the consecutive line.

Definition at line 236 of file border.h.

References _oPointBetweenLine.

Referenced by AimsData< AimsData< AimsData< T > > >::maxIndex(), AimsData< AimsData< AimsData< T > > >::minIndex(), aims::minmax(), and AimsData< AimsData< AimsData< T > > >::operator=().

◆ oSlice()

int aims::Border::oSlice ( ) const
inline

◆ oSliceBetweenVolume()

int aims::Border::oSliceBetweenVolume ( ) const
inline

◆ oVolume()

int aims::Border::oVolume ( ) const
inline

Offset between 2 consecutive volumes.

Definition at line 257 of file border.h.

References _oVolume.

Member Data Documentation

◆ _borders

std::vector<int> aims::Border::_borders
protected

Borders.

Definition at line 122 of file border.h.

Referenced by borderWidth().

◆ _oFirstPoint

int aims::Border::_oFirstPoint
protected

Offset up to first point.

Definition at line 124 of file border.h.

Referenced by AimsData< AimsData< AimsData< T > > >::empty(), and oFirstPoint().

◆ _oLastPoint

int aims::Border::_oLastPoint
protected

Offset up to last point.

Definition at line 126 of file border.h.

Referenced by oLastPoint().

◆ _oLine

int aims::Border::_oLine
protected

Length of a line.

Definition at line 128 of file border.h.

Referenced by AimsData< AimsData< AimsData< T > > >::empty(), and oLine().

◆ _oLineBetweenSlice

int aims::Border::_oLineBetweenSlice
protected

Offset between two consecutive slices.

Definition at line 134 of file border.h.

Referenced by AimsData< AimsData< AimsData< T > > >::empty(), and oLineBetweenSlice().

◆ _oPointBetweenLine

int aims::Border::_oPointBetweenLine
protected

Offset between two consecutive lines.

Definition at line 130 of file border.h.

Referenced by AimsData< AimsData< AimsData< T > > >::empty(), and oPointBetweenLine().

◆ _oSlice

int aims::Border::_oSlice
protected

Length of a slice.

Definition at line 132 of file border.h.

Referenced by AimsData< AimsData< AimsData< T > > >::empty(), and oSlice().

◆ _oSliceBetweenVolume

int aims::Border::_oSliceBetweenVolume
protected

Offset between two consecutive volumes.

Definition at line 138 of file border.h.

Referenced by AimsData< AimsData< AimsData< T > > >::empty(), and oSliceBetweenVolume().

◆ _oVolume

int aims::Border::_oVolume
protected

Length of a volume.

Definition at line 136 of file border.h.

Referenced by AimsData< AimsData< AimsData< T > > >::empty(), and oVolume().


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