DGtal
0.6.devel
|
#include <ReverseDistanceTransformation.h>
Public Types | |
typedef ImageContainerBySTLVector < HyperRectDomain< typename Image::Domain::Space > , IntegerShort > | OutputImage |
typedef Image::Value | Value |
typedef Image::Point | Point |
typedef Image::Vector | Vector |
typedef Image::Dimension | Dimension |
typedef Image::Size | Size |
typedef Image::Integer | Integer |
typedef Image::Domain | Domain |
typedef Image::Domain::Space::Point::Coordinate | Coordinate |
typedef SeparableMetricHelper < Point, Integer, p > | SeparableMetric |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((CBoundedInteger< IntegerShort >)) | |
ReverseDistanceTransformation (const IntegerShort defaultForeground=NumberTraits< IntegerShort >::ONE, const IntegerShort defaultBackground=NumberTraits< IntegerShort >::ZERO) | |
~ReverseDistanceTransformation () | |
OutputImage | reconstruction (const Image &inputImage) |
template<typename DigitalSet > | |
void | reconstructionAsSet (DigitalSet &aSet, const Image &inputImage) |
template<typename Set > | |
void | reconstructionAsSet (Set &aSet, const I &aImage) |
Private Member Functions | |
bool | reconstructionInternal (const Image &aImage, Image &output, Image &swap) |
OutputImage | castValues (const Image &input) const |
void | computeSteps (const Image &inputImage, Image &output, const Dimension dim) const |
void | computeSteps1D (const Image &input, Image &output, const Point &startingPoint, const Size dim, Integer s[], Integer t[]) const |
Private Attributes | |
SeparableMetric | myMetric |
Point | myLowerBoundCopy |
Point | myUpperBoundCopy |
Point | myExtent |
Vector | myDisplacementVector |
IntegerShort | myForegroundValue |
IntegerShort | myBackgroundValue |
Aim: Implementation of the linear in time reverse distance transformation.
Description of template class 'ReverseDistanceTransformation'
More precisely, given an input image where value V at a point P corresponds to a disc with center P and radius V. The aim of the reverse distance transformation is thus to reconstruct the binary shape as the union of all balls defined in the input map.
Image | an input image type containng distance values. |
p | the static integer value to define the l_p metric. |
IntegerShort | (optional) type used to represent the output object values (default: DGtal::int8_t).xs |
Definition at line 75 of file ReverseDistanceTransformation.h.
typedef Image::Domain::Space::Point::Coordinate DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Coordinate |
Definition at line 94 of file ReverseDistanceTransformation.h.
typedef Image::Dimension DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Dimension |
Definition at line 90 of file ReverseDistanceTransformation.h.
typedef Image::Domain DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Domain |
Definition at line 93 of file ReverseDistanceTransformation.h.
typedef Image::Integer DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Integer |
Definition at line 92 of file ReverseDistanceTransformation.h.
typedef ImageContainerBySTLVector< HyperRectDomain<typename Image::Domain::Space> , IntegerShort > DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::OutputImage |
Type of resulting image.
Definition at line 85 of file ReverseDistanceTransformation.h.
typedef Image::Point DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Point |
Definition at line 88 of file ReverseDistanceTransformation.h.
typedef SeparableMetricHelper< Point , Integer , p > DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::SeparableMetric |
We construct the type associated to the separable metric.
Definition at line 97 of file ReverseDistanceTransformation.h.
typedef Image::Size DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Size |
Definition at line 91 of file ReverseDistanceTransformation.h.
typedef Image::Value DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Value |
Definition at line 87 of file ReverseDistanceTransformation.h.
typedef Image::Vector DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::Vector |
Definition at line 89 of file ReverseDistanceTransformation.h.
|
inline |
Constructor.
defaultForgroundValue | (optional) default used to represent object grid points |
defaultBackgroundValue | (optional) default used to represent background grid points |
Constructor.
Definition at line 47 of file ReverseDistanceTransformation.ih.
|
inline |
DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::BOOST_CONCEPT_ASSERT | ( | (CBoundedInteger< IntegerShort >) | ) |
|
inlineprivate |
Cast values in order to output an image of type ImageOutput. Basically, in internal computations, 0 values are associated to background points and '>0' to object point. This method casts the value to match with myForegroundValue ad myBackgroundValue specified in the constructor.
inputImage | input internal image. |
Definition at line 169 of file ReverseDistanceTransformation.ih.
|
inlineprivate |
Compute the other steps of the separable reverse distance transformation.
inputImage | the image resulting of the first (or intermediate) step |
output | the output image |
dim | the dimension to process |
Definition at line 190 of file ReverseDistanceTransformation.ih.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), and DGtal::trace.
|
private |
Compute the 1D DT associated to the steps except the first one.
aImage | the input image |
output | the output image with the DT values |
startingPoint | a point to specify the starting point of the 1D row |
dim | the dimension to process |
Definition at line 237 of file ReverseDistanceTransformation.ih.
|
inline |
Compute the Reverse Distance Transformation of an image with the SeparableMetric metric.
inputImage | the input image with distance values |
Definition at line 68 of file ReverseDistanceTransformation.ih.
|
inline |
Definition at line 98 of file ReverseDistanceTransformation.ih.
void DGtal::ReverseDistanceTransformation< Image, p, IntegerShort >::reconstructionAsSet | ( | DigitalSet & | aSet, |
const Image & | inputImage | ||
) |
Computes the reverse distance transformation and appends the result to the given digital set.
inputImage | the input image with distance values. |
aSet | the set to append the result points to. |
DigitalSet | the type of set to use. |
|
inlineprivate |
Internal method for the reconstruction (with double buffering)
aImage | input image with distances |
output | buffer with partial reconstruction. |
swap | buffer with partial reconstruction |
Definition at line 136 of file ReverseDistanceTransformation.ih.
|
private |
Value for background grid points.
Definition at line 218 of file ReverseDistanceTransformation.h.
|
private |
Displacement vector to translate temporary images.
Definition at line 212 of file ReverseDistanceTransformation.h.
|
private |
Copy of the image extent.
Definition at line 209 of file ReverseDistanceTransformation.h.
|
private |
Value for foreground grid points.
Definition at line 215 of file ReverseDistanceTransformation.h.
|
private |
Copy of the image lower bound.
Definition at line 203 of file ReverseDistanceTransformation.h.
|
private |
The separable metric instance.
Definition at line 200 of file ReverseDistanceTransformation.h.
|
private |
Copy of the image lower bound.
Definition at line 206 of file ReverseDistanceTransformation.h.