Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

NetworkViewer Class Reference

#include <NetworkViewer.h>

List of all members.

Public Member Functions

void addHighlight (unsigned int neurID, RGBColor *highlightColor)
void cancelRenderProgress ()
void clearHighlights ()
void deleteConnectionGroup (unsigned int ID)
void deleteNeuronGroup (unsigned int ID)
vector< unsigned int > * getConnectionViewVector ()
void loadConnectionGroup (unsigned int, bool)
void loadDefaultClippingVolume ()
void loadNeuronGroup (unsigned int, bool)
 NetworkViewer (QWidget *parent, QSplashScreen *, DBInterface *, unsigned int)
void refresh ()
void reloadEverything ()
void resetView ()
void setConnectionView (vector< unsigned int >)
void setFullRenderMode (bool)
void setLayerView (vector< unsigned int >)
void setMaxAutoLoadConnGrpSize (unsigned int)
void setNetworkViewerProperties (QWidget *)
void setNeuronConnectionMode (bool mode, unsigned int neuronGroup1, bool betwMode, unsigned int neuronGroup2)
void setNeuronFilterMode (bool mode, char minWeight, char maxWeight, bool showFrom, bool showTo, bool updateDisplay)
void setRenderDelay (double)
void setRenderProgressBar (QProgressBar *)
void showConnections (bool)
void zoomAboveLayer (unsigned int layID)
void zoomToLayer (unsigned int layID)
 ~NetworkViewer ()

Protected Member Functions

void initializeGL ()
void paintGL ()
void resizeGL (int width, int height)

Private Slots

void acceleratorKeyPressed (int acceleratorID)
void setFullRender ()

Private Member Functions

void checkOpenGLErrors ()
void deleteAllConnectionGroups ()
void deleteAllNeuronGroups ()
void disableFullRender ()
void drawAxes ()
void drawSolidSphere (GLdouble radius, GLint slices, GLint stacks)
void fillRotationMatrix (float, float, float, float)
float getFloat (string s)
void initialiseCameraParameters ()
void initialiseFullRender ()
void loadAllConnectionGroups (QSplashScreen *splashScreen=0)
void loadAllNeuronGroups (QSplashScreen *splashScreen=0)
 NetworkViewer (const NetworkViewer &)
NetworkViewer operator= (const NetworkViewer &)
void rotateVector (float, float, float, GLfloat[])
void rotateXAxis (float angle)
void rotateZAxis (float angle)
void viewClippingVolume_Horizontal (ClippingVolume)
void viewClippingVolume_Vertical (ClippingVolume)

Private Attributes

GLfloat cameraMatrix [16]
bool cancelRender
map< unsigned int, ConnectionGroupHolder * > connectionGrpMap
vector< unsigned int > connectionViewVector
DBInterface * dbInterface
ClippingVolume defaultClippingVol
bool drawConnections
unsigned int firstSingleNeurGrpID
unsigned int firstSingleNeuronGroupWidth
unsigned int firstSingleNeuronID
unsigned int * fromNeuronIDPtr
map< unsigned int, bool > fromNeuronMap
float * fromXPtr
float * fromYPtr
float * fromZPtr
bool fullRender
bool fullRenderMode
HighlightColorMap highlightColorMap
bool highlightMode
HighlightNeuronMap highlightNeuronMap
QAccel * keyboardAccelerator
vector< unsigned int > layerViewVector
QProgressDialog * loadProgressDialog
GLuint mainDisplayList
unsigned int maxAutoLoadConnGrpSize
unsigned int maxFirstSingleNeuronID
unsigned int maxSecondSingleNeuronID
char maxWeight
unsigned int minFirstSingleNeuronID
unsigned int minSecondSingleNeuronID
char minWeight
QWidget * networkViewerProperties
bool neuronConnectionMode
bool neuronFilterMode
map< unsigned int, NeuronGroupHolder * > neuronGrpMap
unsigned int * neuronIDPtr
int newTempScreenHeight
int newTempScreenWidth
bool paintingGL
bool paintSkipped
GLfloat perspective_angle
GLfloat perspective_far
GLfloat perspective_near
int renderDelay_ms
QProgressBar * renderProgressBar
QTimer * renderTimer
bool resizeSkipped
GLfloat rotationMatrix [16]
GLfloat sceneRotateX
GLfloat sceneRotateZ
unsigned int secondSingleNeurGrpID
unsigned int secondSingleNeuronGroupWidth
unsigned int secondSingleNeuronID
bool showBetweenConnections
bool showFromConnections
bool showToConnections
SpikeStreamApplicationspikeStrApp
unsigned int * toNeuronIDPtr
map< unsigned int, bool > toNeuronMap
float * toXPtr
float * toYPtr
float * toZPtr
bool viewStateChanged
char * weightPtr
float * xPosPtr
float * yPosPtr
float * zPosPtr


Detailed Description

Generates a three dimensional view of the network and connections using OpenGL. Stores a data representation of all the neurons and connections. Parameters for this display are set using the Network Viewer Properties widget. Some of the methods are adapted from gltools, provided in the OpenGL Superbible, Third Edition.

Definition at line 77 of file NetworkViewer.h.


Constructor & Destructor Documentation

NetworkViewer::NetworkViewer QWidget *  parent,
QSplashScreen *  splashScreen,
DBInterface *  dbInter,
unsigned int  maxAutoLoadConns
 

Constructor.

Definition at line 76 of file NetworkViewer.cpp.

