64int main(
int argc,
char** argv )
68 for (
int i = 0; i < argc; ++i )
75 string imageFileName = examplesPath +
"samples/cat10.vol";
76 trace.
info() << imageFileName <<std::endl;
95 trace.
info() <<
"starting bel: " << bel << std::endl;
98 trace.
emphase() <<
"starting bel not found" << std::endl;
112 std::pair<Point,Point> bpair = toIncidentPoints( bel );
113 SurfelPredicate surfelPredicate( ks, binaryImage,
114 binaryImage( bpair.first ),
115 binaryImage( bpair.second ) );
116 Frontier frontier( ks, surfelPredicate,
122 const double maximalDistance = 3.0;
133 DistanceImage imageDistance(
domain, 0.0 );
134 AcceptedPointSet pointSet( imageDistance );
136 for (Frontier::SurfelConstIterator it = frontier.begin(), itEnd = frontier.end();
139 pointSet.insert( toInnerPoint(*it) );
140 imageDistance.setValue( toInnerPoint(*it), 0.5 );
145 FMM fmm( imageDistance, pointSet, binaryImage,
154 trace.
info() <<
"Erosion of radius: " << maximalDistance << std::endl;
157 for (AcceptedPointSet::ConstIterator it = pointSet.begin(), itEnd = pointSet.end();
160 binaryImage.setValue(*it, 0);
169 string outputFileName =
"eroded.vol";
170 trace.
info() <<
"to " << outputFileName << std::endl;
const Point & lowerBound() const
const Point & upperBound() const
bool init(const Point &lower, const Point &upper, bool isClosed)
Specifies the upper and lower bounds for the maximal cells in this space.