#include "HxSF.h"
Go to the source code of this file.
Functions | |
HxImageRep L_HXIMAGEREP | HxGeodesicDistanceTransform (HxImageRep input, int conn=4) |
using the Luc Vincent watershed. More... |
|
using the Luc Vincent watershed.
00029 { 00030 HxImageRep mask=input; 00031 HxTagList tags; 00032 HxAddTag(tags, "connectivity", conn); 00033 00034 //to speedup compute here the min and max gray values 00035 int hmin,hmax; 00036 hmin = HxPixMin(input).HxScalarIntValue().x(); 00037 hmax = HxPixMax(input).HxScalarIntValue().x(); 00038 HxAddTag(tags,"hmin",hmin); 00039 HxAddTag(tags,"hmax",hmax); 00040 00041 Array2D<int> *distImage = new Array2D<int>(input.sizes().x(),input.sizes().y(),0); 00042 HxAddTag(tags,"geoDistPointer",distImage); 00043 00044 00045 HxAddTag(tags,"exportGeodesicImage",1); 00046 HxImageRep out = input.queueBasedOp(mask, "qWaterShedLV", tags); 00047 00048 distImage = HxGetTag(tags,"geoDistPointer",distImage); 00049 out = distImage->MakeHxImage(); 00050 00051 return out; 00052 } |