References acceleratorKeyPressed(), dbInterface, drawConnections, firstSingleNeuronGroupWidth, firstSingleNeuronID, fullRender, fullRenderMode, highlightMode, highlightNeuronMap, initialiseCameraParameters(), keyboardAccelerator, loadAllConnectionGroups(), loadAllNeuronGroups(), loadProgressDialog, maxAutoLoadConnGrpSize, maxFirstSingleNeuronID, maxSecondSingleNeuronID, maxWeight, minFirstSingleNeuronID, minSecondSingleNeuronID, minWeight, neuronConnectionMode, neuronFilterMode, paintingGL, perspective_angle, perspective_far, perspective_near, renderDelay_ms, renderTimer, secondSingleNeuronGroupWidth, secondSingleNeuronID, setFullRender(), showBetweenConnections, showFromConnections, showToConnections, spikeStrApp, SpikeStreamMainWindow::spikeStreamApplication, and viewStateChanged.

NetworkViewer::~NetworkViewer  ) 
 

Destructor.

Definition at line 175 of file NetworkViewer.cpp.

References connectionGrpMap, and neuronGrpMap.

NetworkViewer::NetworkViewer const NetworkViewer  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void NetworkViewer::acceleratorKeyPressed int  acceleratorID  )  [private, slot]
 

Changes the viewpoint depending on which keys are pressed. Controls movement around the 3D environment.

Definition at line 1667 of file NetworkViewer.cpp.

References cameraMatrix, disableFullRender(), firstSingleNeurGrpID, firstSingleNeuronGroupWidth, firstSingleNeuronID, fullRender, fullRenderMode, keyboardAccelerator, maxFirstSingleNeuronID, maxSecondSingleNeuronID, minFirstSingleNeuronID, minSecondSingleNeuronID, networkViewerProperties, neuronConnectionMode, paintingGL, renderDelay_ms, renderTimer, resetView(), rotateXAxis(), rotateZAxis(), sceneRotateX, sceneRotateZ, secondSingleNeurGrpID, secondSingleNeuronGroupWidth, secondSingleNeuronID, and viewStateChanged.

Referenced by NetworkViewer().

void NetworkViewer::addHighlight unsigned int  neurID,
RGBColor highlightColor
 

Adds a neuron to be highlighted.

Definition at line 195 of file NetworkViewer.cpp.

References highlightColorMap, highlightMode, highlightNeuronMap, and viewStateChanged.

Referenced by HighlightDialog::addHighlightButtonPressed().

void NetworkViewer::cancelRenderProgress  ) 
 

Cancels the render in full render mode.

Definition at line 204 of file NetworkViewer.cpp.

References cancelRender.

Referenced by NetworkViewerProperties::cancelRenderProgress().

void NetworkViewer::checkOpenGLErrors  )  [private]
 

Checks for errors in OpenGL.

Definition at line 1900 of file NetworkViewer.cpp.

Referenced by paintGL(), and resizeGL().

void NetworkViewer::clearHighlights  ) 
 

Clears all of the current highlights.

Definition at line 210 of file NetworkViewer.cpp.

References highlightColorMap, highlightMode, highlightNeuronMap, and viewStateChanged.

Referenced by HighlightDialog::clearButtonPressed().

void NetworkViewer::deleteAllConnectionGroups  )  [private]
 

Deletes all of the connection groups being displayed.

Definition at line 1911 of file NetworkViewer.cpp.

References connectionGrpMap, and connectionViewVector.

Referenced by reloadEverything().

void NetworkViewer::deleteAllNeuronGroups  )  [private]
 

Deletes all the neuron groups without deleteing associated connection groups.

Definition at line 1924 of file NetworkViewer.cpp.

References firstSingleNeurGrpID, firstSingleNeuronGroupWidth, layerViewVector, maxFirstSingleNeuronID, maxSecondSingleNeuronID, minFirstSingleNeuronID, minSecondSingleNeuronID, neuronGrpMap, secondSingleNeurGrpID, secondSingleNeuronGroupWidth, and showBetweenConnections.

Referenced by reloadEverything().

void NetworkViewer::deleteConnectionGroup unsigned int  connGrpID  ) 
 

Removes the data structures for a connection group after it has been deleted from the database by the ConnectionWidget.

Definition at line 226 of file NetworkViewer.cpp.

References connectionGrpMap, connectionViewVector, and viewStateChanged.

Referenced by ConnectionWidget::deleteConnections(), ConnectionWidget::deleteLayerConnections(), and deleteNeuronGroup().

void NetworkViewer::deleteNeuronGroup unsigned int  neuronGrpID  ) 
 

Removes the data structures for a neuron group after it has been deleted from the database by the LayerWidget. Also removes any connections to this neuron group. Exception handling for this class should be done by the calling method.

Definition at line 252 of file NetworkViewer.cpp.

References dbInterface, deleteConnectionGroup(), firstSingleNeurGrpID, firstSingleNeuronGroupWidth, layerViewVector, maxFirstSingleNeuronID, maxSecondSingleNeuronID, minFirstSingleNeuronID, minSecondSingleNeuronID, neuronGrpMap, secondSingleNeurGrpID, secondSingleNeuronGroupWidth, showBetweenConnections, and viewStateChanged.

Referenced by LayerWidget::deleteLayer(), and LayerWidget::editLayerProperties().

void NetworkViewer::disableFullRender  )  [private]
 

Switches off everything associated with full render mode.

