org.keridwen.modelling.group.editor.viewer
Class GroupToVtkConverter

java.lang.Object
  extended by org.keridwen.modelling.group.editor.viewer.GroupToVtkConverter

public class GroupToVtkConverter
extends Object

Build-up and manage pre-build pipelines to visualise the MeshMask contained in the given Mesh.

Author:
J.Forest, Artenum SARL.

Constructor Summary
GroupToVtkConverter()
          Default constructor.
 
Method Summary
 com.artenum.frida.processing.GroupPipeline buildUpPipeline(int id, vtk.vtkUnstructuredGrid inputGrid)
          Build-up a complete pipeline for the given group.
 com.artenum.frida.processing.GroupPipeline buildUpPipelineWithSmoothedSurface(int id, vtk.vtkUnstructuredGrid inputGrid)
           
static double[] convertColorIntoVtkColor(Color color)
          Convert a Java Color object into an array of three normalised double defining the RGB components of the color readable by VTK.
 ArrayList<vtk.vtkUnstructuredGrid> exportAllMeshMasks()
           
 ArrayList<vtk.vtkUnstructuredGrid> exportAllMeshMasksExceptedPolyhedronMasks()
           
 List<com.artenum.frida.processing.GroupPipeline> exportEdgeMeshMaskPipelineList()
          Return a list of pre-built vtk pipelines for the whole list of Edge MeshMask
 List<vtk.vtkUnstructuredGrid> exportEdgeMeshMasksList()
          EXport the list of Edges MeshMask into a list of vtkUnstructuredGrids.
 com.artenum.frida.processing.GroupPipeline exportEdgeMeshMaskToPipeline(com.artenum.penelope.mesh.interfaces.MeshMask<com.artenum.penelope.mesh.interfaces.Edge> edgeMask)
          Export the given MeshMask to a vtkDataSet and build-up the corresponding pipeline.
 List<com.artenum.frida.processing.GroupPipeline> exportFaceMeshMaskListPipelineList()
          Return a list of pre-built vtk pipelines for the whole list of Face MeshMask
 List<vtk.vtkUnstructuredGrid> exportFaceMeshMasksList()
          Export the list of vtkUnstructuredGrid corresponding to the loaded list of MeshMasks
 com.artenum.frida.processing.GroupPipeline exportFaceMeshMaskToPipeline(com.artenum.penelope.mesh.interfaces.MeshMask<com.artenum.penelope.mesh.interfaces.Face> faceMask)
          Build-up the pipeline for the given MeshMask.
 vtk.vtkUnstructuredGrid exportMesh()
          Export the view of the whole mesh.
 List<vtk.vtkUnstructuredGrid> exportPolyhedronMaskList()
          Export the whole list of PolyhedronMeshMasks.
 List<com.artenum.frida.processing.GroupPipeline> exportPolyhedronMaskPipelineList()
          Return a list of pre-built vtk pipelines for the whole list of Polyhedron MeshMask
 com.artenum.frida.processing.GroupPipeline exportPolyhedronMeshMaskToPipeline(com.artenum.penelope.mesh.interfaces.MeshMask<com.artenum.penelope.mesh.interfaces.Polyhedron> polyhedronMask)
          Export the given MeshMask to a vtkDataSet and build-up the corresponding pipeline.
 List<vtk.vtkUnstructuredGrid> exportVertexMeshMasksList()
          EXport the list of vertices MeshMask into a list of vtkUnstructuredGrids.
static double[] getNextDefaultColor()
          Get the next color from the DefaultColro Table.
static boolean initVtkContext()
          Initialise the VTK context.
 vtk.vtkActor outlineGroup(vtk.vtkUnstructuredGrid inputGrid)
          Generate an outline (red box) actor for the given group.
 void setMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
          Set the input mesh.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupToVtkConverter

public GroupToVtkConverter()
Default constructor.

Method Detail

initVtkContext

public static boolean initVtkContext()
Initialise the VTK context.

Returns:

setMesh

public void setMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
Set the input mesh.

Parameters:
mesh - - the input mesh.

exportAllMeshMasks

public ArrayList<vtk.vtkUnstructuredGrid> exportAllMeshMasks()

exportAllMeshMasksExceptedPolyhedronMasks

public ArrayList<vtk.vtkUnstructuredGrid> exportAllMeshMasksExceptedPolyhedronMasks()

