Package org.jmol.jvxl.data

Examples of org.jmol.jvxl.data.VolumeData


    int nZ = 31;

    String[] title = new String[] {"created by SimpleJvxlWriter "
        + new SimpleDateFormat("yyyy-MM-dd', 'HH:mm").format(new Date()) };

    VolumeData volumeData;
    VoxelDataCreator vdc;
    volumeData = new VolumeData();
    volumeData.setVolumetricOrigin(0, 0, 0);
    volumeData.setVolumetricVector(0, 1f, 0f, 0f);
    volumeData.setVolumetricVector(1, 0f, 1f, 0f);
    volumeData.setVolumetricVector(2, 0f, 0f, 1f);
    volumeData.setVoxelCounts(nX, nY, nZ);

    vdc = new VoxelDataCreator(volumeData);
    vdc.createVoxelData();

    // areaVolumeReturn and surfacePointsReturn are optional
    // -- set to null for faster calculation of JVXL data
   
    float[] areaVolumeReturn = new float[2]; // or null;
    List surfacePointsReturn = new ArrayList(); // or null;

    params.isXLowToHigh = false;
    writeFile(outputFile + "A", jvxlGetData(null, params,
        volumeData, title, surfacePointsReturn, areaVolumeReturn));

    if (areaVolumeReturn != null)
      System.out.println("calculated area = " + areaVolumeReturn[0]
                         + " volume = " + areaVolumeReturn[1]
                         + " for " + surfacePointsReturn.size()
                         + " surface points");
    // streaming option: null voxelData
    volumeData.setVoxelData(null);
    params.isXLowToHigh = true;
    writeFile(outputFile + "B", jvxlGetData(vdc, params,
        volumeData, title, surfacePointsReturn, areaVolumeReturn));

    System.out.flush();
View Full Code Here


    this.meshDataServer = meshDataServer;
    params = new Parameters();
    this.meshData = (meshData == null ? new MeshData() : meshData);
    //System.out.println("SurfaceGenerator setup vertexColixs =" + this.meshData.vertexColixes);
    this.jvxlData = (jvxlData == null ? new JvxlData() : jvxlData);
    volumeData = new VolumeData();
    initializeIsosurface();
  }
View Full Code Here

TOP

Related Classes of org.jmol.jvxl.data.VolumeData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.