org.keridwen.modelling.mesh.inspector.core
Class Controller

java.lang.Object
  extended by org.keridwen.modelling.mesh.inspector.core.Controller

public class Controller
extends Object

Main controller of the Penelope Mesh Inspector.

Author:
Julien Forest, Artenum SARL.

Nested Class Summary
 class Controller.MeshLoader
          Threaded mesh loader.
 
Field Summary
static String BORDER_CELL_LOCATOR
           
static String CELL_VOL_ANALYSER
           
static String ETA_ANALYSER
           
static String RHO_ANALYSER
           
 
Constructor Summary
Controller()
          default constructor, generate the mesh object
 
Method Summary
 Object analyseAndBuildVtkDataSet()
          Performs the analysis and convert the result under the form of a vtkDataSet.
 GenericAnalysis analyseMesh()
          Perform the analysis and return it.
 void analyseMeshAndPrint()
           
 MeshAnalyser AnalyserFactory(String analyserName, com.artenum.penelope.mesh.interfaces.Mesh mesh, HashMap inputParameters)
          Dispatcher used to select the chosen analyzer (i.e process to measure the selected information or quality, that we want measure on the mesh).
 void buildNewConsole()
           
 void exportMeshToCassandra()
          export the current mesh to the Cassandra's pipeline manager, if the Cassandra's and VTK's contexts are both true.
 vtk.vtkDataSet exportMeshToVtkDataSet()
          export the current mesh to a vtkUnstructuredGrid, if the VTK's context is true.
 void exportMeshToVtkGridFile(String fileOut)
          export the current mesh to the VTK legacy file defined by fileOut, if the VTK context is set to true.
 void exportVtkDataSetToCassandra()
          export the current analysis to Cassandra, if both Cassandra's and VTK's contexts are true.
 void exportVtkDataSetToFile(String fileOut)
          Perform the selected analysis, export it under the form of a vtkDataSet and save it into the given file.
 MeshAnalyser getAnalyser()
           
 GenericAnalysis getAnalysis()
          return the analysis of the current analyser
 com.artenum.cassandra.Cassandra getCassandraViewer()
           
 InspectorGUI getMainGUI()
           
 com.artenum.penelope.mesh.interfaces.Mesh getMesh()
           
 HashMap getMeshMetaData()
           
 File getReportFile()
           
 DefaultMutableTreeNode getSelectedNode()
           
 InspectorTreeModel getTreeModel()
           
 void loadMeshFromDataBus(com.artenum.penelope.mesh.interfaces.Mesh mesh, MeshUIPanel uiPanel)
          Load the mesh given in parameter (typically from the Keridwen's data bus.
 com.artenum.penelope.mesh.interfaces.Mesh loadMeshFromFile(String fileIn)
          load a mesh from a mesh file (Gmsh format only for the moment) DEPRECATED
 void loadMeshUpdateTreeAndGo(File fileIn, MeshUIPanel uiPanel)
          load a mesh from a mesh file (Gmsh format only for the moment) through an independent thread.
 void progressBarUpdated(ActionEvent evt)
           
 void runAnalyser()
           
 void setAnalyser(MeshAnalyser analyser)
          set the current analyzer.
 void setCassandraViewer(com.artenum.cassandra.Cassandra cassandraViewer)
          set the linked Cassandra viewer.
 void setMainGUI(InspectorGUI mainGUI)
          set the main GUI.
 void setMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
          set the current mesh.
 void setReportFile(File reportFile)
          Set the path of the common reporting file.
 void setSelectedNode(DefaultMutableTreeNode selectedNodeTree)
           
 void setTreeModel(InspectorTreeModel treeModel)
          Set the tree model (InspectorTreeModel) of the present study.
 void updateControlPanel(DefaultTreeNode node)
          update the view of the control panel.
 void updateControlPanel(String panelKey)
          Deprecated.  
 void updateControlTree()
          update the view of the control tree.
 void updateMenuBar(String menuKey)
          update the view of the menu bar (i.e hide inaccessible actions).
 void updateMeshMetaData()
          update the meta-data table from the values of the current mesh.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RHO_ANALYSER

public static final String RHO_ANALYSER
See Also:
Constant Field Values

ETA_ANALYSER

public static final String ETA_ANALYSER
See Also:
Constant Field Values

CELL_VOL_ANALYSER

public static final String CELL_VOL_ANALYSER
See Also:
Constant Field Values

BORDER_CELL_LOCATOR

public static final String BORDER_CELL_LOCATOR
See Also:
Constant Field Values
Constructor Detail

Controller

public Controller()
default constructor, generate the mesh object

Method Detail

loadMeshFromFile

public com.artenum.penelope.mesh.interfaces.Mesh loadMeshFromFile(String fileIn)
load a mesh from a mesh file (Gmsh format only for the moment) DEPRECATED


loadMeshUpdateTreeAndGo

public void loadMeshUpdateTreeAndGo(File fileIn,
                                    MeshUIPanel uiPanel)
load a mesh from a mesh file (Gmsh format only for the moment) through an independent thread.

Parameters:
fileIn -
uiPanel -

progressBarUpdated

public void progressBarUpdated(ActionEvent evt)

analyseMesh

public GenericAnalysis analyseMesh()
Perform the analysis and return it.

Returns:
the resulting analysis.

loadMeshFromDataBus

public void loadMeshFromDataBus(com.artenum.penelope.mesh.interfaces.Mesh mesh,
                                MeshUIPanel uiPanel)
Load the mesh given in parameter (typically from the Keridwen's data bus.

Parameters:
mesh -
uiPanel -

setSelectedNode

public void setSelectedNode(DefaultMutableTreeNode selectedNodeTree)

getSelectedNode

public DefaultMutableTreeNode getSelectedNode()

AnalyserFactory

public MeshAnalyser AnalyserFactory(String analyserName,
                                    com.artenum.penelope.mesh.interfaces.Mesh mesh,
                                    HashMap inputParameters)
Dispatcher used to select the chosen analyzer (i.e process to measure the selected information or quality, that we want measure on the mesh). This method should be called before to run the analyser with methods like, runAnalyser or analyseMeshAndPrint. The choice is done using string based keys, as define in RHO_ANALYSER, ETA_ANALYSER. The input parameter is a generic hashmap used to transfer additional parameters to set the analyser, on the basis of a key-value approach. The detailed format/structure of this hashmap may differ from an analyser to another one.

Parameters:
analyserName -
inputParameters -

analyseMeshAndPrint

public void analyseMeshAndPrint()

runAnalyser

public void runAnalyser()

getAnalysis

public GenericAnalysis getAnalysis()
return the analysis of the current analyser


analyseAndBuildVtkDataSet

public Object analyseAndBuildVtkDataSet()
Performs the analysis and convert the result under the form of a vtkDataSet. The quality factor is mapped on this one.

Returns:
- vtkDataSet with the mapped quality factor or null if the analysis or the conversion was not possible.

exportMeshToVtkDataSet

public vtk.vtkDataSet exportMeshToVtkDataSet()
export the current mesh to a vtkUnstructuredGrid, if the VTK's context is true.

Returns:
return the resulting vtk data set.

exportMeshToCassandra

public void exportMeshToCassandra()
export the current mesh to the Cassandra's pipeline manager, if the Cassandra's and VTK's contexts are both true.


exportMeshToVtkGridFile

public void exportMeshToVtkGridFile(String fileOut)
export the current mesh to the VTK legacy file defined by fileOut, if the VTK context is set to true.

Parameters:
fileOut -

exportVtkDataSetToCassandra

public void exportVtkDataSetToCassandra()
export the current analysis to Cassandra, if both Cassandra's and VTK's contexts are true.


exportVtkDataSetToFile

public void exportVtkDataSetToFile(String fileOut)
Perform the selected analysis, export it under the form of a vtkDataSet and save it into the given file. NB: Function available only if VTK_CONTEXT is true.

Parameters:
fileOut - - output file for the vtkDataSet with the quality factor mapped.

getMesh

public com.artenum.penelope.mesh.interfaces.Mesh getMesh()
Returns:
return the current mesh.

setMesh

public void setMesh(com.artenum.penelope.mesh.interfaces.Mesh mesh)
set the current mesh.

Parameters:
mesh -

setTreeModel

public void setTreeModel(InspectorTreeModel treeModel)
Set the tree model (InspectorTreeModel) of the present study.

Parameters:
treeModel - - input InspectorTreeModel.

getTreeModel

public InspectorTreeModel getTreeModel()

getAnalyser

public MeshAnalyser getAnalyser()
Returns:
get the current analyzer.

setAnalyser

public void setAnalyser(MeshAnalyser analyser)
set the current analyzer.

Parameters:
analyser -

updateControlTree

public void updateControlTree()
update the view of the control tree.


updateMenuBar

public void updateMenuBar(String menuKey)
update the view of the menu bar (i.e hide inaccessible actions).

Parameters:
menuKey -

updateControlPanel

@Deprecated
public void updateControlPanel(String panelKey)
Deprecated. 


updateControlPanel

public void updateControlPanel(DefaultTreeNode node)
update the view of the control panel.

Parameters:
node -

getMainGUI

public InspectorGUI getMainGUI()
Returns:
return the main GUI.

setMainGUI

public void setMainGUI(InspectorGUI mainGUI)
set the main GUI.

Parameters:
mainGUI -

updateMeshMetaData

public void updateMeshMetaData()
update the meta-data table from the values of the current mesh.


getMeshMetaData

public HashMap getMeshMetaData()

setReportFile

public void setReportFile(File reportFile)
Set the path of the common reporting file.

Parameters:
reportFile -

getReportFile

public File getReportFile()
Returns:
return the current reporting file.

getCassandraViewer

public com.artenum.cassandra.Cassandra getCassandraViewer()
Returns:
get the linked Cassandra viewer.

setCassandraViewer

public void setCassandraViewer(com.artenum.cassandra.Cassandra cassandraViewer)
set the linked Cassandra viewer.

Parameters:
cassandraViewer -

buildNewConsole

public void buildNewConsole()


Copyright © 2013 Artenum. All Rights Reserved.