Definition at line 1947 of file NetworkViewer.cpp.

References fullRender, and viewStateChanged.

Referenced by acceleratorKeyPressed(), and setFullRenderMode().

void NetworkViewer::drawAxes void   )  [private]
 

Draw X, Y and Z axes These are drawn so that they cover the clipping volume plus a bit of extra length.

Definition at line 1960 of file NetworkViewer.cpp.

References defaultClippingVol, ClippingVolume::maxX, ClippingVolume::maxY, ClippingVolume::maxZ, ClippingVolume::minX, ClippingVolume::minY, and ClippingVolume::minZ.

Referenced by paintGL().

void NetworkViewer::drawSolidSphere GLdouble  radius,
GLint  slices,
GLint  stacks
[private]
 

Used to represent neurons as a solid sphere Adapted from gltools FIXME A BETTER NEURON REPRESENTATION COULD BE CREATED - PERHAPS USING TEXTURE MAPPING.

Definition at line 2022 of file NetworkViewer.cpp.

Referenced by paintGL().

void NetworkViewer::fillRotationMatrix float  angle,
float  x,
float  y,
float  z
[private]
 

Adapted from gltools Fills the 4x4 rotation matrix to enable it to be used to rotate camera frame Note that angle is in radians NOT degrees.

Definition at line 2036 of file NetworkViewer.cpp.

References rotationMatrix.

Referenced by rotateXAxis(), and rotateZAxis().

vector< unsigned int > * NetworkViewer::getConnectionViewVector  ) 
 

Returns the vector containing the connections that are showing.

Definition at line 327 of file NetworkViewer.cpp.

References connectionViewVector.

Referenced by NetworkViewerProperties::loadConnectionDetails().

float NetworkViewer::getFloat string  s  )  [private]
 

Converts strings to floats.

Definition at line 2092 of file NetworkViewer.cpp.

Referenced by loadDefaultClippingVolume(), and loadNeuronGroup().

void NetworkViewer::initialiseCameraParameters  )  [private]
 

Sets the camera parameters to their starting values.

Definition at line 2106 of file NetworkViewer.cpp.

References cameraMatrix, sceneRotateX, and sceneRotateZ.

Referenced by NetworkViewer(), viewClippingVolume_Horizontal(), and viewClippingVolume_Vertical().

void NetworkViewer::initialiseFullRender  )  [private]
 

Sets up the graphics to do a detailed rendering of the network.

Definition at line 2139 of file NetworkViewer.cpp.

References fBrightLight, fLowLight, and fNoLight.

Referenced by initializeGL(), setFullRender(), and setFullRenderMode().

void NetworkViewer::initializeGL  )  [protected]
 

Sets up the rendering context.

Definition at line 983 of file NetworkViewer.cpp.

References fullRenderMode, initialiseFullRender(), mainDisplayList, and renderProgressBar.

void NetworkViewer::loadAllConnectionGroups QSplashScreen *  splashScreen = 0  )  [private]
 

Loads up all of the connection group data so that it can be displayed quickly.

Definition at line 2162 of file NetworkViewer.cpp.

References dbInterface, and loadConnectionGroup().

Referenced by NetworkViewer(), and reloadEverything().

void NetworkViewer::loadAllNeuronGroups QSplashScreen *  splashScreen = 0  )  [private]
 

Loads up all the neuron groups into a data structure to enable rapid display.

Definition at line 2207 of file NetworkViewer.cpp.

References dbInterface, defaultClippingVol, loadDefaultClippingVolume(), loadNeuronGroup(), and viewClippingVolume_Horizontal().

Referenced by NetworkViewer(), and reloadEverything().

void NetworkViewer::loadConnectionGroup unsigned int  connGrpID,
bool  showProgressDialog
 

Loads a connection group with connGrpID from the database Only automatically loads connection groups less than 1000000 unless a progress bar is being displayed. Exceptions should be handled by the class that calls this method.

Definition at line 336 of file NetworkViewer.cpp.

References connectionGrpMap, ConnectionGroupHolder::connectionType, dbInterface, ConnectionGroupHolder::fromNeuronIDArray, fromNeuronIDPtr, ConnectionGroupHolder::fromXArray, fromXPtr, ConnectionGroupHolder::fromYArray, fromYPtr, ConnectionGroupHolder::fromZArray, fromZPtr, loadProgressDialog, maxAutoLoadConnGrpSize, neuronGrpMap, ConnectionGroupHolder::numberOfConnections, NeuronGroupHolder::startNeuronID, ConnectionGroupHolder::toNeuronIDArray, toNeuronIDPtr, ConnectionGroupHolder::toXArray, toXPtr, ConnectionGroupHolder::toYArray, toYPtr, ConnectionGroupHolder::toZArray, toZPtr, viewStateChanged, ConnectionGroupHolder::weightArray, weightPtr, NeuronGroupHolder::xPosArray, NeuronGroupHolder::yPosArray, and NeuronGroupHolder::zPosArray.

Referenced by ConnectionWidget::createConnections(), loadAllConnectionGroups(), and setConnectionView().

void NetworkViewer::loadDefaultClippingVolume  ) 
 

Loads the default clipping volume from the database. Exception handling should be done by the class that calls this method.

Definition at line 469 of file NetworkViewer.cpp.

References dbInterface, defaultClippingVol, getFloat(), ClippingVolume::maxX, ClippingVolume::maxY, ClippingVolume::maxZ, ClippingVolume::minX, ClippingVolume::minY, and ClippingVolume::minZ.

