Skip to content

Commit

Permalink
Fixing invalid cell coordinates in ctopo-fillContours.cpp
Browse files Browse the repository at this point in the history
See DGtal-team#1296. The KhalimskyCell is only used to get his className in order
to define a CustomStyle for the Board2D. The fix replaces the invalid
cell by the lowerCell of the KhalismkySpace.
  • Loading branch information
rolanddenis committed Nov 17, 2017
1 parent 04c1e14 commit 18b1a67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/topology/ctopo-fillContours.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ int main( int /*argc*/, char** /*argv*/ )
interiorCellImage, 1, false);
//! [ctopoFillContoursFillRegion]

aBoard << CustomStyle(K.uSpel(Z2i::Point(0,0)).className(), new CustomColors(DGtal::Color::None, Color(200, 200, 200)) );
aBoard << CustomStyle(K.lowerCell().className(), new CustomColors(DGtal::Color::None, Color(200, 200, 200)) );
for(BoolImage2D::Domain::ConstIterator it = interiorCellImage.domain().begin();
it!=interiorCellImage.domain().end(); it++){
if(interiorCellImage(*it)){
Expand All @@ -137,15 +137,15 @@ int main( int /*argc*/, char** /*argv*/ )
exteriorCellHoleImage, 1, false);
//! [ctopoFillContoursFillRegionHoles]

aBoard2 << CustomStyle(K.uSpel(Z2i::Point(0,0)).className(),
aBoard2 << CustomStyle(K.lowerCell().className(),
new CustomColors(DGtal::Color::None, Color(200, 200, 200)) );
for(BoolImage2D::Domain::ConstIterator it = interiorCellHoleImage.domain().begin();
it!=interiorCellHoleImage.domain().end(); it++){
if(interiorCellHoleImage(*it)){
aBoard2 << K.uSpel(*it);
}
}
aBoard2 << CustomStyle(K.uSpel(Z2i::Point(0,0)).className(),
aBoard2 << CustomStyle(K.lowerCell().className(),
new CustomColors(DGtal::Color::None, Color(100, 100, 100)) );
for(BoolImage2D::Domain::ConstIterator it = exteriorCellHoleImage.domain().begin();
it!=exteriorCellHoleImage.domain().end(); it++){
Expand Down

0 comments on commit 18b1a67

Please sign in to comment.