Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

static void javamorph::CTriangulation::debug (  )  [inline, static, private]

Write left right and 50% triangulation into the debug directory.

Definition at line 247 of file CTriangulation.java.

References javamorph::CTriangle::debug(), height, triangles, and width.

Referenced by triangulate().

                               {
        BufferedImage image;
        try{
            image = new BufferedImage(CConfig.left_image.getWidth(), 
                    CConfig.left_image.getHeight(),
                    BufferedImage.TYPE_INT_RGB);
            for(CTriangle t: CConfig.left_triangles){
                t.debug(image);
            }
            ImageIO.write(image, "png", new File(CStrings.LEFT_TRI));
            image = new BufferedImage(
                    CConfig.right_image.getWidth(),
                    CConfig.right_image.getHeight(),
                    BufferedImage.TYPE_INT_RGB
                    );
            for(CTriangle t: CConfig.right_triangles){
                t.debug(image);
            }
            ImageIO.write(image, "png", new File(CStrings.RIGHT_TRI));

            image = new BufferedImage(
                    width,
                    height,
                    BufferedImage.TYPE_INT_RGB
                    );
            for(CTriangle t: triangles){
                t.debug(image);
            }
            ImageIO.write(image, "png", new File(CStrings.MIDDLE_TRI));
        }catch(Exception e){
            System.out.println("Can't debug triangles.");
            e.printStackTrace();
        }
    }


Generated by  Doxygen 1.6.0   Back to index