Referenced by LayerWidget::deleteLayer(), LayerWidget::editLayerProperties(), loadAllNeuronGroups(), and LayerWidget::newLayer().

void NetworkViewer::loadNeuronGroup unsigned int  neuronGroupID,
bool  showProgressDialog
 

Loads up a neuron group with a particular neuron ID This is used to load up layers at the beginning of the application and called by LayerWidget when a new layer is created. This method will return immediately if the neuron group has already been loaded. A neuron group needs to be explicitly deleted before it can be reloaded. Exception handling for this should be done by the invoking method.

Definition at line 538 of file NetworkViewer.cpp.

References NeuronGroupHolder::clippingVolume, dbInterface, getFloat(), layerViewVector, loadProgressDialog, ClippingVolume::maxX, ClippingVolume::maxY, ClippingVolume::maxZ, ClippingVolume::minX, ClippingVolume::minY, ClippingVolume::minZ, neuronGrpMap, NeuronGroupHolder::neuronIDArray, neuronIDPtr, NeuronGroupHolder::neuronType, NeuronGroupHolder::numberOfNeurons, NeuronGroupHolder::startNeuronID, viewStateChanged, NeuronGroupHolder::xPosArray, xPosPtr, NeuronGroupHolder::yPosArray, yPosPtr, NeuronGroupHolder::zPosArray, and zPosPtr.

Referenced by ConnectionWidget::createConnections(), LayerWidget::editLayerProperties(), loadAllNeuronGroups(), and LayerWidget::newLayer().

NetworkViewer NetworkViewer::operator= const NetworkViewer  )  [private]
 

Declare assignment private so it cannot be used inadvertently.

void NetworkViewer::paintGL  )  [protected]
 

Draw the scene.

Definition at line 1003 of file NetworkViewer.cpp.

References cameraMatrix, cancelRender, checkOpenGLErrors(), CONNECTED_NEURON_COLOUR, connectionGrpMap, connectionViewVector, DEFAULT_NEURON_COLOUR_FULL, DEFAULT_NEURON_COLOUR_OUTLINE, drawAxes(), drawConnections, drawSolidSphere(), firstSingleNeuronID, fromNeuronIDPtr, fromNeuronMap, fromXPtr, fromYPtr, fromZPtr, fullRender, HIGHLIGHT_FIRST_NEURON_COLOUR_FULL, HIGHLIGHT_FIRST_NEURON_COLOUR_OUTLINE, HIGHLIGHT_SECOND_NEURON_COLOUR_FULL, HIGHLIGHT_SECOND_NEURON_COLOUR_OUTLINE, highlightMode, highlightNeuronMap, layerViewVector, mainDisplayList, minWeight, NEGATIVE_CONNECTION_COLOUR, networkViewerProperties, neuronConnectionMode, neuronFilterMode, neuronGrpMap, neuronIDPtr, newTempScreenHeight, newTempScreenWidth, paintingGL, paintSkipped, POSITIVE_CONNECTION_COLOUR, renderProgressBar, resizeGL(), resizeSkipped, sceneRotateX, sceneRotateZ, secondSingleNeuronID, showBetweenConnections, showFromConnections, showToConnections, spikeStrApp, SpikeStreamApplication::startRender(), SpikeStreamApplication::stopRender(), toNeuronIDPtr, toNeuronMap, toXPtr, toYPtr, toZPtr, viewStateChanged, weightPtr, xPosPtr, yPosPtr, and zPosPtr.

void NetworkViewer::refresh  ) 
 

Called by external classes to repaint the display.

Definition at line 668 of file NetworkViewer.cpp.

Referenced by HighlightDialog::addHighlightButtonPressed().

void NetworkViewer::reloadEverything  ) 
 

Called after a new database has been loaded.

Definition at line 674 of file NetworkViewer.cpp.

References deleteAllConnectionGroups(), deleteAllNeuronGroups(), loadAllConnectionGroups(), loadAllNeuronGroups(), and viewStateChanged.

Referenced by SpikeStreamMainWindow::reloadEverything().

void NetworkViewer::resetView  ) 
 

Resets the view so all neural networks can be seen.

Definition at line 689 of file NetworkViewer.cpp.

References defaultClippingVol, and viewClippingVolume_Horizontal().

Referenced by acceleratorKeyPressed(), LayerWidget::deleteLayer(), LayerWidget::editLayerProperties(), and LayerWidget::newLayer().

void NetworkViewer::resizeGL int  screenWidth,
int  screenHeight
[protected]
 

Called when the window is resized. Recalculates the viewport and clipping volume.

Definition at line 1625 of file NetworkViewer.cpp.

References checkOpenGLErrors(), newTempScreenHeight, newTempScreenWidth, paintingGL, perspective_angle, perspective_far, perspective_near, and resizeSkipped.

Referenced by paintGL().

void NetworkViewer::rotateVector float  ,
float  ,
float  ,
GLfloat  []
[private]
 

Referenced by rotateXAxis(), and rotateZAxis().

void NetworkViewer::rotateXAxis float  angle  )  [private]
 

Rotates camera around its own X axis.

Definition at line 2265 of file NetworkViewer.cpp.

References cameraMatrix, fillRotationMatrix(), and rotateVector().

Referenced by acceleratorKeyPressed().

void NetworkViewer::rotateZAxis float  angle  )  [private]
 

Rotates camera around its own Z axis.

