コード例 #1
0
ファイル: SurfaceReader.java プロジェクト: AndrewKL/RADMAP
 protected boolean gotoAndReadVoxelData(boolean isMapData) {
   // overloaded in jvxlReader
   initializeVolumetricData();
   if (nPointsX > 0 && nPointsY > 0 && nPointsZ > 0)
     try {
       gotoData(params.fileIndex - 1, nPointsX * nPointsY * nPointsZ);
       readSurfaceData(isMapData);
     } catch (Exception e) {
       Logger.error(e.toString());
       return false;
     }
   return true;
 }
コード例 #2
0
ファイル: SurfaceReader.java プロジェクト: AndrewKL/RADMAP
  private void generateSurfaceData() {
    edgeData = "";
    if (vertexDataOnly) {
      try {
        readSurfaceData(false);
      } catch (Exception e) {
        e.printStackTrace();
        Logger.error("Exception in SurfaceReader::readSurfaceData: " + e.getMessage());
      }
      return;
    }
    contourVertexCount = 0;
    int contourType = -1;
    marchingSquares = null;

    if (params.thePlane != null || params.isContoured) {
      marchingSquares =
          new MarchingSquares(
              this,
              volumeData,
              params.thePlane,
              params.contoursDiscrete,
              params.nContours,
              params.thisContour,
              params.contourFromZero);
      contourType = marchingSquares.getContourType();
      marchingSquares.setMinMax(params.valueMappedToRed, params.valueMappedToBlue);
    }
    params.contourType = contourType;
    params.isXLowToHigh = isXLowToHigh;
    marchingCubes = new MarchingCubes(this, volumeData, params, jvxlVoxelBitSet);
    String data = marchingCubes.getEdgeData();
    if (params.thePlane == null) edgeData = data;
    jvxlData.setSurfaceInfoFromBitSet(marchingCubes.getBsVoxels(), params.thePlane);
    jvxlData.jvxlExcluded = params.bsExcluded;
    if (isJvxl) edgeData = jvxlEdgeDataRead;
    postProcessVertices();
  }