OpenWalnut  1.5.0dev
Public Member Functions | Public Attributes | List of all members
WHcoord Class Reference

this class to contain a seed voxel coordinate. More...

#include <WHcoord.h>

+ Collaboration diagram for WHcoord:

Public Member Functions

 WHcoord ()
 Constructor. More...
 
 WHcoord (coord_t x_init, coord_t y_init, coord_t z_init)
 Constructor. More...
 
 WHcoord (const WHcoord &object)
 Constructor. More...
 
 ~WHcoord ()
 Destructor. More...
 
WHcoordoperator= (const WHcoord &rhs)
 = member operator More...
 
float getPhysDist (const WHcoord voxel) const
 returns the euclidean distance between this voxel and the input voxel More...
 
std::vector< WHcoordgetPhysNbs (const WHcoord dataSize, const unsigned int nbLevel) const
 returns a vector containing the coordinates of the physical neighbours adjacent to the voxel, the neighbourhood level is defined by nb_level More...
 
std::string getNameString () const
 returns a string with the coordinates of the voxel in the form "xxx_yyy_zzz" More...
 
WHcoord nifti2vista (const WHcoord dataSize) const
 transform coordinates to vista format More...
 
WHcoord surf2vista (const WHcoord dataSize) const
 transform coordinates to vista format More...
 
WHcoord vista2nifti (const WHcoord dataSize) const
 transform coordinates to vista format More...
 

Public Attributes

coord_t m_x
 x coordinate More...
 
coord_t m_y
 y coordinate More...
 
coord_t m_z
 z coordinate More...
 

Detailed Description

this class to contain a seed voxel coordinate.

consisting on x,y,z also implements coordinate gird changes and physical neighbor search

Definition at line 75 of file WHcoord.h.

Constructor & Destructor Documentation

◆ WHcoord() [1/3]

WHcoord::WHcoord ( )

Constructor.

Definition at line 60 of file WHcoord.cpp.

◆ WHcoord() [2/3]

WHcoord::WHcoord ( coord_t  x_init,
coord_t  y_init,
coord_t  z_init 
)

Constructor.

Parameters
x_initx coordinate initializer
y_inity coordinate initializer
z_initz coordinate initializer

Definition at line 64 of file WHcoord.cpp.

◆ WHcoord() [3/3]

WHcoord::WHcoord ( const WHcoord object)

Constructor.

Parameters
objectcoordinate initializer

Definition at line 68 of file WHcoord.cpp.

◆ ~WHcoord()

WHcoord::~WHcoord ( )

Destructor.

Definition at line 72 of file WHcoord.cpp.

Member Function Documentation

◆ getNameString()

std::string WHcoord::getNameString ( ) const

returns a string with the coordinates of the voxel in the form "xxx_yyy_zzz"

Returns
output string

Definition at line 205 of file WHcoord.cpp.

References m_x, m_y, and m_z.

Referenced by WHtree::getReport().

+ Here is the caller graph for this function:

◆ getPhysDist()

float WHcoord::getPhysDist ( const WHcoord  voxel) const

returns the euclidean distance between this voxel and the input voxel

Parameters
voxelcoordinate to calculate distance to
Returns
euclidean distance value

Definition at line 82 of file WHcoord.cpp.

References m_x, m_y, and m_z.

◆ getPhysNbs()

std::vector< WHcoord > WHcoord::getPhysNbs ( const WHcoord  dataSize,
const unsigned int  nbLevel 
) const

returns a vector containing the coordinates of the physical neighbours adjacent to the voxel, the neighbourhood level is defined by nb_level

Parameters
dataSizedataset limits
nbLevelneighborhood value
Returns
coordinate vector

Definition at line 91 of file WHcoord.cpp.

References m_x, m_y, and m_z.

◆ nifti2vista()

WHcoord WHcoord::nifti2vista ( const WHcoord  dataSize) const

transform coordinates to vista format

Parameters
dataSizedataset size
Returns
converted coordinate

Definition at line 215 of file WHcoord.cpp.

References m_x, m_y, and m_z.

Referenced by WHtree::convert2grid(), and WHtree::writeTree().

+ Here is the caller graph for this function:

◆ operator=()

WHcoord & WHcoord::operator= ( const WHcoord rhs)

= member operator

Parameters
rhsobject to copy
Returns
reference to copied object

Definition at line 248 of file WHcoord.cpp.

References m_x, m_y, and m_z.

◆ surf2vista()

WHcoord WHcoord::surf2vista ( const WHcoord  dataSize) const

transform coordinates to vista format

Parameters
dataSizedataset size
Returns
converted coordinate

Definition at line 224 of file WHcoord.cpp.

References m_x, m_y, and m_z.

◆ vista2nifti()

WHcoord WHcoord::vista2nifti ( const WHcoord  dataSize) const

transform coordinates to vista format

Parameters
dataSizedataset size
Returns
converted coordinate

Definition at line 233 of file WHcoord.cpp.

References m_x, m_y, and m_z.

Referenced by WHtree::convert2grid(), WHtree::writeTree(), and WHtree::writeTreeOldWalnut().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_x

coord_t WHcoord::m_x

◆ m_y

coord_t WHcoord::m_y

◆ m_z

coord_t WHcoord::m_z

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