Definition at line 2291 of file NetworkViewer.cpp.

References cameraMatrix, fillRotationMatrix(), and rotateVector().

Referenced by acceleratorKeyPressed().

void NetworkViewer::setConnectionView vector< unsigned int >  connIDVect  ) 
 

Sets the visible connection groups.

Definition at line 695 of file NetworkViewer.cpp.

References connectionGrpMap, connectionViewVector, loadConnectionGroup(), networkViewerProperties, and viewStateChanged.

Referenced by LayerWidget::editLayerProperties(), ConnectionWidget::tableClicked(), and ConnectionWidget::tableHeaderClicked().

void NetworkViewer::setFullRender  )  [private, slot]
 

Switches on full render. Full render mode must be enabled first. Generally triggered after renderDelay_ms.

Definition at line 1885 of file NetworkViewer.cpp.

References fullRender, fullRenderMode, initialiseFullRender(), and viewStateChanged.

Referenced by NetworkViewer().

void NetworkViewer::setFullRenderMode bool  enableFullRender  ) 
 

Controls whether neurons are represented as lit spheres or simple vertices.

Definition at line 743 of file NetworkViewer.cpp.

References disableFullRender(), fullRenderMode, initialiseFullRender(), renderDelay_ms, renderTimer, and viewStateChanged.

Referenced by NetworkViewerProperties::renderStateChanged().

void NetworkViewer::setLayerView vector< unsigned int >  layerIDVect  ) 
 

Sets the visible neuron groups.

Definition at line 765 of file NetworkViewer.cpp.

References layerViewVector, and viewStateChanged.

Referenced by LayerWidget::editLayerProperties(), LayerWidget::tableClicked(), and LayerWidget::tableHeaderClicked().

void NetworkViewer::setMaxAutoLoadConnGrpSize unsigned int  maxConnGrpSize  ) 
 

Sets the maximum size of connection group that is automatically loaded at startup.

Definition at line 773 of file NetworkViewer.cpp.

References maxAutoLoadConnGrpSize.

void NetworkViewer::setNetworkViewerProperties QWidget *  nwViewerProps  ) 
 

Sets the network viewer properties to enable communication.

Definition at line 779 of file NetworkViewer.cpp.

References networkViewerProperties.

Referenced by SpikeStreamMainWindow::SpikeStreamMainWindow().

void NetworkViewer::setNeuronConnectionMode bool  neurConnMode,
unsigned int  firstNeurGrpID,
bool  betweenMode,
unsigned int  secondNeurGrpID
 

Switches on and off whether the connections to a single neuron are displayed Also controls whether all connections to that neuron are displayed or only the connections within a particular connection group. 0 indicates that all connections are to be displayed.

Definition at line 787 of file NetworkViewer.cpp.

References dbInterface, firstSingleNeurGrpID, firstSingleNeuronGroupWidth, firstSingleNeuronID, maxFirstSingleNeuronID, maxSecondSingleNeuronID, minFirstSingleNeuronID, minSecondSingleNeuronID, networkViewerProperties, neuronConnectionMode, secondSingleNeurGrpID, secondSingleNeuronGroupWidth, secondSingleNeuronID, showBetweenConnections, and viewStateChanged.

Referenced by NetworkViewerProperties::filterCombosChanged(), NetworkViewerProperties::firstNeuronComboChanged(), NetworkViewerProperties::reloadNeuronGroups(), NetworkViewerProperties::secondNeuronComboChanged(), and NetworkViewerProperties::showConnectionsChanged().

void NetworkViewer::setNeuronFilterMode bool  mode,
char  minW,
char  maxW,
bool  showFrom,
bool  showTo,
bool  updateDisplay
 

Controls which connections are visible during single neuron connection mode.

Definition at line 895 of file NetworkViewer.cpp.

References maxWeight, minWeight, neuronFilterMode, showFromConnections, showToConnections, and viewStateChanged.

Referenced by NetworkViewerProperties::filterCombosChanged().

void NetworkViewer::setRenderDelay double  renderDelay_sec  ) 
 

Sets the delay between the last key press and the start of the full render.

Definition at line 927 of file NetworkViewer.cpp.

References renderDelay_ms.

Referenced by NetworkViewerProperties::renderDelayChanged().

void NetworkViewer::setRenderProgressBar QProgressBar *  progBar  ) 
 

Store a reference to the progress bar to display rendering progress.

Definition at line 933 of file NetworkViewer.cpp.

References renderProgressBar.

Referenced by NetworkViewerProperties::NetworkViewerProperties().

void NetworkViewer::showConnections bool  sc  ) 
 

Switches connection drawing mode on or off.

Definition at line 939 of file NetworkViewer.cpp.

References drawConnections, and viewStateChanged.

Referenced by NetworkViewerProperties::connCheckBoxChanged().

void NetworkViewer::viewClippingVolume_Horizontal ClippingVolume  clipVolume  )  [private]
 

Sets the view so that the perspective fits the clipping volume seen horizontally.

Definition at line 2318 of file NetworkViewer.cpp.

References cameraMatrix, gltDegToRad, initialiseCameraParameters(), ClippingVolume::maxX, ClippingVolume::maxZ, ClippingVolume::minX, ClippingVolume::minZ, and perspective_angle.

Referenced by loadAllNeuronGroups(), resetView(), and zoomToLayer().

void NetworkViewer::viewClippingVolume_Vertical ClippingVolume  clipVolume  )  [private]
 

