C2DStackDistanceTransform Class Reference
Uncategorized

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

## Public Member Functions

| C2DStackDistanceTransform ()=default
| C2DStackDistanceTransform (const C2DImage &slice, const C3DFVector &voxel_size=C3DFVector::_1)
| C2DStackDistanceTransform (const C2DStackDistanceTransform &)=default
C2DStackDistanceTransform * | clone () const __attribute__((warn_unused_result))
std::vector< DistanceFromPoint > | get_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
static const char *const | type_descr
| search path component for the plugin handling

## 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

typedef C2DStackDistanceTransform C2DStackDistanceTransform::type

helper type for IO plugin handling

Definition at line 51 of file stackdisttrans.hh.

## Constructor & Destructor Documentation

## C2DStackDistanceTransform() [1/3]

C2DStackDistanceTransform::C2DStackDistanceTransform | ( |  | ) |

default

Referenced by C2DStackDistanceTransform(), C2DStackDistanceTransform(), and clone().

## C2DStackDistanceTransform() [2/3]

C2DStackDistanceTransform::C2DStackDistanceTransform | ( | const C2DStackDistanceTransform & |  | ) |

default

The copy constructor

References C2DStackDistanceTransform().

## C2DStackDistanceTransform() [3/3]

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

Construct the distance grid and initialize it

Parameters

  slice | first image of the image stack
  voxel_size | size of a voxel

References C2DStackDistanceTransform(), and T2DMatrix< T >::_1.

## Member Function Documentation

## clone()

C2DStackDistanceTransform * C2DStackDistanceTransform::clone | ( |  | ) | const

Create a copy of this object

References C2DStackDistanceTransform().

## 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

  s | z-location of the slice
  image | the actual mask

References get_slice().

Referenced by get_slice().

## read()

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

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

Parameters

  slice | the mask data
  q | the z-position of the slice

References read().

Referenced by read().

## save()

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

Save the distcane transform to a file.

Parameters

  filename | The name of the file to save the transform to

Returns
  true if sucessful

References save().

Referenced by save().

## Field Documentation

## data_descr

const char* const C2DStackDistanceTransform::data_descr

static

search path component for the plugin handling

Definition at line 54 of file stackdisttrans.hh.

## type_descr

const char* const C2DStackDistanceTransform::type_descr

static

search path component for the plugin handling

Definition at line 57 of file stackdisttrans.hh.

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

- stackdisttrans.hh