DeveloperExample-Cloud

From Whole Brain Catalog

Jump to: navigation, search

Contents

[edit] Developer Example, Gage-Lab Data and Cloud Rendering

This document will describe the developer code example relating to Neuron Cloud rendering and the Gage lab data set.

[edit] How to Install the Binary

  • Download the binary version from here
  • Unzip
  • execute run.bat on windows or run.sh on mac / linux

[edit] How to Install From Source

[edit] From eclipse

I. First, install and download eclipse and the Maven Plugin Instructions Here

  1. Checkout a new project from SVN; http://wholebrain.googlecode.com/svn/CloudRenderExample/trunk
    1. Window->Show View->Other...
    2. Choose SVN->SVN Repository
    3. Right click within the SVN Repository View that comes up and click New->Repository Location...
    4. put: https://wholebrain.googlecode.com/svn/ If asked about a digital certificate, Accept Permanently.
    5. Navigate down to, and right click on the CloudRenderExample/ folder and choose Checkout...
      1. You will be prompted to check out the project. Choose "Check out as a project configured using the New Project Wizard".
      2. In the "New Project" window that pops up, select Java->Java Project and hit Next
      3. Do NOT install the code into a path with spaces (like Documents and Settings in Windows). It will cause problems compiling. You can check this by looking at the greyed out "Directory" text box in the "Contents" group just under the Project name at the top of the window. If any of the directories in the path contains a space, you'll need to cancel this Window, open File->Switch Workspace...->Other... and pick a workspace at a location without a space in the file name. Once you have done that, come back and redo this step.
      4. In the next window, pick a project name you like (for example, "DevExample")
      5. Click "Finish" and hit OK to any windows that popup
  1. Right-click on the project, and from the Maven submenu, click "enable dependency management"
  2. From the same Maven submenu, select "enable nested modules"
  3. Right click on the project and look at Build path...->Java Build Path->Libraries tab. Click on the arrow to open up the JRE system library. Make sure this is pointing to a jdk 1.5 that is loaded on your machine. If it isn't, then press the Add Library... button and install a new JRE System library that does point to 1.5. On windows, its usually under C:\Program Files\Java. If you can't find a 1.5 JDK, you'll need to download it.
  4. Create a new run configuration
    1. Select Run > Run Configurations:
    2. Under "Maven", create a new run configuration. Name it "clean install". Make the workspace the root under your new project. In the box called "goals" type "clean install". Run this.

[edit] How to Run

Run the main method TestCloud.java, setting up a run configuration for that file.

[edit] From a command line

We use Maven to build our code. The first thing to know about Maven is provides the "single command" ability to build an entire code base. With SVN and Maven installed you can issue the following commands to download and build the entire source of the Developer cloud example:

svn co http://wholebrain.googlecode.com/svn/CloudRenderExample/trunk cloudRenderExample
cd cloudRenderExample
mvn clean install

The one caveat to this is that you need to place a single configuration file called settings.xml in your maven directory. Your maven directory is located at ~/.m2 on linux/mac, C:\Users\[username]\.m2 on Vista, and C:\Documents and settings\[username]\.m2 in Windows XP. You can download our copy of the settings.xml file here. This will point your copy of Maven at our proxy maven repository, which contains many of the third party dependencies necessary for the Whole Brain Catalog.

This last process (mvn clean install) will take a long time because it does a lot of magic things for you. First of all it downloads all the jar files that the Whole Brain Catalog depends on to your local machine, under your maven home directory. This will take a while as the WBC depends on a lot of jars. It will also download Maven specific jar files that are used to build the code, run tests, create java docs, do deployment, and so on. Once all these jars are downloaded, it will go step-by-step through the wbc modules, compile them, run their test cases, and package them into jars.

[edit] How to run

After this is finished (will say BUILD SUCCESSFUL), you'll find within cloudRenderExample/target a file called CloudRenderExample-0.0.1-SNAPSHOT-release.zip. Unzip this and you should find a run.bat file and a run.sh file, one of which you should be able to run to see the example.


[edit] Using

  • Use the mouse to rotate around in the environment and the keys (W,A,S,D,Q,Z) for movement.
  • You will notice a pink blob in the far distance, navigate towards that pink blob until the structure of the cell cloud becomes apparent.


[edit] Notes About The Example

The TestCloud.java class has a main() method which does the following:

  1. Initializes the JME engine ('the view')
  2. Loads in the Cell morphologies into a 'Local Memory Cache'. The program looks in the current working directory for the files it needs, these files are
    1. curves.wbc.xml - Defines the shape and placement of the 'curves' that the cells lie upon (defined by the WBC master schema)
    2. network.wbc.xml - Defines the CellInstance objects, these objects describe the location and meta-data about the cells. Because these Cell instances are considered attached to a curve, the 'Time' attribute takes priority over the 'Position' attribute (which is mostly bunk data). (defined by the WBC master schema)
    3. HilarCell.morph.xml - Defines the structure of a cell (defined by MorphML schema at neuroml.org)
    4. MossyCell.morph.xml - Defines the structure of a cell (defined by MorphML schema at neuroml.org)
    5. GranuleCell.morph.xml - Defines the structure of a cell (defined by MorphML schema at neuroml.org)
    6. BasketCell.morph.xml - Defines the structure of a cell (defined by MorphML schema at neuroml.org)
  3. Creates geometries based on those cell morphologies
  • The program will give warning that no observers are set, this is normal, this is due to a dependency on the WBC-proper application which must have an observer.
Personal tools