Sets the view so that the perspective fits the clipping volume seen horizontally.

Definition at line 2348 of file NetworkViewer.cpp.

References cameraMatrix, gltDegToRad, initialiseCameraParameters(), ClippingVolume::maxX, ClippingVolume::maxY, ClippingVolume::maxZ, ClippingVolume::minX, ClippingVolume::minY, and perspective_angle.

Referenced by zoomAboveLayer().

void NetworkViewer::zoomAboveLayer unsigned int  layerID  ) 
 

Moves viewing position above selected layer and resizes it appropriately Don't need to set viewStateChanged here since the viewing angle is outside of the main list.

Definition at line 953 of file NetworkViewer.cpp.

References NeuronGroupHolder::clippingVolume, defaultClippingVol, neuronGrpMap, and viewClippingVolume_Vertical().

Referenced by LayerWidget::tableClicked().

void NetworkViewer::zoomToLayer unsigned int  layerID  ) 
 

Moves viewing position beside selected layer and resizes it appropriately Don't need to set viewStateChanged here since the viewing angle is outside of the main list.

Definition at line 967 of file NetworkViewer.cpp.

References NeuronGroupHolder::clippingVolume, defaultClippingVol, neuronGrpMap, and viewClippingVolume_Horizontal().

Referenced by LayerWidget::tableClicked().


Member Data Documentation

GLfloat NetworkViewer::cameraMatrix[16] [private]
 

CameraMatrix holds the location and coordinate system of the camera.

Definition at line 155 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), initialiseCameraParameters(), paintGL(), rotateXAxis(), rotateZAxis(), viewClippingVolume_Horizontal(), and viewClippingVolume_Vertical().

bool NetworkViewer::cancelRender [private]
 

Cancels render.

Definition at line 202 of file NetworkViewer.h.

Referenced by cancelRenderProgress(), and paintGL().

map<unsigned int, ConnectionGroupHolder*> NetworkViewer::connectionGrpMap [private]
 

Store the details about the connections for drawing using OpenGL.

Definition at line 223 of file NetworkViewer.h.

Referenced by deleteAllConnectionGroups(), deleteConnectionGroup(), loadConnectionGroup(), paintGL(), setConnectionView(), and ~NetworkViewer().

vector<unsigned int> NetworkViewer::connectionViewVector [private]
 

Vectors of the IDs of the visible connection groups.

Definition at line 229 of file NetworkViewer.h.

Referenced by deleteAllConnectionGroups(), deleteConnectionGroup(), getConnectionViewVector(), paintGL(), and setConnectionView().

DBInterface* NetworkViewer::dbInterface [private]
 

Reference to database handling class.

Definition at line 137 of file NetworkViewer.h.

Referenced by deleteNeuronGroup(), loadAllConnectionGroups(), loadAllNeuronGroups(), loadConnectionGroup(), loadDefaultClippingVolume(), loadNeuronGroup(), NetworkViewer(), and setNeuronConnectionMode().

ClippingVolume NetworkViewer::defaultClippingVol [private]
 

Default view in which all neuron groups should be visible.

Definition at line 161 of file NetworkViewer.h.

Referenced by drawAxes(), loadAllNeuronGroups(), loadDefaultClippingVolume(), resetView(), zoomAboveLayer(), and zoomToLayer().

bool NetworkViewer::drawConnections [private]
 

In draw connections mode the connections are drawn.

Definition at line 211 of file NetworkViewer.h.

Referenced by NetworkViewer(), paintGL(), and showConnections().

unsigned int NetworkViewer::firstSingleNeurGrpID [private]
 

Definition at line 244 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), and setNeuronConnectionMode().

unsigned int NetworkViewer::firstSingleNeuronGroupWidth [private]
 

Definition at line 240 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), NetworkViewer(), and setNeuronConnectionMode().

unsigned int NetworkViewer::firstSingleNeuronID [private]
 

The neuron that is normally displayed in single neuron mode.

Definition at line 232 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), NetworkViewer(), paintGL(), and setNeuronConnectionMode().

unsigned int* NetworkViewer::fromNeuronIDPtr [private]
 

Definition at line 185 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

map<unsigned int, bool> NetworkViewer::fromNeuronMap [private]
 

Stores which neurons are connected to the single neuron in from filter mode.

Definition at line 263 of file NetworkViewer.h.

Referenced by paintGL().

float* NetworkViewer::fromXPtr [private]
 

Definition at line 178 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

float* NetworkViewer::fromYPtr [private]
 

Definition at line 179 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

float* NetworkViewer::fromZPtr [private]
 

Definition at line 180 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

bool NetworkViewer::fullRender [private]
 

Determines whether we perform a full render or just vertices.

Definition at line 193 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), disableFullRender(), NetworkViewer(), paintGL(), and setFullRender().

bool NetworkViewer::fullRenderMode [private]
 

In full render mode, the network viewer sets full render to true after render delay When full render is true the full render is displayed.

Definition at line 190 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), initializeGL(), NetworkViewer(), setFullRender(), and setFullRenderMode().

HighlightColorMap NetworkViewer::highlightColorMap [private]
 

Stores all of the colors so that they can be deleted. Several neurons may point to the same colour so need to track the colours separately.

Definition at line 168 of file NetworkViewer.h.

Referenced by addHighlight(), and clearHighlights().

bool NetworkViewer::highlightMode [private]
 

Reduces checking of highlight map. Set to true when highlighting is enabled.

Definition at line 171 of file NetworkViewer.h.

