Class MapperContourMeshGenerator

    • Field Detail

      • PIXEL_NEIGHBOUR_THRESHOLD

        public static int PIXEL_NEIGHBOUR_THRESHOLD
      • LINE_STRIP_WIDTH

        public static float LINE_STRIP_WIDTH
      • MERGE_STRIP_DIST

        public static int MERGE_STRIP_DIST
      • mapper

        protected Mapper mapper
      • xrange

        protected Range xrange
      • yrange

        protected Range yrange
    • Constructor Detail

      • MapperContourMeshGenerator

        public MapperContourMeshGenerator​(Mapper mapper,
                                          Range xrange,
                                          Range yrange)
    • Method Detail

      • getContourMesh

        public ContourMesh getContourMesh​(IContourColoringPolicy policy,
                                          int xRes,
                                          int yRes,
                                          int nLevels,
                                          float planeAxe,
                                          boolean writeText)
        Extracts contour lines from the contour dots matrix of nLevels number of contours. Return a MeshContour that cleanly describes
        Specified by:
        getContourMesh in interface IContourMeshGenerator
      • getContourMesh

        public ContourMesh getContourMesh​(IContourColoringPolicy policy,
                                          int xRes,
                                          int yRes,
                                          double[] sortedLevels,
                                          float planeAxe,
                                          boolean writeText)
        Extracts contour lines from the contour dots matrix of contours at user-defined Heigths in sortedLevels
        Specified by:
        getContourMesh in interface IContourMeshGenerator
      • findNext

        protected IntegerCoord2d findNext​(int i,
                                          int j,
                                          int width,
                                          double[][] contours,
                                          boolean[][] processed)
      • map

        protected Coord3d map​(int i,
                              int j,
                              double[][] contours)
      • map

        protected Coord3d map​(int i,
                              int j,
                              double value,
                              double[][] contours)
      • computeHeightMatrix

        protected void computeHeightMatrix​(double[][] matrix,
                                           int xRes,
                                           int yRes)
        Calculates the Height of the surface for each point in the XY plane
        Specified by:
        computeHeightMatrix in class AbstractContourGenerator