exportMesh

public vtk.vtkUnstructuredGrid exportMesh()
Export the view of the whole mesh.

Returns:

exportPolyhedronMaskList

public List<vtk.vtkUnstructuredGrid> exportPolyhedronMaskList()
Export the whole list of PolyhedronMeshMasks.

Returns:

exportPolyhedronMeshMaskToPipeline

public com.artenum.frida.processing.GroupPipeline exportPolyhedronMeshMaskToPipeline(com.artenum.penelope.mesh.interfaces.MeshMask<com.artenum.penelope.mesh.interfaces.Polyhedron> polyhedronMask)
Export the given MeshMask to a vtkDataSet and build-up the corresponding pipeline.

Parameters:
polyhedronMask -
Returns:

exportPolyhedronMaskPipelineList

public List<com.artenum.frida.processing.GroupPipeline> exportPolyhedronMaskPipelineList()
Return a list of pre-built vtk pipelines for the whole list of Polyhedron MeshMask

Returns:

exportFaceMeshMasksList

public List<vtk.vtkUnstructuredGrid> exportFaceMeshMasksList()
Export the list of vtkUnstructuredGrid corresponding to the loaded list of MeshMasks

Returns:

exportFaceMeshMaskToPipeline

public com.artenum.frida.processing.GroupPipeline exportFaceMeshMaskToPipeline(com.artenum.penelope.mesh.interfaces.MeshMask<com.artenum.penelope.mesh.interfaces.Face> faceMask)
Build-up the pipeline for the given MeshMask.

Parameters:
faceMask -
Returns:
generated pipeline

exportFaceMeshMaskListPipelineList

public List<com.artenum.frida.processing.GroupPipeline> exportFaceMeshMaskListPipelineList()
Return a list of pre-built vtk pipelines for the whole list of Face MeshMask

Returns:

exportEdgeMeshMasksList

public List<vtk.vtkUnstructuredGrid> exportEdgeMeshMasksList()
EXport the list of Edges MeshMask into a list of vtkUnstructuredGrids.

Returns:
- generated list of vtkUnstructuredGrids

exportEdgeMeshMaskToPipeline

public com.artenum.frida.processing.GroupPipeline exportEdgeMeshMaskToPipeline(com.artenum.penelope.mesh.interfaces.MeshMask<com.artenum.penelope.mesh.interfaces.Edge> edgeMask)
Export the given MeshMask to a vtkDataSet and build-up the corresponding pipeline.

Parameters:
edgeMask -
Returns:
the visualisation pipeline for the given group

exportEdgeMeshMaskPipelineList

public List<com.artenum.frida.processing.GroupPipeline> exportEdgeMeshMaskPipelineList()
Return a list of pre-built vtk pipelines for the whole list of Edge MeshMask

Returns:

exportVertexMeshMasksList

public List<vtk.vtkUnstructuredGrid> exportVertexMeshMasksList()
EXport the list of vertices MeshMask into a list of vtkUnstructuredGrids.

Returns:
- generated list of vtkUnstructuredGrids

buildUpPipeline

public com.artenum.frida.processing.GroupPipeline buildUpPipeline(int id,
                                                                  vtk.vtkUnstructuredGrid inputGrid)
Build-up a complete pipeline for the given group.

Parameters:
id -
inputGrid -
Returns:
the visualisation pipeline for the given group

buildUpPipelineWithSmoothedSurface

public com.artenum.frida.processing.GroupPipeline buildUpPipelineWithSmoothedSurface(int id,
                                                                                     vtk.vtkUnstructuredGrid inputGrid)

outlineGroup

public vtk.vtkActor outlineGroup(vtk.vtkUnstructuredGrid inputGrid)
Generate an outline (red box) actor for the given group.

Parameters:
inputGrid - - VTK unstructured grid corresponding to the MeshMax of the group.
Returns:
- outline actor.

getNextDefaultColor

public static double[] getNextDefaultColor()
Get the next color from the DefaultColro Table.

Returns:
Array of three normalised double defining the RGB components of the color.

convertColorIntoVtkColor

public static double[] convertColorIntoVtkColor(Color color)
Convert a Java Color object into an array of three normalised double defining the RGB components of the color readable by VTK.

Parameters:
color - - Java Color
Returns:
- Vtk compliant color.


Copyright © 2012-2013 Artenum. All Rights Reserved.