Referenced by addHighlight(), clearHighlights(), NetworkViewer(), and paintGL().

HighlightNeuronMap NetworkViewer::highlightNeuronMap [private]
 

Map holding neurons that are to be highlighted and their highlight color.

Definition at line 164 of file NetworkViewer.h.

Referenced by addHighlight(), clearHighlights(), NetworkViewer(), and paintGL().

QAccel* NetworkViewer::keyboardAccelerator [private]
 

Links keys to changes in graphics, perspective etc..

Definition at line 124 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), and NetworkViewer().

vector<unsigned int> NetworkViewer::layerViewVector [private]
 

Vectors of the IDs of the visible neuron groups.

Definition at line 226 of file NetworkViewer.h.

Referenced by deleteAllNeuronGroups(), deleteNeuronGroup(), loadNeuronGroup(), paintGL(), and setLayerView().

QProgressDialog* NetworkViewer::loadProgressDialog [private]
 

Displays the progress as the neuron and connection groups are loaded.

Definition at line 208 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), loadNeuronGroup(), and NetworkViewer().

GLuint NetworkViewer::mainDisplayList [private]
 

Reference to the display list for the graphics. This stores OpenGL commands, which can then be played back as a block.

Definition at line 278 of file NetworkViewer.h.

Referenced by initializeGL(), and paintGL().

unsigned int NetworkViewer::maxAutoLoadConnGrpSize [private]
 

Maximum sizew of connection group that is automatically loaded. Groups bigger than this only when they are set visible. Set in spikestream.config.

Definition at line 270 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), NetworkViewer(), and setMaxAutoLoadConnGrpSize().

unsigned int NetworkViewer::maxFirstSingleNeuronID [private]
 

Definition at line 238 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), NetworkViewer(), and setNeuronConnectionMode().

unsigned int NetworkViewer::maxSecondSingleNeuronID [private]
 

Definition at line 241 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), NetworkViewer(), and setNeuronConnectionMode().

char NetworkViewer::maxWeight [private]
 

Used for filtering weights in single neuron mode.

Definition at line 248 of file NetworkViewer.h.

Referenced by NetworkViewer(), and setNeuronFilterMode().

unsigned int NetworkViewer::minFirstSingleNeuronID [private]
 

Definition at line 239 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), NetworkViewer(), and setNeuronConnectionMode().

unsigned int NetworkViewer::minSecondSingleNeuronID [private]
 

Definition at line 242 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), NetworkViewer(), and setNeuronConnectionMode().

char NetworkViewer::minWeight [private]
 

Used for filtering weights in single neuron mode.

Definition at line 251 of file NetworkViewer.h.

Referenced by NetworkViewer(), paintGL(), and setNeuronFilterMode().

QWidget* NetworkViewer::networkViewerProperties [private]
 

Hold a reference to the network viewer properties to enable the neuron number to be updated. Because of tricky stuff with headers, this is stored as a reference to Widget, not the class itself which is then cast as network viewer properties at run time.

Definition at line 131 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), paintGL(), setConnectionView(), setNetworkViewerProperties(), and setNeuronConnectionMode().

bool NetworkViewer::neuronConnectionMode [private]
 

In neuron connection mode, the connections to a single neuron are shown When neuron filter mode is on, these connections are filtered according to various criteria.

Definition at line 216 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), NetworkViewer(), paintGL(), and setNeuronConnectionMode().

bool NetworkViewer::neuronFilterMode [private]
 

Definition at line 217 of file NetworkViewer.h.

Referenced by NetworkViewer(), paintGL(), and setNeuronFilterMode().

map<unsigned int, NeuronGroupHolder*> NetworkViewer::neuronGrpMap [private]
 

Store the details about the neurons for drawing using OpenGL.

Definition at line 220 of file NetworkViewer.h.

Referenced by deleteAllNeuronGroups(), deleteNeuronGroup(), loadConnectionGroup(), loadNeuronGroup(), paintGL(), zoomAboveLayer(), zoomToLayer(), and ~NetworkViewer().

unsigned int* NetworkViewer::neuronIDPtr [private]
 

Definition at line 177 of file NetworkViewer.h.

Referenced by loadNeuronGroup(), and paintGL().

int NetworkViewer::newTempScreenHeight [private]
 

Definition at line 296 of file NetworkViewer.h.

Referenced by paintGL(), and resizeGL().

int NetworkViewer::newTempScreenWidth [private]
 

Definition at line 295 of file NetworkViewer.h.

Referenced by paintGL(), and resizeGL().

bool NetworkViewer::paintingGL [private]
 

Records when the rendering is taking place so that accelerator keys do not change the settings mid render

Definition at line 282 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), NetworkViewer(), paintGL(), and resizeGL().

bool NetworkViewer::paintSkipped [private]
 

During full render, do not want to start render or resize, so record whether paintGL() or resizeGL() have been called and then call them again at the end of the render. newTempScreen width and height are the latest values of the screen width and height if resizeGL() has been called.

Definition at line 294 of file NetworkViewer.h.

Referenced by paintGL().

GLfloat NetworkViewer::perspective_angle [private]
 

Angle in DEGREES for OpenGL perspective. Controls how much of scene is clipped.

Definition at line 140 of file NetworkViewer.h.

Referenced by NetworkViewer(), resizeGL(), viewClippingVolume_Horizontal(), and viewClippingVolume_Vertical().

GLfloat NetworkViewer::perspective_far [private]
 

