C2DStackDistanceTransform Class Reference

A distance transform that stores distances to a 3D binary mask given as slices. More...

#include <mia/3d/stackdisttrans.hh>

Inheritance diagram for C2DStackDistanceTransform:
[legend]
Collaboration diagram for C2DStackDistanceTransform:
[legend]

Data Structures

struct  DistanceFromPoint
 

Public Types

typedef C2DStackDistanceTransform type
 helper type for IO plugin handling More...
 

Public Member Functions

 C2DStackDistanceTransform ()=default
 
 C2DStackDistanceTransform (const C2DStackDistanceTransform &)=default
 
 C2DStackDistanceTransform (const C2DImage &slice, const C3DFVector &voxel_size=C3DFVector::_1)
 
C2DStackDistanceTransformclone () const __attribute__((warn_unused_result))
 
std::vector< DistanceFromPointget_slice (size_t s, const C2DImage &image) const
 
void read (const C2DImage &slice, int q)
 
bool save (const std::string &filename)
 
- Public Member Functions inherited from CIOData
const std::string & get_source_format () const
 
void set_source_format (const std::string &format)
 

Static Public Attributes

static const char *const data_descr
 search path component for the plugin handling More...
 
static const char *const type_descr
 search path component for the plugin handling More...
 

Detailed Description

A distance transform that stores distances to a 3D binary mask given as slices.

This class implements a 3D distance transform that makes it possible to evaluate the distance of each point in a 3D volume to a binary mask that is given by a set of 2D binary images that are interpreted like a 3D volume. It implements the Techical Report Pedro F. Felzenszwalb and Daniel P. Huttenlocher Distance Transforms of Sampled Functions Cornell Computing and Information Science TR2004-1963

Definition at line 47 of file stackdisttrans.hh.

Member Typedef Documentation

◆ type

helper type for IO plugin handling

Definition at line 50 of file stackdisttrans.hh.

Constructor & Destructor Documentation

◆ C2DStackDistanceTransform() [1/3]

C2DStackDistanceTransform::C2DStackDistanceTransform ( )
default

◆ C2DStackDistanceTransform() [2/3]

C2DStackDistanceTransform::C2DStackDistanceTransform ( const C2DStackDistanceTransform )
default

The copy constructor

◆ C2DStackDistanceTransform() [3/3]

C2DStackDistanceTransform::C2DStackDistanceTransform ( const C2DImage slice,
const C3DFVector voxel_size = C3DFVector::_1 
)

Construct the distance grid and initialize it

Parameters
slicefirst image of the image stack
voxel_sizesize of a voxel

Member Function Documentation

◆ clone()

C2DStackDistanceTransform* C2DStackDistanceTransform::clone ( ) const

Create a copy of this object

◆ get_slice()

std::vector<DistanceFromPoint> C2DStackDistanceTransform::get_slice ( size_t  s,
const C2DImage image 
) const

Evaluate the distances for a given input mask. For each mask point in image that is set to thrue the distance is evaluated.

Parameters
sz-location of the slice
imagethe actual mask

◆ read()

void C2DStackDistanceTransform::read ( const C2DImage slice,
int  q 
)

Read the given slice of the image stack and update the distance maps.

Parameters
slicethe mask data
qthe z-position of the slice

◆ save()

bool C2DStackDistanceTransform::save ( const std::string &  filename)

Save the distcane transform to a file.

Parameters
filenameThe name of the file to save the transform to
Returns
true if sucessful

Field Documentation

◆ data_descr

const char* const C2DStackDistanceTransform::data_descr
static

search path component for the plugin handling

Definition at line 53 of file stackdisttrans.hh.

◆ type_descr

const char* const C2DStackDistanceTransform::type_descr
static

search path component for the plugin handling

Definition at line 56 of file stackdisttrans.hh.


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