For OpenGL perspective. Controls how much of scene is clipped.

Definition at line 146 of file NetworkViewer.h.

Referenced by NetworkViewer(), and resizeGL().

GLfloat NetworkViewer::perspective_near [private]
 

For OpenGL perspective. Controls how much of scene is clipped.

Definition at line 143 of file NetworkViewer.h.

Referenced by NetworkViewer(), and resizeGL().

int NetworkViewer::renderDelay_ms [private]
 

Delay between the last keystroke and start of full render in full render mode.

Definition at line 196 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), NetworkViewer(), setFullRenderMode(), and setRenderDelay().

QProgressBar* NetworkViewer::renderProgressBar [private]
 

Reference to the progress bar in the network viewer properties.

Definition at line 205 of file NetworkViewer.h.

Referenced by initializeGL(), paintGL(), and setRenderProgressBar().

QTimer* NetworkViewer::renderTimer [private]
 

Timer to start full render after the delay.

Definition at line 199 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), NetworkViewer(), and setFullRenderMode().

bool NetworkViewer::resizeSkipped [private]
 

During full render, do not want to start render or resize, so record whether paintGL() or resizeGL() have been called and then call them again at the end of the render. newTempScreen width and height are the latest values of the screen width and height if resizeGL() has been called.

Definition at line 288 of file NetworkViewer.h.

Referenced by paintGL(), and resizeGL().

GLfloat NetworkViewer::rotationMatrix[16] [private]
 

Used for rotating camera matrix.

Definition at line 158 of file NetworkViewer.h.

Referenced by fillRotationMatrix().

GLfloat NetworkViewer::sceneRotateX [private]
 

Amount that scene is rotated around X axis.

Definition at line 149 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), initialiseCameraParameters(), and paintGL().

GLfloat NetworkViewer::sceneRotateZ [private]
 

Amount that scene is rotated around Z axis.

Definition at line 152 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), initialiseCameraParameters(), and paintGL().

unsigned int NetworkViewer::secondSingleNeurGrpID [private]
 

Definition at line 245 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), and setNeuronConnectionMode().

unsigned int NetworkViewer::secondSingleNeuronGroupWidth [private]
 

Definition at line 243 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), deleteAllNeuronGroups(), deleteNeuronGroup(), NetworkViewer(), and setNeuronConnectionMode().

unsigned int NetworkViewer::secondSingleNeuronID [private]
 

In between mode, the connections between the firstSingle neuron and the second single neuron are displayed.

Definition at line 235 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), NetworkViewer(), paintGL(), and setNeuronConnectionMode().

bool NetworkViewer::showBetweenConnections [private]
 

Shows connections between two highlighted neurons.

Definition at line 260 of file NetworkViewer.h.

Referenced by deleteAllNeuronGroups(), deleteNeuronGroup(), NetworkViewer(), paintGL(), and setNeuronConnectionMode().

bool NetworkViewer::showFromConnections [private]
 

Show from connections in single neuron mode.

Definition at line 254 of file NetworkViewer.h.

Referenced by NetworkViewer(), paintGL(), and setNeuronFilterMode().

bool NetworkViewer::showToConnections [private]
 

Show to connections in single neuron mode.

Definition at line 257 of file NetworkViewer.h.

Referenced by NetworkViewer(), paintGL(), and setNeuronFilterMode().

SpikeStreamApplication* NetworkViewer::spikeStrApp [private]
 

Short version of reference to main QApplication

Definition at line 134 of file NetworkViewer.h.

Referenced by NetworkViewer(), and paintGL().

unsigned int* NetworkViewer::toNeuronIDPtr [private]
 

Definition at line 186 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

map<unsigned int, bool> NetworkViewer::toNeuronMap [private]
 

Stores which neurons are connected to the single neuron in to filter mode.

Definition at line 266 of file NetworkViewer.h.

Referenced by paintGL().

float* NetworkViewer::toXPtr [private]
 

Definition at line 181 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

float* NetworkViewer::toYPtr [private]
 

Definition at line 182 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

float* NetworkViewer::toZPtr [private]
 

Definition at line 183 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

bool NetworkViewer::viewStateChanged [private]
 

When this is true a new display list is created. Otherwise the existing display list is used to draw the graphics.

Definition at line 274 of file NetworkViewer.h.

Referenced by acceleratorKeyPressed(), addHighlight(), clearHighlights(), deleteConnectionGroup(), deleteNeuronGroup(), disableFullRender(), loadConnectionGroup(), loadNeuronGroup(), NetworkViewer(), paintGL(), reloadEverything(), setConnectionView(), setFullRender(), setFullRenderMode(), setLayerView(), setNeuronConnectionMode(), setNeuronFilterMode(), and showConnections().

char* NetworkViewer::weightPtr [private]
 

Definition at line 184 of file NetworkViewer.h.

Referenced by loadConnectionGroup(), and paintGL().

float* NetworkViewer::xPosPtr [private]
 

Definition at line 174 of file NetworkViewer.h.

Referenced by loadNeuronGroup(), and paintGL().

float* NetworkViewer::yPosPtr [private]
 

Definition at line 175 of file NetworkViewer.h.

Referenced by loadNeuronGroup(), and paintGL().

float* NetworkViewer::zPosPtr [private]
 

Definition at line 176 of file NetworkViewer.h.

Referenced by loadNeuronGroup(), and paintGL().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:29:05 2007 for SpikeStream Application by  doxygen 1.4.4