#include <neuroscopedoc.h>
Collaboration diagram for NeuroscopeDoc:
Public Types | |
enum | OpenSaveCreateReturnMessage { OK = 0, OPEN_ERROR = 1, DOWNLOAD_ERROR = 3, INCORRECT_FILE = 4, SAVE_ERROR = 5, UPLOAD_ERROR = 6, INCORRECT_CONTENT = 7, CREATION_ERROR = 8, PARSE_ERROR = 9, MISSING_FILE = 10, ALREADY_OPENED = 11, NOT_WRITABLE = 12, OK = 0, OPEN_ERROR = 1, DOWNLOAD_ERROR = 3, INCORRECT_FILE = 4, SAVE_ERROR = 5, UPLOAD_ERROR = 6, INCORRECT_CONTENT = 7, CREATION_ERROR = 8, PARSE_ERROR = 9, MISSING_FILE = 10, ALREADY_OPENED = 11, NOT_WRITABLE = 12 } |
Information retun after a call to openFile/saveDocument/createFeatureFile. | |
enum | OpenSaveCreateReturnMessage { OK = 0, OPEN_ERROR = 1, DOWNLOAD_ERROR = 3, INCORRECT_FILE = 4, SAVE_ERROR = 5, UPLOAD_ERROR = 6, INCORRECT_CONTENT = 7, CREATION_ERROR = 8, PARSE_ERROR = 9, MISSING_FILE = 10, ALREADY_OPENED = 11, NOT_WRITABLE = 12, OK = 0, OPEN_ERROR = 1, DOWNLOAD_ERROR = 3, INCORRECT_FILE = 4, SAVE_ERROR = 5, UPLOAD_ERROR = 6, INCORRECT_CONTENT = 7, CREATION_ERROR = 8, PARSE_ERROR = 9, MISSING_FILE = 10, ALREADY_OPENED = 11, NOT_WRITABLE = 12 } |
Information retun after a call to openFile/saveDocument/createFeatureFile. | |
Public Slots | |
void | slotNewEventDescriptionCreated (QString providerName, QMap< int, int > oldNewEventIds, QMap< int, int > newOldEventIds, QString eventDescriptionAdded) |
Updates the event palette and the views after the creation of a new event description. | |
void | slotEventDescriptionRemoved (QString providerName, QMap< int, int > oldNewEventIds, QMap< int, int > newOldEventIds, int eventIdToRemove, QString eventDescriptionToRemove) |
Updates the event palette and the views after the suppression of an event description. | |
void | slotNewEventDescriptionCreated (QString providerName, QMap< int, int > oldNewEventIds, QMap< int, int > newOldEventIds, QString eventDescriptionAdded) |
Updates the event palette and the views after the creation of a new event description. | |
void | slotEventDescriptionRemoved (QString providerName, QMap< int, int > oldNewEventIds, QMap< int, int > newOldEventIds, int eventIdToRemove, QString eventDescriptionToRemove) |
Updates the event palette and the views after the suppression of an event description. | |
Signals | |
void | noSession (QMap< int, int > &channelDefaultOffsets, QMap< int, bool > &skipStatus) |
Informs the application that there is no session file available. | |
void | loadFirstDisplay (QValueList< int > *channelsToDisplay, bool verticalLines, bool raster, bool waveforms, bool showLabels, bool multipleColumns, bool greyMode, QValueList< int > offsets, QValueList< int > channelGains, QValueList< int > selectedChannels, QMap< int, bool > &skipStatus, long startTime, long duration, QString tabLabel, bool positionView, int rasterHeight, bool showEventsInPositionView) |
Informs the application that there the first display to create will show the channels contained in channelsToDisplay . | |
void | noSession (QMap< int, int > &channelDefaultOffsets, QMap< int, bool > &skipStatus) |
Informs the application that there is no session file available. | |
void | loadFirstDisplay (QValueList< int > *channelsToDisplay, bool verticalLines, bool raster, bool waveforms, bool showLabels, bool multipleColumns, bool greyMode, QValueList< int > offsets, QValueList< int > channelGains, QValueList< int > selectedChannels, QMap< int, bool > &skipStatus, long startTime, long duration, QString tabLabel, bool positionView, int rasterHeight, bool showEventsInPositionView) |
Informs the application that there the first display to create will show the channels contained in channelsToDisplay . | |
Public Member Functions | |
NeuroscopeDoc (QWidget *parent, ChannelPalette &displayChannelPalette, ChannelPalette &spikeChannelPalette, int channelNbDefault, double datSamplingRateDefault, double eegSamplingRateDefault, int initialOffset, int voltageRangeDefault, int amplificationDefault, float screenGainDefault, int resolutionDefault, int eventPosition, int clusterPosition, int nbSamples, int peakSampleIndex, double videoSamplingRate, int width, int height, QString backgroundImage, QString traceBackgroundImage, int rotation, int flip, bool positionsBackground) | |
Constructs a document. | |
~NeuroscopeDoc () | |
Destructor for the fileclass of the application. | |
void | addView (NeuroscopeView *view) |
Adds a view to the document which represents the document contents. | |
void | removeView (NeuroscopeView *view) |
Removes a view from the list of currently connected views. | |
void | closeDocument () |
Closes the actual document. | |
int | openDocument (const KURL &url) |
Opens the document by filename. | |
OpenSaveCreateReturnMessage | saveSession () |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events. | |
int | saveEventFiles () |
Saves the event files. | |
OpenSaveCreateReturnMessage | saveSession (KURL newSessionUrl) |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events. | |
OpenSaveCreateReturnMessage | createEventFile (KURL eventUrl, NeuroscopeView *activeView) |
Creates a new event file. | |
const KURL & | url () const |
Returns the KURL of the document. | |
void | setURL (const KURL &url) |
Sets the URL of the document. | |
void | singleChannelColorUpdate (int channelId, NeuroscopeView *activeView) |
Changes the color of a channel. | |
void | clusterColorUpdate (QString providerName, int clusterId, NeuroscopeView *activeView) |
Changes the color of a cluster. | |
void | eventColorUpdate (QString providerName, int eventId, NeuroscopeView *activeView) |
Changes the color of a event. | |
void | channelGroupColorUpdate (int groupId, NeuroscopeView *activeView) |
Changes the color of a group of channels. | |
void | groupsModified (NeuroscopeView *activeView) |
Triggers the update of the displays due to a change in the display groups. | |
void | setBackgroundColor (QColor backgroundColor) |
Updates the background color used in the views. | |
void | setTraceBackgroundImage (QString traceBackgroundImagePath) |
Updates the background image used in the trace views. | |
void | setInitialOffset (int offset) |
Sets the initial offset for all the traces for the current document. | |
void | setGains (int voltageRange, int amplification, float screenGain) |
Sets the various gains. | |
void | setResolution (int resolution) |
Sets the resolution of the acquisition system of the current document. | |
void | setSamplingRate (double rate) |
Sets the sampling rate for the current document. | |
void | setAcquisitionSystemSamplingRate (double rate) |
Sets the acquisition system sampling rate. | |
void | setChannelNb (int nb) |
Sets the number of channels for the current document. | |
int | getInitialOffset () const |
Gets the initial offset for all the traces for the current document. | |
int | getAcquisitionGain () const |
Gets the acquisition system gains. | |
int | getGain () const |
Gets the current gain based on the screen gain and the acquisition system gain. | |
int | getVoltageRange () const |
Gets the voltage range of the acquisition system in volts for the current document. | |
int | getAmplification () const |
Gets the amplification of the acquisition system for the current document. | |
float | getScreenGain () const |
Gets the screen gain in milivolts by centimeters used to display the field potentiels for the current document. | |
int | getResolution () const |
Gets the resolution of the acquisition system for the current document. | |
double | getSamplingRate () const |
Gets the sampling rate for the current document. | |
double | getAcquisitionSystemSamplingRate () const |
Gets the acquisition system sampling rate. | |
bool | getPositionsBackground () const |
All the positions contained in a position file can be used to create a background image for the PositionView. | |
void | setDefaultGains (int voltageRangeDefault, int amplificationDefault, float screenGainDefault) |
Sets the various default gains. | |
void | setVoltageRange (int range) |
Sets the voltage range of the acquisition system in volts for the current document. | |
void | setAmplification (int amplification) |
Sets the amplification of the acquisition system for the current document. | |
void | setScreenGain (float gain) |
Sets the screen gain in milivolts by centimeters used to display the field potentiels for the current document. | |
void | setDefaultInitialOffset (int offset) |
Sets the default initial offset for all the traces. | |
void | setDefaultResolution (int resolution) |
Sets the default resolution of the acquisition system. | |
void | setDefaultEegSamplingRate (double rate) |
Sets the default sampling rate of the EEG file. | |
void | setDefaultDatSamplingRate (double rate) |
Sets the default sampling rate of the dat file. | |
void | setDefaultChannelNb (int nb) |
Sets the default number of channels. | |
void | setDefaultTraceBackgroundImage (QString traceBackgroundImagePath) |
Sets the default background image for the trace view. | |
void | propertiesFromCommandLine () |
Sets that some of the properties of the current document were provided on the command line. | |
ChannelColors * | channelColors () const |
Returns a pointer on the list of ItemColor objects used to represent the channel colors. | |
TracesProvider & | tracesDataProvider () const |
Returns a reference on the DataProvider containing the information on the traces (TracesProvider). | |
QMap< int, int > * | getDisplayChannelsGroups () |
Returns a reference on the Map given the correspondance between the channel ids and the display group ids. | |
QMap< int, QValueList< int > > * | getDisplayGroupsChannels () |
Returns a reference on the map given th correspondance between the display group ids and the channel ids. | |
QMap< int, int > * | getChannelsSpikeGroups () |
Returns a reference on the Map given the correspondance between the channel ids and the spike group ids. | |
QMap< int, QValueList< int > > * | getSpikeGroupsChannels () |
Returns a reference on the map given th correspondance between the spike group ids and the channel ids. | |
void | selectAllChannels (NeuroscopeView &activeView, bool editMode) |
Selects all the channels and shows them if the edit mode is not selected. | |
void | deselectAllChannels (NeuroscopeView &activeView, bool editMode) |
Deselects all the channels and hides them if the edit mode is not selected. | |
void | synchronize () |
The two channel palettes are synchronized. | |
void | updateFileProperties (int channelNb, double SR, int resolution, int offset, int voltageRange, int amplification, float screenGain, int newNbSamples, int newPeakSampleIndex, double videoSamplingRate, int width, int height, QString backgroundImage, QString traceBackgroundImage, int rotation, int flip, double acquisitionSystemSamplingRate, bool positionsBackground) |
Updates the properties for the current file (number of channels, sampling rate of the dat file and eeg file). | |
bool | isCurrentFileAdatFile () |
Returns true if the current opened file is a dat file (intial recorded file), false otherwise. | |
QString | documentBaseName () |
Returns the base name of the document (common name for all the files). | |
QString | sessionPath () const |
Returns the session file path. | |
long long | recordingLength () |
Returns the total length of the document in seconds. | |
bool | isADocumentToClose () |
Tells if there is opened document to be closed. | |
void | setNoneEditMode (NeuroscopeView *activeView) |
Informs the displays that the mode hase switch from edit to none edit. | |
bool | canCloseDocument (NeuroscopeApp *mainWindow, QString callingMethod) |
Verifies if the document can be close. | |
void | showCalibration (bool show, NeuroscopeView *activeView) |
Shows or hides the calibration bar. | |
QString | lastLoadedProviderName () |
Returns the name used to identified the last loaded provider. | |
ItemColors * | providerColorList (QString fileName) |
Returns the item color list for the given provider. | |
OpenSaveCreateReturnMessage | loadClusterFile (KURL clusterUrl, NeuroscopeView *activeView) |
Loads the cluster file identified by clusterUrl . | |
OpenSaveCreateReturnMessage | loadClusterFile (KURL clusterUrl, QMap< EventDescription, QColor > &itemColors, QDateTime lastModified, bool firstFile) |
Loads the cluster file store in the session file and identified by clusterUrl . | |
OpenSaveCreateReturnMessage | loadPositionFile (KURL url, NeuroscopeView *activeView) |
Loads the position file and creates the position view in the current display. | |
OpenSaveCreateReturnMessage | loadPositionFile (QString filePath) |
Loads the position file. | |
void | removeClusterFile (QString providerName, NeuroscopeView *activeView) |
Removes the cluster provider corresponding to the identifier providerName from the list of providers. | |
OpenSaveCreateReturnMessage | loadEventFile (KURL eventUrl, NeuroscopeView *activeView) |
Loads the event file identified by eventUrl . | |
OpenSaveCreateReturnMessage | loadEventFile (KURL eventUrl, QMap< EventDescription, QColor > &itemColors, QDateTime lastModified, bool firstFile) |
Loads the event file store in the session file and identified by eventUrl . | |
void | removeEventFile (QString providerName, NeuroscopeView *activeView, bool lastFile) |
Removes the event provider corresponding to the identifier providerName from the list of providers. | |
void | setProviders (NeuroscopeView *activeView) |
Sets the data providers to the newly created view. | |
void | showAllClustersExcept (ItemPalette *clusterPalette, NeuroscopeView *activeView, QValueList< int > clustersToHide) |
Updates the selection of clusters to be shown by showing all the clusters except those contained in clustersToNotShow . | |
void | deselectAllClusters (ItemPalette *clusterPalette, NeuroscopeView *activeView) |
Updates the selection of clusters to be shown by hiding all the clusters. | |
void | showAllEvents (ItemPalette *eventPalette, NeuroscopeView *activeView) |
Updates the selection of events to be shown by showing all the events. | |
void | deselectAllEvents (ItemPalette *eventPalette, NeuroscopeView *activeView) |
Updates the selection of events to be shown by hiding all the events. | |
int | getLastEventProviderGridX () const |
Returns the value to use as the length for the event descriptions in the event palette for the the last loaded event provider. | |
void | setEventPosition (int position) |
Sets the event position in percentage from the begining of the window where the events are display when browsing. | |
void | setClusterPosition (int position) |
Sets the cluster position in percentage from the begining of the window where the clusters are display when browsing. | |
void | eventModified (QString providerName, int selectedEventId, double time, double newTime, NeuroscopeView *activeView) |
Informs that an event has been modified. | |
void | eventRemoved (QString providerName, int selectedEventId, double time, NeuroscopeView *activeView) |
Informs that an event has been removed. | |
void | undo (NeuroscopeView *activeView) |
Reverts the last user action. | |
void | redo (NeuroscopeView *activeView) |
Reverts the last undo action. | |
void | eventAdded (QString providerName, QString addedEventDescription, double time, NeuroscopeView *activeView) |
Informs that an event has been added. | |
QValueList< EventDescription > | eventIds (QString providerName) |
Returns the list of existing event descriptions contained in the currently selected event file. | |
void | setWaveformInformation (int nb, int index, NeuroscopeView *activeView) |
Sets the information used to display spike waveforms. | |
void | setDefaultWaveformInformation (int nb, int index) |
Sets the default information used to display spike waveforms. | |
int | getNbSamples () const |
Returns the number of samples per spike waveform. | |
int | getPeakIndex () const |
Returns the index of the peak sample in the spike waveform. | |
void | setPositionInformation (double videoSamplingRate, int width, int height, QString backgroundImage, int rotation, int flip, bool positionsBackground, NeuroscopeView *activeView) |
Sets the information used to display the animal position. | |
void | setDefaultPositionInformation (double videoSamplingRate, int width, int height, QString backgroundImage, int rotation, int flip, bool positionsBackground) |
Sets the default information used to display the animal position. | |
double | getVideoSamplingRate () const |
Gets the video sampling rate. | |
int | getChannelNb () const |
Gets the number of channels for the current document. | |
int | getWidth () const |
Returns the video image width. | |
int | getHeight () const |
Returns the video image height. | |
QString | getBackgroundImage () const |
Returns the background image for the PositionView. | |
QString | getTraceBackgroundImage () const |
Returns the background image for the TraceView. | |
int | getRotation () const |
Returns the video image rotation angle. | |
int | getFlip () const |
Returns the video image flip orientation. | |
void | removePositionFile (NeuroscopeView *activeView) |
Removes the positon provider corresponding to the position file from the list of providers. | |
void | addPositionView (NeuroscopeView *activeView, QColor backgroundColor) |
Adds a PositionView in the current display. | |
CloseDocumentEvent * | getCloseDocumentEvent (QString origin) |
QImage | getWhiteTrajectoryBackground () |
Gets a background image containing the animal trajectory on a white background. | |
void | updateSkippedChannelColors (bool whiteBackground, QColor backgroundColor) |
Updates the color of the skipped channels to either white or background color. | |
void | updateSkipStatus () |
Informs the views that the list of skipped channel has changed. | |
void | setDefaultOffsets (NeuroscopeView *activeView) |
void | resetDefaultOffsets () |
Resets the channel default offsets to zero. | |
const QMap< int, int > & | getChannelDefaultOffsets () const |
Returns a reference on the the map given the of channels default offsets. | |
NeuroscopeDoc (QWidget *parent, ChannelPalette &displayChannelPalette, ChannelPalette &spikeChannelPalette, int channelNbDefault, double datSamplingRateDefault, double eegSamplingRateDefault, int initialOffset, int voltageRangeDefault, int amplificationDefault, float screenGainDefault, int resolutionDefault, int eventPosition, int clusterPosition, int nbSamples, int peakSampleIndex, double videoSamplingRate, int width, int height, QString backgroundImage, QString traceBackgroundImage, int rotation, int flip, bool positionsBackground) | |
Constructs a document. | |
~NeuroscopeDoc () | |
Destructor for the fileclass of the application. | |
void | addView (NeuroscopeView *view) |
Adds a view to the document which represents the document contents. | |
void | removeView (NeuroscopeView *view) |
Removes a view from the list of currently connected views. | |
void | closeDocument () |
Closes the actual document. | |
int | openDocument (const KURL &url) |
Opens the document by filename. | |
OpenSaveCreateReturnMessage | saveSession () |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events. | |
int | saveEventFiles () |
Saves the event files. | |
OpenSaveCreateReturnMessage | saveSession (KURL newSessionUrl) |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events. | |
OpenSaveCreateReturnMessage | createEventFile (KURL eventUrl, NeuroscopeView *activeView) |
Creates a new event file. | |
const KURL & | url () const |
Returns the KURL of the document. | |
void | setURL (const KURL &url) |
Sets the URL of the document. | |
void | singleChannelColorUpdate (int channelId, NeuroscopeView *activeView) |
Changes the color of a channel. | |
void | clusterColorUpdate (QString providerName, int clusterId, NeuroscopeView *activeView) |
Changes the color of a cluster. | |
void | eventColorUpdate (QString providerName, int eventId, NeuroscopeView *activeView) |
Changes the color of a event. | |
void | channelGroupColorUpdate (int groupId, NeuroscopeView *activeView) |
Changes the color of a group of channels. | |
void | groupsModified (NeuroscopeView *activeView) |
Triggers the update of the displays due to a change in the display groups. | |
void | setBackgroundColor (QColor backgroundColor) |
Updates the background color used in the views. | |
void | setTraceBackgroundImage (QString traceBackgroundImagePath) |
Updates the background image used in the trace views. | |
void | setInitialOffset (int offset) |
Sets the initial offset for all the traces for the current document. | |
void | setGains (int voltageRange, int amplification, float screenGain) |
Sets the various gains. | |
void | setResolution (int resolution) |
Sets the resolution of the acquisition system of the current document. | |
void | setSamplingRate (double rate) |
Sets the sampling rate for the current document. | |
void | setAcquisitionSystemSamplingRate (double rate) |
Sets the acquisition system sampling rate. | |
void | setChannelNb (int nb) |
Sets the number of channels for the current document. | |
int | getInitialOffset () const |
Gets the initial offset for all the traces for the current document. | |
int | getAcquisitionGain () const |
Gets the acquisition system gains. | |
int | getGain () const |
Gets the current gain based on the screen gain and the acquisition system gain. | |
int | getVoltageRange () const |
Gets the voltage range of the acquisition system in volts for the current document. | |
int | getAmplification () const |
Gets the amplification of the acquisition system for the current document. | |
float | getScreenGain () const |
Gets the screen gain in milivolts by centimeters used to display the field potentiels for the current document. | |
int | getResolution () const |
Gets the resolution of the acquisition system for the current document. | |
double | getSamplingRate () const |
Gets the sampling rate for the current document. | |
double | getAcquisitionSystemSamplingRate () const |
Gets the acquisition system sampling rate. | |
bool | getPositionsBackground () const |
All the positions contained in a position file can be used to create a background image for the PositionView. | |
void | setDefaultGains (int voltageRangeDefault, int amplificationDefault, float screenGainDefault) |
Sets the various default gains. | |
void | setVoltageRange (int range) |
Sets the voltage range of the acquisition system in volts for the current document. | |
void | setAmplification (int amplification) |
Sets the amplification of the acquisition system for the current document. | |
void | setScreenGain (float gain) |
Sets the screen gain in milivolts by centimeters used to display the field potentiels for the current document. | |
void | setDefaultInitialOffset (int offset) |
Sets the default initial offset for all the traces. | |
void | setDefaultResolution (int resolution) |
Sets the default resolution of the acquisition system. | |
void | setDefaultEegSamplingRate (double rate) |
Sets the default sampling rate of the EEG file. | |
void | setDefaultDatSamplingRate (double rate) |
Sets the default sampling rate of the dat file. | |
void | setDefaultChannelNb (int nb) |
Sets the default number of channels. | |
void | setDefaultTraceBackgroundImage (QString traceBackgroundImagePath) |
Sets the default background image for the trace view. | |
void | propertiesFromCommandLine () |
Sets that some of the properties of the current document were provided on the command line. | |
ChannelColors * | channelColors () const |
Returns a pointer on the list of ItemColor objects used to represent the channel colors. | |
TracesProvider & | tracesDataProvider () const |
Returns a reference on the DataProvider containing the information on the traces (TracesProvider). | |
QMap< int, int > * | getDisplayChannelsGroups () |
Returns a reference on the Map given the correspondance between the channel ids and the display group ids. | |
QMap< int, QValueList< int > > * | getDisplayGroupsChannels () |
Returns a reference on the map given th correspondance between the display group ids and the channel ids. | |
QMap< int, int > * | getChannelsSpikeGroups () |
Returns a reference on the Map given the correspondance between the channel ids and the spike group ids. | |
QMap< int, QValueList< int > > * | getSpikeGroupsChannels () |
Returns a reference on the map given th correspondance between the spike group ids and the channel ids. | |
void | selectAllChannels (NeuroscopeView &activeView, bool editMode) |
Selects all the channels and shows them if the edit mode is not selected. | |
void | deselectAllChannels (NeuroscopeView &activeView, bool editMode) |
Deselects all the channels and hides them if the edit mode is not selected. | |
void | synchronize () |
The two channel palettes are synchronized. | |
void | updateFileProperties (int channelNb, double SR, int resolution, int offset, int voltageRange, int amplification, float screenGain, int newNbSamples, int newPeakSampleIndex, double videoSamplingRate, int width, int height, QString backgroundImage, QString traceBackgroundImage, int rotation, int flip, double acquisitionSystemSamplingRate, bool positionsBackground) |
Updates the properties for the current file (number of channels, sampling rate of the dat file and eeg file). | |
bool | isCurrentFileAdatFile () |
Returns true if the current opened file is a dat file (intial recorded file), false otherwise. | |
QString | documentBaseName () |
Returns the base name of the document (common name for all the files). | |
QString | sessionPath () const |
Returns the session file path. | |
long long | recordingLength () |
Returns the total length of the document in seconds. | |
bool | isADocumentToClose () |
Tells if there is opened document to be closed. | |
void | setNoneEditMode (NeuroscopeView *activeView) |
Informs the displays that the mode hase switch from edit to none edit. | |
bool | canCloseDocument (NeuroscopeApp *mainWindow, QString callingMethod) |
Verifies if the document can be close. | |
void | showCalibration (bool show, NeuroscopeView *activeView) |
Shows or hides the calibration bar. | |
QString | lastLoadedProviderName () |
Returns the name used to identified the last loaded provider. | |
ItemColors * | providerColorList (QString fileName) |
Returns the item color list for the given provider. | |
OpenSaveCreateReturnMessage | loadClusterFile (KURL clusterUrl, NeuroscopeView *activeView) |
Loads the cluster file identified by clusterUrl . | |
OpenSaveCreateReturnMessage | loadClusterFile (KURL clusterUrl, QMap< EventDescription, QColor > &itemColors, QDateTime lastModified, bool firstFile) |
Loads the cluster file store in the session file and identified by clusterUrl . | |
OpenSaveCreateReturnMessage | loadPositionFile (KURL url, NeuroscopeView *activeView) |
Loads the position file and creates the position view in the current display. | |
OpenSaveCreateReturnMessage | loadPositionFile (QString filePath) |
Loads the position file. | |
void | removeClusterFile (QString providerName, NeuroscopeView *activeView) |
Removes the cluster provider corresponding to the identifier providerName from the list of providers. | |
OpenSaveCreateReturnMessage | loadEventFile (KURL eventUrl, NeuroscopeView *activeView) |
Loads the event file identified by eventUrl . | |
OpenSaveCreateReturnMessage | loadEventFile (KURL eventUrl, QMap< EventDescription, QColor > &itemColors, QDateTime lastModified, bool firstFile) |
Loads the event file store in the session file and identified by eventUrl . | |
void | removeEventFile (QString providerName, NeuroscopeView *activeView, bool lastFile) |
Removes the event provider corresponding to the identifier providerName from the list of providers. | |
void | setProviders (NeuroscopeView *activeView) |
Sets the data providers to the newly created view. | |
void | showAllClustersExcept (ItemPalette *clusterPalette, NeuroscopeView *activeView, QValueList< int > clustersToHide) |
Updates the selection of clusters to be shown by showing all the clusters except those contained in clustersToNotShow . | |
void | deselectAllClusters (ItemPalette *clusterPalette, NeuroscopeView *activeView) |
Updates the selection of clusters to be shown by hiding all the clusters. | |
void | showAllEvents (ItemPalette *eventPalette, NeuroscopeView *activeView) |
Updates the selection of events to be shown by showing all the events. | |
void | deselectAllEvents (ItemPalette *eventPalette, NeuroscopeView *activeView) |
Updates the selection of events to be shown by hiding all the events. | |
int | getLastEventProviderGridX () const |
Returns the value to use as the length for the event descriptions in the event palette for the the last loaded event provider. | |
void | setEventPosition (int position) |
Sets the event position in percentage from the begining of the window where the events are display when browsing. | |
void | setClusterPosition (int position) |
Sets the cluster position in percentage from the begining of the window where the clusters are display when browsing. | |
void | eventModified (QString providerName, int selectedEventId, double time, double newTime, NeuroscopeView *activeView) |
Informs that an event has been modified. | |
void | eventRemoved (QString providerName, int selectedEventId, double time, NeuroscopeView *activeView) |
Informs that an event has been removed. | |
void | undo (NeuroscopeView *activeView) |
Reverts the last user action. | |
void | redo (NeuroscopeView *activeView) |
Reverts the last undo action. | |
void | eventAdded (QString providerName, QString addedEventDescription, double time, NeuroscopeView *activeView) |
Informs that an event has been added. | |
QValueList< EventDescription > | eventIds (QString providerName) |
Returns the list of existing event descriptions contained in the currently selected event file. | |
void | setWaveformInformation (int nb, int index, NeuroscopeView *activeView) |
Sets the information used to display spike waveforms. | |
void | setDefaultWaveformInformation (int nb, int index) |
Sets the default information used to display spike waveforms. | |
int | getNbSamples () const |
Returns the number of samples per spike waveform. | |
int | getPeakIndex () const |
Returns the index of the peak sample in the spike waveform. | |
void | setPositionInformation (double videoSamplingRate, int width, int height, QString backgroundImage, int rotation, int flip, bool positionsBackground, NeuroscopeView *activeView) |
Sets the information used to display the animal position. | |
void | setDefaultPositionInformation (double videoSamplingRate, int width, int height, QString backgroundImage, int rotation, int flip, bool positionsBackground) |
Sets the default information used to display the animal position. | |
double | getVideoSamplingRate () const |
Gets the video sampling rate. | |
int | getChannelNb () const |
Gets the number of channels for the current document. | |
int | getWidth () const |
Returns the video image width. | |
int | getHeight () const |
Returns the video image height. | |
QString | getBackgroundImage () const |
Returns the background image for the PositionView. | |
QString | getTraceBackgroundImage () const |
Returns the background image for the TraceView. | |
int | getRotation () const |
Returns the video image rotation angle. | |
int | getFlip () const |
Returns the video image flip orientation. | |
void | removePositionFile (NeuroscopeView *activeView) |
Removes the positon provider corresponding to the position file from the list of providers. | |
void | addPositionView (NeuroscopeView *activeView, QColor backgroundColor) |
Adds a PositionView in the current display. | |
CloseDocumentEvent * | getCloseDocumentEvent (QString origin) |
QImage | getWhiteTrajectoryBackground () |
Gets a background image containing the animal trajectory on a white background. | |
void | updateSkippedChannelColors (bool whiteBackground, QColor backgroundColor) |
Updates the color of the skipped channels to either white or background color. | |
void | updateSkipStatus () |
Informs the views that the list of skipped channel has changed. | |
void | setDefaultOffsets (NeuroscopeView *activeView) |
void | resetDefaultOffsets () |
Resets the channel default offsets to zero. | |
const QMap< int, int > & | getChannelDefaultOffsets () const |
Returns a reference on the the map given the of channels default offsets. | |
Public Attributes | |
QPtrList< NeuroscopeView > * | viewList |
The list of the views currently connected to the document. | |
QPtrList< NeuroscopeView > * | viewList |
The list of the views currently connected to the document. | |
Friends | |
class | CloseDocumentEvent |
Classes | |
class | CloseDocumentEvent |
Internal class use to send information to the main window to inform it that the document could not be closed has there still have thread running. More... |
Thereby, the document object is created by the NeuroscopeApp instance and contains the document structure with the according methods for manipulating the document data by NeuroscopeView objects. Also, NeuroscopeDoc contains the methods for serialization of the document data from and to files.
NeuroscopeDoc::NeuroscopeDoc | ( | QWidget * | parent, | |
ChannelPalette & | displayChannelPalette, | |||
ChannelPalette & | spikeChannelPalette, | |||
int | channelNbDefault, | |||
double | datSamplingRateDefault, | |||
double | eegSamplingRateDefault, | |||
int | initialOffset, | |||
int | voltageRangeDefault, | |||
int | amplificationDefault, | |||
float | screenGainDefault, | |||
int | resolutionDefault, | |||
int | eventPosition, | |||
int | clusterPosition, | |||
int | nbSamples, | |||
int | peakSampleIndex, | |||
double | videoSamplingRate, | |||
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
QString | traceBackgroundImage, | |||
int | rotation, | |||
int | flip, | |||
bool | positionsBackground | |||
) |
Constructs a document.
parent | the parent QWidget. | |
displayChannelPalette | a reference to the channel palette used to specify the traces display. | |
spikeChannelPalette | a reference to the channel palette used to create the spike groups. | |
channelNbDefault | default number of channels in the settings. | |
datSamplingRateDefault | default sampling rate of the dat file in the settings. | |
eegSamplingRateDefault | default sampling rate of the EEG file in the settings. | |
initialOffset | initial default offset for all the field potentials. | |
voltageRangeDefault | voltage range of the acquisition system in volts. | |
amplificationDefault | default amplification of the acquisition system. | |
screenGainDefault | default screen gain in milivolts by centimeters used to display the field potentiels | |
resolutionDefault | default resolution of the acquisition system. | |
eventPosition | represents the event position, in percentage from the begining of the window, where the events are display when browsing. | |
clusterPosition | represents the cluster position, in percentage from the begining of the window, where the clusters are display when browsing. | |
nbSamples | number of samples per spike waveform. | |
peakSampleIndex | sample index corresponding to the peak of a spike waveform. | |
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
traceBackgroundImage | image used as a background for the trace view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. |
NeuroscopeDoc::NeuroscopeDoc | ( | QWidget * | parent, | |
ChannelPalette & | displayChannelPalette, | |||
ChannelPalette & | spikeChannelPalette, | |||
int | channelNbDefault, | |||
double | datSamplingRateDefault, | |||
double | eegSamplingRateDefault, | |||
int | initialOffset, | |||
int | voltageRangeDefault, | |||
int | amplificationDefault, | |||
float | screenGainDefault, | |||
int | resolutionDefault, | |||
int | eventPosition, | |||
int | clusterPosition, | |||
int | nbSamples, | |||
int | peakSampleIndex, | |||
double | videoSamplingRate, | |||
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
QString | traceBackgroundImage, | |||
int | rotation, | |||
int | flip, | |||
bool | positionsBackground | |||
) |
Constructs a document.
parent | the parent QWidget. | |
displayChannelPalette | a reference to the channel palette used to specify the traces display. | |
spikeChannelPalette | a reference to the channel palette used to create the spike groups. | |
channelNbDefault | default number of channels in the settings. | |
datSamplingRateDefault | default sampling rate of the dat file in the settings. | |
eegSamplingRateDefault | default sampling rate of the EEG file in the settings. | |
initialOffset | initial default offset for all the field potentials. | |
voltageRangeDefault | voltage range of the acquisition system in volts. | |
amplificationDefault | default amplification of the acquisition system. | |
screenGainDefault | default screen gain in milivolts by centimeters used to display the field potentiels | |
resolutionDefault | default resolution of the acquisition system. | |
eventPosition | represents the event position, in percentage from the begining of the window, where the events are display when browsing. | |
clusterPosition | represents the cluster position, in percentage from the begining of the window, where the clusters are display when browsing. | |
nbSamples | number of samples per spike waveform. | |
peakSampleIndex | sample index corresponding to the peak of a spike waveform. | |
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
traceBackgroundImage | image used as a background for the trace view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. |
int NeuroscopeDoc::openDocument | ( | const KURL & | url | ) |
Opens the document by filename.
url | url of the file to open (dat file or eeg file). |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::saveSession | ( | ) |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events.
It also saves the relevant changes in the parameter files (creating one if there is none).
int NeuroscopeDoc::saveEventFiles | ( | ) |
Saves the event files.
OpenSaveCreateReturnMessage NeuroscopeDoc::saveSession | ( | KURL | newSessionUrl | ) | [inline] |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events.
newSessionUrl | new url where to write the session information to. |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::createEventFile | ( | KURL | eventUrl, | |
NeuroscopeView * | activeView | |||
) |
Creates a new event file.
eventUrl | url of the new event file. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::singleChannelColorUpdate | ( | int | channelId, | |
NeuroscopeView * | activeView | |||
) |
Changes the color of a channel.
channelId | id of the channel to redraw. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::clusterColorUpdate | ( | QString | providerName, | |
int | clusterId, | |||
NeuroscopeView * | activeView | |||
) |
Changes the color of a cluster.
providerName | identifier of the cluster provider containing the updated cluster. | |
clusterId | id of the cluster to redraw. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::eventColorUpdate | ( | QString | providerName, | |
int | eventId, | |||
NeuroscopeView * | activeView | |||
) |
Changes the color of a event.
providerName | identifier of the event provider containing the updated cluster. | |
eventId | id of the event to redraw. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::channelGroupColorUpdate | ( | int | groupId, | |
NeuroscopeView * | activeView | |||
) |
Changes the color of a group of channels.
groupId | id of the group for which the color have been changed. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::groupsModified | ( | NeuroscopeView * | activeView | ) |
Triggers the update of the displays due to a change in the display groups.
Only the active display is updated immediately.
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::setBackgroundColor | ( | QColor | backgroundColor | ) |
Updates the background color used in the views.
backgroundColor | color of the new background. |
void NeuroscopeDoc::setTraceBackgroundImage | ( | QString | traceBackgroundImagePath | ) |
Updates the background image used in the trace views.
backgroundImagePath | path of the image for the traces background. |
void NeuroscopeDoc::setGains | ( | int | voltageRange, | |
int | amplification, | |||
float | screenGain | |||
) |
Sets the various gains.
voltageRange | voltage range of the acquisition system in volts.oltage range of the acquisition system in volts. | |
amplification | amplification of the acquisition system. | |
screenGain | screen gain in milivolts by centimeters used to display the field potentiels. |
void NeuroscopeDoc::setResolution | ( | int | resolution | ) |
Sets the resolution of the acquisition system of the current document.
resolution | current resolution. |
void NeuroscopeDoc::setSamplingRate | ( | double | rate | ) |
Sets the sampling rate for the current document.
rate | sampling rate. |
void NeuroscopeDoc::setAcquisitionSystemSamplingRate | ( | double | rate | ) |
Sets the acquisition system sampling rate.
This function is call only if the current opened file is not a dat file.
rate | sampling rate. |
void NeuroscopeDoc::setChannelNb | ( | int | nb | ) |
Sets the number of channels for the current document.
nb | current number of channels. |
int NeuroscopeDoc::getInitialOffset | ( | ) | const [inline] |
Gets the initial offset for all the traces for the current document.
int NeuroscopeDoc::getAcquisitionGain | ( | ) | const [inline] |
Gets the acquisition system gains.
int NeuroscopeDoc::getGain | ( | ) | const [inline] |
Gets the current gain based on the screen gain and the acquisition system gain.
int NeuroscopeDoc::getVoltageRange | ( | ) | const [inline] |
Gets the voltage range of the acquisition system in volts for the current document.
int NeuroscopeDoc::getAmplification | ( | ) | const [inline] |
Gets the amplification of the acquisition system for the current document.
float NeuroscopeDoc::getScreenGain | ( | ) | const [inline] |
Gets the screen gain in milivolts by centimeters used to display the field potentiels for the current document.
int NeuroscopeDoc::getResolution | ( | ) | const [inline] |
Gets the resolution of the acquisition system for the current document.
double NeuroscopeDoc::getSamplingRate | ( | ) | const [inline] |
Gets the sampling rate for the current document.
double NeuroscopeDoc::getAcquisitionSystemSamplingRate | ( | ) | const [inline] |
Gets the acquisition system sampling rate.
bool NeuroscopeDoc::getPositionsBackground | ( | ) | const [inline] |
All the positions contained in a position file can be used to create a background image for the PositionView.
The value return by this function tells if such background has to be created.
void NeuroscopeDoc::setDefaultGains | ( | int | voltageRangeDefault, | |
int | amplificationDefault, | |||
float | screenGainDefault | |||
) | [inline] |
Sets the various default gains.
voltageRangeDefault | default voltage range of the acquisition system in volts. | |
amplificationDefault | default amplification of the acquisition system. | |
screenGainDefault | default screen gain in milivolts by centimeters used to display the field potentiels. |
void NeuroscopeDoc::setVoltageRange | ( | int | range | ) | [inline] |
Sets the voltage range of the acquisition system in volts for the current document.
range | current voltage range. |
void NeuroscopeDoc::setAmplification | ( | int | amplification | ) | [inline] |
Sets the amplification of the acquisition system for the current document.
amplification | current amplification. |
void NeuroscopeDoc::setScreenGain | ( | float | gain | ) | [inline] |
Sets the screen gain in milivolts by centimeters used to display the field potentiels for the current document.
gain | current screen gain. |
void NeuroscopeDoc::setDefaultInitialOffset | ( | int | offset | ) | [inline] |
Sets the default initial offset for all the traces.
offset | initial offset. |
void NeuroscopeDoc::setDefaultResolution | ( | int | resolution | ) | [inline] |
Sets the default resolution of the acquisition system.
resolution | default resolution. |
void NeuroscopeDoc::setDefaultEegSamplingRate | ( | double | rate | ) | [inline] |
Sets the default sampling rate of the EEG file.
rate | default sampling rate. |
void NeuroscopeDoc::setDefaultDatSamplingRate | ( | double | rate | ) | [inline] |
Sets the default sampling rate of the dat file.
rate | default sampling rate. |
void NeuroscopeDoc::setDefaultChannelNb | ( | int | nb | ) | [inline] |
Sets the default number of channels.
nb | default number of channels. |
void NeuroscopeDoc::setDefaultTraceBackgroundImage | ( | QString | traceBackgroundImagePath | ) | [inline] |
Sets the default background image for the trace view.
traceBackgroundImagePath | background image. |
ChannelColors* NeuroscopeDoc::channelColors | ( | ) | const [inline] |
Returns a pointer on the list of ItemColor objects used to represent the channel colors.
TracesProvider& NeuroscopeDoc::tracesDataProvider | ( | ) | const [inline] |
Returns a reference on the DataProvider containing the information on the traces (TracesProvider).
void NeuroscopeDoc::selectAllChannels | ( | NeuroscopeView & | activeView, | |
bool | editMode | |||
) |
Selects all the channels and shows them if the edit mode is not selected.
activeView | the view in which the change has to be immediate. | |
editMode | true if the edit mode is selected, false otherwise. |
void NeuroscopeDoc::deselectAllChannels | ( | NeuroscopeView & | activeView, | |
bool | editMode | |||
) |
Deselects all the channels and hides them if the edit mode is not selected.
activeView | the view in which the change has to be immediate. | |
editMode | true if the edit mode is selected, false otherwise. |
void NeuroscopeDoc::updateFileProperties | ( | int | channelNb, | |
double | SR, | |||
int | resolution, | |||
int | offset, | |||
int | voltageRange, | |||
int | amplification, | |||
float | screenGain, | |||
int | newNbSamples, | |||
int | newPeakSampleIndex, | |||
double | videoSamplingRate, | |||
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
QString | traceBackgroundImage, | |||
int | rotation, | |||
int | flip, | |||
double | acquisitionSystemSamplingRate, | |||
bool | positionsBackground | |||
) | [inline] |
Updates the properties for the current file (number of channels, sampling rate of the dat file and eeg file).
This function is only called at the opening of a file if the user has changed the default or command line values.
channelNb | number of channels. | |
SR | sampling rate of the current file.. | |
resolution | resolution of the acquisition system. | |
offset | initial offset for all the traces. | |
voltageRange | voltage range of the acquisition system in volts. | |
amplification | amplification of the acquisition system. | |
screenGain | screen gain in milivolts by centimeters used to display the field potentiels. | |
newNbSamples | number of samples per spike waveform. | |
newPeakSampleIndex | sample index corresponding to the peak of a spike waveform. | |
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
traceBackgroundImage | image used as a background for the trace view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
acquisitionSystemSamplingRate | acquisition system sampling. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. |
bool NeuroscopeDoc::isADocumentToClose | ( | ) |
Tells if there is opened document to be closed.
void NeuroscopeDoc::setNoneEditMode | ( | NeuroscopeView * | activeView | ) |
Informs the displays that the mode hase switch from edit to none edit.
activeView | the view in which the change has to be immediate. |
bool NeuroscopeDoc::canCloseDocument | ( | NeuroscopeApp * | mainWindow, | |
QString | callingMethod | |||
) |
Verifies if the document can be close.
mainWindow | the main window calling this method. | |
callingMethod | the mainWindow's method which call this method. |
void NeuroscopeDoc::showCalibration | ( | bool | show, | |
NeuroscopeView * | activeView | |||
) |
Shows or hides the calibration bar.
This bar is meaningful only when all the channels have the same amplification.
show | true if the bar has to be shown false otherwise. | |
activeView | the view in which the change has to be immediate. |
ItemColors* NeuroscopeDoc::providerColorList | ( | QString | fileName | ) | [inline] |
Returns the item color list for the given provider.
fileName | name of the file containing the data of the provider. |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::loadClusterFile | ( | KURL | clusterUrl, | |
NeuroscopeView * | activeView | |||
) |
Loads the cluster file identified by clusterUrl
.
clusterUrl | url of the cluster file to load. | |
activeView | the view in which the change has to be immediate. |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::loadClusterFile | ( | KURL | clusterUrl, | |
QMap< EventDescription, QColor > & | itemColors, | |||
QDateTime | lastModified, | |||
bool | firstFile | |||
) |
Loads the cluster file store in the session file and identified by clusterUrl
.
clusterUrl | url of the cluster file to load. | |
itemColors | a map given the colors for the clusters contained in the file. | |
lastModified | the date of last modification of the file store in the session file. | |
firstFile | true if the file to load if the first one, false otherwise. |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::loadPositionFile | ( | KURL | url, | |
NeuroscopeView * | activeView | |||
) |
Loads the position file and creates the position view in the current display.
url | file to be opened. | |
activeView | the view in which the change has to be immediate. |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::loadPositionFile | ( | QString | filePath | ) |
Loads the position file.
filePath | path of the file to be opened. |
void NeuroscopeDoc::removeClusterFile | ( | QString | providerName, | |
NeuroscopeView * | activeView | |||
) |
Removes the cluster provider corresponding to the identifier providerName
from the list of providers.
providerName | identifier of the cluster provider. | |
activeView | the view in which the change has to be immediate. |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::loadEventFile | ( | KURL | eventUrl, | |
NeuroscopeView * | activeView | |||
) |
Loads the event file identified by eventUrl
.
eventUrl | url of the event file to load. | |
activeView | the view in which the change has to be immediate. |
NeuroscopeDoc::OpenSaveCreateReturnMessage NeuroscopeDoc::loadEventFile | ( | KURL | eventUrl, | |
QMap< EventDescription, QColor > & | itemColors, | |||
QDateTime | lastModified, | |||
bool | firstFile | |||
) |
Loads the event file store in the session file and identified by eventUrl
.
eventUrl | url of the event file to load. | |
itemColors | a map given the colors for the events contained in the file. | |
lastModified | the date of last modification of the file store in the session file. | |
firstFile | true if the file to load if the first one, false otherwise. |
void NeuroscopeDoc::removeEventFile | ( | QString | providerName, | |
NeuroscopeView * | activeView, | |||
bool | lastFile | |||
) |
Removes the event provider corresponding to the identifier providerName
from the list of providers.
providerName | identifier of the event provider. | |
activeView | the view in which the change has to be immediate. | |
lastFile | true if the event file removed is the last event provider, false otherwise. |
void NeuroscopeDoc::setProviders | ( | NeuroscopeView * | activeView | ) |
Sets the data providers to the newly created view.
activeView | the view which gives its parameters to the new view. |
void NeuroscopeDoc::showAllClustersExcept | ( | ItemPalette * | clusterPalette, | |
NeuroscopeView * | activeView, | |||
QValueList< int > | clustersToHide | |||
) |
Updates the selection of clusters to be shown by showing all the clusters except those contained in clustersToNotShow
.
clusterPalette | the palette containing the clusters to be shown. | |
activeView | the view in which the change has to be immediate. | |
clustersToHide | list of clusters to not show. |
void NeuroscopeDoc::deselectAllClusters | ( | ItemPalette * | clusterPalette, | |
NeuroscopeView * | activeView | |||
) |
Updates the selection of clusters to be shown by hiding all the clusters.
clusterPalette | the palette containing the clusters to be shown. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::showAllEvents | ( | ItemPalette * | eventPalette, | |
NeuroscopeView * | activeView | |||
) |
Updates the selection of events to be shown by showing all the events.
eventPalette | the palette containing the events to be shown. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::deselectAllEvents | ( | ItemPalette * | eventPalette, | |
NeuroscopeView * | activeView | |||
) |
Updates the selection of events to be shown by hiding all the events.
eventPalette | the palette containing the events to be shown. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::eventModified | ( | QString | providerName, | |
int | selectedEventId, | |||
double | time, | |||
double | newTime, | |||
NeuroscopeView * | activeView | |||
) |
Informs that an event has been modified.
providerName | name use to identified the event provider containing the modified event. | |
selectedEventId | id of the modified event. | |
time | initial time of the modified event. | |
newTime | new time of the modified event. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::eventRemoved | ( | QString | providerName, | |
int | selectedEventId, | |||
double | time, | |||
NeuroscopeView * | activeView | |||
) |
Informs that an event has been removed.
providerName | name use to identified the event provider containing the removed event. | |
selectedEventId | id of the removed event. | |
time | initial time of the removed event. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::undo | ( | NeuroscopeView * | activeView | ) |
Reverts the last user action.
activeView | the currently active view. |
void NeuroscopeDoc::redo | ( | NeuroscopeView * | activeView | ) |
Reverts the last undo action.
activeView | the currently active view. |
void NeuroscopeDoc::eventAdded | ( | QString | providerName, | |
QString | addedEventDescription, | |||
double | time, | |||
NeuroscopeView * | activeView | |||
) |
Informs that an event has been added.
providerName | name use to identified the event provider containing the added event. | |
addedEventDescription | description of the added event. | |
time | time of the added event. | |
activeView | the view in which the change has been made. |
QValueList< EventDescription > NeuroscopeDoc::eventIds | ( | QString | providerName | ) |
Returns the list of existing event descriptions contained in the currently selected event file.
providerName | identifier of the event file. |
void NeuroscopeDoc::setWaveformInformation | ( | int | nb, | |
int | index, | |||
NeuroscopeView * | activeView | |||
) |
Sets the information used to display spike waveforms.
nb | number of samples per spike waveform. | |
index | sample index corresponding to the peak of a spike waveform. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::setDefaultWaveformInformation | ( | int | nb, | |
int | index | |||
) | [inline] |
Sets the default information used to display spike waveforms.
nb | number of samples per spike waveform. | |
index | sample index corresponding to the peak of a spike waveform. |
void NeuroscopeDoc::setPositionInformation | ( | double | videoSamplingRate, | |
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
int | rotation, | |||
int | flip, | |||
bool | positionsBackground, | |||
NeuroscopeView * | activeView | |||
) |
Sets the information used to display the animal position.
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::setDefaultPositionInformation | ( | double | videoSamplingRate, | |
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
int | rotation, | |||
int | flip, | |||
bool | positionsBackground | |||
) |
Sets the default information used to display the animal position.
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. |
double NeuroscopeDoc::getVideoSamplingRate | ( | ) | const [inline] |
Gets the video sampling rate.
int NeuroscopeDoc::getChannelNb | ( | ) | const [inline] |
Gets the number of channels for the current document.
int NeuroscopeDoc::getWidth | ( | ) | const [inline] |
Returns the video image width.
int NeuroscopeDoc::getHeight | ( | ) | const [inline] |
Returns the video image height.
QString NeuroscopeDoc::getBackgroundImage | ( | ) | const [inline] |
QString NeuroscopeDoc::getTraceBackgroundImage | ( | ) | const [inline] |
int NeuroscopeDoc::getRotation | ( | ) | const [inline] |
Returns the video image rotation angle.
int NeuroscopeDoc::getFlip | ( | ) | const [inline] |
Returns the video image flip orientation.
0 stands for none, 1 for vertical and 2 for horizontal.
void NeuroscopeDoc::removePositionFile | ( | NeuroscopeView * | activeView | ) |
Removes the positon provider corresponding to the position file from the list of providers.
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::addPositionView | ( | NeuroscopeView * | activeView, | |
QColor | backgroundColor | |||
) |
Adds a PositionView in the current display.
activeView | the view in which the position view will be added. | |
backgroundColor |
QImage NeuroscopeDoc::getWhiteTrajectoryBackground | ( | ) | [inline] |
Gets a background image containing the animal trajectory on a white background.
Transformation (rotation and flip have been applied if necessary).
void NeuroscopeDoc::updateSkippedChannelColors | ( | bool | whiteBackground, | |
QColor | backgroundColor | |||
) |
Updates the color of the skipped channels to either white or background color.
whiteBackground | true if the skipped channels should be colored in white, false otherwise. | |
backgroundColor | current background color. |
void NeuroscopeDoc::slotNewEventDescriptionCreated | ( | QString | providerName, | |
QMap< int, int > | oldNewEventIds, | |||
QMap< int, int > | newOldEventIds, | |||
QString | eventDescriptionAdded | |||
) | [slot] |
Updates the event palette and the views after the creation of a new event description.
providerName | provider identifier. | |
oldNewEventIds | map between the previous eventIds and the new ones. | |
newOldEventIds | map between the new eventIds and the previous ones. | |
eventDescriptionAdded | new event description added. |
void NeuroscopeDoc::slotEventDescriptionRemoved | ( | QString | providerName, | |
QMap< int, int > | oldNewEventIds, | |||
QMap< int, int > | newOldEventIds, | |||
int | eventIdToRemove, | |||
QString | eventDescriptionToRemove | |||
) | [slot] |
Updates the event palette and the views after the suppression of an event description.
providerName | provider identifier. | |
oldNewEventIds | map between the previous eventIds and the new ones. | |
newOldEventIds | map between the new eventIds and the previous ones. | |
eventIdToRemove | event id removed. | |
eventDescriptionToRemove | removed event description. |
void NeuroscopeDoc::noSession | ( | QMap< int, int > & | channelDefaultOffsets, | |
QMap< int, bool > & | skipStatus | |||
) | [signal] |
Informs the application that there is no session file available.
channelDefaultOffsets | map given the channel default offsets. | |
skipStatus | map given the skip status of the channels. |
void NeuroscopeDoc::loadFirstDisplay | ( | QValueList< int > * | channelsToDisplay, | |
bool | verticalLines, | |||
bool | raster, | |||
bool | waveforms, | |||
bool | showLabels, | |||
bool | multipleColumns, | |||
bool | greyMode, | |||
QValueList< int > | offsets, | |||
QValueList< int > | channelGains, | |||
QValueList< int > | selectedChannels, | |||
QMap< int, bool > & | skipStatus, | |||
long | startTime, | |||
long | duration, | |||
QString | tabLabel, | |||
bool | positionView, | |||
int | rasterHeight, | |||
bool | showEventsInPositionView | |||
) | [signal] |
Informs the application that there the first display to create will show the channels contained in channelsToDisplay
.
channelsToDisplay | list of channel ids to show at start up. | |
verticalLines | true if vertical lines will be drawn if clusters are selected. | |
raster | true if a raster will be drawn if clusters are selected. | |
waveforms | true if the spike waveforms will be drawn if clusters are selected. | |
showLabels | true if labels are displayed next to the traces, false otherwise. | |
multipleColumns | true if the traces are diplay on several columns,false otherwise. | |
greyMode | true if the channels are displayed in grey-scale, false otherwise. | |
offsets | list containing the offset for each channel. | |
channelGains | list of the exponents used to compute the drawing gain for each channel. | |
selectedChannels | list of the selected channels. | |
skipStatus | map given the skip status of the channels. | |
startTime | starting time in miliseconds. | |
duration | time window in miliseconds. | |
tabLabel | label for the display when in tab page mode. | |
positionView | true if a position view in shown in the display, false otherwise. | |
rasterHeight | height of the rasters in the world coordinate system. | |
showEventsInPositionView | 1 if events are displayed in the PositionView, 0 otherwise. |
int NeuroscopeDoc::openDocument | ( | const KURL & | url | ) |
Opens the document by filename.
url | url of the file to open (dat file or eeg file). |
OpenSaveCreateReturnMessage NeuroscopeDoc::saveSession | ( | ) |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events.
It also saves the relevant changes in the parameter files (creating one if there is none).
int NeuroscopeDoc::saveEventFiles | ( | ) |
Saves the event files.
OpenSaveCreateReturnMessage NeuroscopeDoc::saveSession | ( | KURL | newSessionUrl | ) | [inline] |
Saves the current session: displays, spike, cluster, event files opened and selected clusters and events.
newSessionUrl | new url where to write the session information to. |
OpenSaveCreateReturnMessage NeuroscopeDoc::createEventFile | ( | KURL | eventUrl, | |
NeuroscopeView * | activeView | |||
) |
Creates a new event file.
eventUrl | url of the new event file. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::singleChannelColorUpdate | ( | int | channelId, | |
NeuroscopeView * | activeView | |||
) |
Changes the color of a channel.
channelId | id of the channel to redraw. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::clusterColorUpdate | ( | QString | providerName, | |
int | clusterId, | |||
NeuroscopeView * | activeView | |||
) |
Changes the color of a cluster.
providerName | identifier of the cluster provider containing the updated cluster. | |
clusterId | id of the cluster to redraw. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::eventColorUpdate | ( | QString | providerName, | |
int | eventId, | |||
NeuroscopeView * | activeView | |||
) |
Changes the color of a event.
providerName | identifier of the event provider containing the updated cluster. | |
eventId | id of the event to redraw. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::channelGroupColorUpdate | ( | int | groupId, | |
NeuroscopeView * | activeView | |||
) |
Changes the color of a group of channels.
groupId | id of the group for which the color have been changed. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::groupsModified | ( | NeuroscopeView * | activeView | ) |
Triggers the update of the displays due to a change in the display groups.
Only the active display is updated immediately.
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::setBackgroundColor | ( | QColor | backgroundColor | ) |
Updates the background color used in the views.
backgroundColor | color of the new background. |
void NeuroscopeDoc::setTraceBackgroundImage | ( | QString | traceBackgroundImagePath | ) |
Updates the background image used in the trace views.
backgroundImagePath | path of the image for the traces background. |
void NeuroscopeDoc::setGains | ( | int | voltageRange, | |
int | amplification, | |||
float | screenGain | |||
) |
Sets the various gains.
voltageRange | voltage range of the acquisition system in volts.oltage range of the acquisition system in volts. | |
amplification | amplification of the acquisition system. | |
screenGain | screen gain in milivolts by centimeters used to display the field potentiels. |
void NeuroscopeDoc::setResolution | ( | int | resolution | ) |
Sets the resolution of the acquisition system of the current document.
resolution | current resolution. |
void NeuroscopeDoc::setSamplingRate | ( | double | rate | ) |
Sets the sampling rate for the current document.
rate | sampling rate. |
void NeuroscopeDoc::setAcquisitionSystemSamplingRate | ( | double | rate | ) |
Sets the acquisition system sampling rate.
This function is call only if the current opened file is not a dat file.
rate | sampling rate. |
void NeuroscopeDoc::setChannelNb | ( | int | nb | ) |
Sets the number of channels for the current document.
nb | current number of channels. |
int NeuroscopeDoc::getInitialOffset | ( | ) | const [inline] |
Gets the initial offset for all the traces for the current document.
int NeuroscopeDoc::getAcquisitionGain | ( | ) | const [inline] |
Gets the acquisition system gains.
int NeuroscopeDoc::getGain | ( | ) | const [inline] |
Gets the current gain based on the screen gain and the acquisition system gain.
int NeuroscopeDoc::getVoltageRange | ( | ) | const [inline] |
Gets the voltage range of the acquisition system in volts for the current document.
int NeuroscopeDoc::getAmplification | ( | ) | const [inline] |
Gets the amplification of the acquisition system for the current document.
float NeuroscopeDoc::getScreenGain | ( | ) | const [inline] |
Gets the screen gain in milivolts by centimeters used to display the field potentiels for the current document.
int NeuroscopeDoc::getResolution | ( | ) | const [inline] |
Gets the resolution of the acquisition system for the current document.
double NeuroscopeDoc::getSamplingRate | ( | ) | const [inline] |
Gets the sampling rate for the current document.
double NeuroscopeDoc::getAcquisitionSystemSamplingRate | ( | ) | const [inline] |
Gets the acquisition system sampling rate.
bool NeuroscopeDoc::getPositionsBackground | ( | ) | const [inline] |
All the positions contained in a position file can be used to create a background image for the PositionView.
The value return by this function tells if such background has to be created.
void NeuroscopeDoc::setDefaultGains | ( | int | voltageRangeDefault, | |
int | amplificationDefault, | |||
float | screenGainDefault | |||
) | [inline] |
Sets the various default gains.
voltageRangeDefault | default voltage range of the acquisition system in volts. | |
amplificationDefault | default amplification of the acquisition system. | |
screenGainDefault | default screen gain in milivolts by centimeters used to display the field potentiels. |
void NeuroscopeDoc::setVoltageRange | ( | int | range | ) | [inline] |
Sets the voltage range of the acquisition system in volts for the current document.
range | current voltage range. |
void NeuroscopeDoc::setAmplification | ( | int | amplification | ) | [inline] |
Sets the amplification of the acquisition system for the current document.
amplification | current amplification. |
void NeuroscopeDoc::setScreenGain | ( | float | gain | ) | [inline] |
Sets the screen gain in milivolts by centimeters used to display the field potentiels for the current document.
gain | current screen gain. |
void NeuroscopeDoc::setDefaultInitialOffset | ( | int | offset | ) | [inline] |
Sets the default initial offset for all the traces.
offset | initial offset. |
void NeuroscopeDoc::setDefaultResolution | ( | int | resolution | ) | [inline] |
Sets the default resolution of the acquisition system.
resolution | default resolution. |
void NeuroscopeDoc::setDefaultEegSamplingRate | ( | double | rate | ) | [inline] |
Sets the default sampling rate of the EEG file.
rate | default sampling rate. |
void NeuroscopeDoc::setDefaultDatSamplingRate | ( | double | rate | ) | [inline] |
Sets the default sampling rate of the dat file.
rate | default sampling rate. |
void NeuroscopeDoc::setDefaultChannelNb | ( | int | nb | ) | [inline] |
Sets the default number of channels.
nb | default number of channels. |
void NeuroscopeDoc::setDefaultTraceBackgroundImage | ( | QString | traceBackgroundImagePath | ) | [inline] |
Sets the default background image for the trace view.
traceBackgroundImagePath | background image. |
ChannelColors* NeuroscopeDoc::channelColors | ( | ) | const [inline] |
Returns a pointer on the list of ItemColor objects used to represent the channel colors.
TracesProvider& NeuroscopeDoc::tracesDataProvider | ( | ) | const [inline] |
Returns a reference on the DataProvider containing the information on the traces (TracesProvider).
void NeuroscopeDoc::selectAllChannels | ( | NeuroscopeView & | activeView, | |
bool | editMode | |||
) |
Selects all the channels and shows them if the edit mode is not selected.
activeView | the view in which the change has to be immediate. | |
editMode | true if the edit mode is selected, false otherwise. |
void NeuroscopeDoc::deselectAllChannels | ( | NeuroscopeView & | activeView, | |
bool | editMode | |||
) |
Deselects all the channels and hides them if the edit mode is not selected.
activeView | the view in which the change has to be immediate. | |
editMode | true if the edit mode is selected, false otherwise. |
void NeuroscopeDoc::updateFileProperties | ( | int | channelNb, | |
double | SR, | |||
int | resolution, | |||
int | offset, | |||
int | voltageRange, | |||
int | amplification, | |||
float | screenGain, | |||
int | newNbSamples, | |||
int | newPeakSampleIndex, | |||
double | videoSamplingRate, | |||
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
QString | traceBackgroundImage, | |||
int | rotation, | |||
int | flip, | |||
double | acquisitionSystemSamplingRate, | |||
bool | positionsBackground | |||
) | [inline] |
Updates the properties for the current file (number of channels, sampling rate of the dat file and eeg file).
This function is only called at the opening of a file if the user has changed the default or command line values.
channelNb | number of channels. | |
SR | sampling rate of the current file.. | |
resolution | resolution of the acquisition system. | |
offset | initial offset for all the traces. | |
voltageRange | voltage range of the acquisition system in volts. | |
amplification | amplification of the acquisition system. | |
screenGain | screen gain in milivolts by centimeters used to display the field potentiels. | |
newNbSamples | number of samples per spike waveform. | |
newPeakSampleIndex | sample index corresponding to the peak of a spike waveform. | |
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
traceBackgroundImage | image used as a background for the trace view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
acquisitionSystemSamplingRate | acquisition system sampling. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. |
bool NeuroscopeDoc::isADocumentToClose | ( | ) |
Tells if there is opened document to be closed.
void NeuroscopeDoc::setNoneEditMode | ( | NeuroscopeView * | activeView | ) |
Informs the displays that the mode hase switch from edit to none edit.
activeView | the view in which the change has to be immediate. |
bool NeuroscopeDoc::canCloseDocument | ( | NeuroscopeApp * | mainWindow, | |
QString | callingMethod | |||
) |
Verifies if the document can be close.
mainWindow | the main window calling this method. | |
callingMethod | the mainWindow's method which call this method. |
void NeuroscopeDoc::showCalibration | ( | bool | show, | |
NeuroscopeView * | activeView | |||
) |
Shows or hides the calibration bar.
This bar is meaningful only when all the channels have the same amplification.
show | true if the bar has to be shown false otherwise. | |
activeView | the view in which the change has to be immediate. |
ItemColors* NeuroscopeDoc::providerColorList | ( | QString | fileName | ) | [inline] |
Returns the item color list for the given provider.
fileName | name of the file containing the data of the provider. |
OpenSaveCreateReturnMessage NeuroscopeDoc::loadClusterFile | ( | KURL | clusterUrl, | |
NeuroscopeView * | activeView | |||
) |
Loads the cluster file identified by clusterUrl
.
clusterUrl | url of the cluster file to load. | |
activeView | the view in which the change has to be immediate. |
OpenSaveCreateReturnMessage NeuroscopeDoc::loadClusterFile | ( | KURL | clusterUrl, | |
QMap< EventDescription, QColor > & | itemColors, | |||
QDateTime | lastModified, | |||
bool | firstFile | |||
) |
Loads the cluster file store in the session file and identified by clusterUrl
.
clusterUrl | url of the cluster file to load. | |
itemColors | a map given the colors for the clusters contained in the file. | |
lastModified | the date of last modification of the file store in the session file. | |
firstFile | true if the file to load if the first one, false otherwise. |
OpenSaveCreateReturnMessage NeuroscopeDoc::loadPositionFile | ( | KURL | url, | |
NeuroscopeView * | activeView | |||
) |
Loads the position file and creates the position view in the current display.
url | file to be opened. | |
activeView | the view in which the change has to be immediate. |
OpenSaveCreateReturnMessage NeuroscopeDoc::loadPositionFile | ( | QString | filePath | ) |
Loads the position file.
filePath | path of the file to be opened. |
void NeuroscopeDoc::removeClusterFile | ( | QString | providerName, | |
NeuroscopeView * | activeView | |||
) |
Removes the cluster provider corresponding to the identifier providerName
from the list of providers.
providerName | identifier of the cluster provider. | |
activeView | the view in which the change has to be immediate. |
OpenSaveCreateReturnMessage NeuroscopeDoc::loadEventFile | ( | KURL | eventUrl, | |
NeuroscopeView * | activeView | |||
) |
Loads the event file identified by eventUrl
.
eventUrl | url of the event file to load. | |
activeView | the view in which the change has to be immediate. |
OpenSaveCreateReturnMessage NeuroscopeDoc::loadEventFile | ( | KURL | eventUrl, | |
QMap< EventDescription, QColor > & | itemColors, | |||
QDateTime | lastModified, | |||
bool | firstFile | |||
) |
Loads the event file store in the session file and identified by eventUrl
.
eventUrl | url of the event file to load. | |
itemColors | a map given the colors for the events contained in the file. | |
lastModified | the date of last modification of the file store in the session file. | |
firstFile | true if the file to load if the first one, false otherwise. |
void NeuroscopeDoc::removeEventFile | ( | QString | providerName, | |
NeuroscopeView * | activeView, | |||
bool | lastFile | |||
) |
Removes the event provider corresponding to the identifier providerName
from the list of providers.
providerName | identifier of the event provider. | |
activeView | the view in which the change has to be immediate. | |
lastFile | true if the event file removed is the last event provider, false otherwise. |
void NeuroscopeDoc::setProviders | ( | NeuroscopeView * | activeView | ) |
Sets the data providers to the newly created view.
activeView | the view which gives its parameters to the new view. |
void NeuroscopeDoc::showAllClustersExcept | ( | ItemPalette * | clusterPalette, | |
NeuroscopeView * | activeView, | |||
QValueList< int > | clustersToHide | |||
) |
Updates the selection of clusters to be shown by showing all the clusters except those contained in clustersToNotShow
.
clusterPalette | the palette containing the clusters to be shown. | |
activeView | the view in which the change has to be immediate. | |
clustersToHide | list of clusters to not show. |
void NeuroscopeDoc::deselectAllClusters | ( | ItemPalette * | clusterPalette, | |
NeuroscopeView * | activeView | |||
) |
Updates the selection of clusters to be shown by hiding all the clusters.
clusterPalette | the palette containing the clusters to be shown. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::showAllEvents | ( | ItemPalette * | eventPalette, | |
NeuroscopeView * | activeView | |||
) |
Updates the selection of events to be shown by showing all the events.
eventPalette | the palette containing the events to be shown. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::deselectAllEvents | ( | ItemPalette * | eventPalette, | |
NeuroscopeView * | activeView | |||
) |
Updates the selection of events to be shown by hiding all the events.
eventPalette | the palette containing the events to be shown. | |
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::eventModified | ( | QString | providerName, | |
int | selectedEventId, | |||
double | time, | |||
double | newTime, | |||
NeuroscopeView * | activeView | |||
) |
Informs that an event has been modified.
providerName | name use to identified the event provider containing the modified event. | |
selectedEventId | id of the modified event. | |
time | initial time of the modified event. | |
newTime | new time of the modified event. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::eventRemoved | ( | QString | providerName, | |
int | selectedEventId, | |||
double | time, | |||
NeuroscopeView * | activeView | |||
) |
Informs that an event has been removed.
providerName | name use to identified the event provider containing the removed event. | |
selectedEventId | id of the removed event. | |
time | initial time of the removed event. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::undo | ( | NeuroscopeView * | activeView | ) |
Reverts the last user action.
activeView | the currently active view. |
void NeuroscopeDoc::redo | ( | NeuroscopeView * | activeView | ) |
Reverts the last undo action.
activeView | the currently active view. |
void NeuroscopeDoc::eventAdded | ( | QString | providerName, | |
QString | addedEventDescription, | |||
double | time, | |||
NeuroscopeView * | activeView | |||
) |
Informs that an event has been added.
providerName | name use to identified the event provider containing the added event. | |
addedEventDescription | description of the added event. | |
time | time of the added event. | |
activeView | the view in which the change has been made. |
QValueList<EventDescription> NeuroscopeDoc::eventIds | ( | QString | providerName | ) |
Returns the list of existing event descriptions contained in the currently selected event file.
providerName | identifier of the event file. |
void NeuroscopeDoc::setWaveformInformation | ( | int | nb, | |
int | index, | |||
NeuroscopeView * | activeView | |||
) |
Sets the information used to display spike waveforms.
nb | number of samples per spike waveform. | |
index | sample index corresponding to the peak of a spike waveform. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::setDefaultWaveformInformation | ( | int | nb, | |
int | index | |||
) | [inline] |
Sets the default information used to display spike waveforms.
nb | number of samples per spike waveform. | |
index | sample index corresponding to the peak of a spike waveform. |
void NeuroscopeDoc::setPositionInformation | ( | double | videoSamplingRate, | |
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
int | rotation, | |||
int | flip, | |||
bool | positionsBackground, | |||
NeuroscopeView * | activeView | |||
) |
Sets the information used to display the animal position.
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. | |
activeView | the view in which the change has been made. |
void NeuroscopeDoc::setDefaultPositionInformation | ( | double | videoSamplingRate, | |
int | width, | |||
int | height, | |||
QString | backgroundImage, | |||
int | rotation, | |||
int | flip, | |||
bool | positionsBackground | |||
) |
Sets the default information used to display the animal position.
videoSamplingRate | video acquisition sampling rate. | |
width | video image width. | |
height | video image height. | |
backgroundImage | image used as a background for the position view. | |
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
positionsBackground | true if the all the positions contain in the position file have to be drawn on the background, false otherwise. |
double NeuroscopeDoc::getVideoSamplingRate | ( | ) | const [inline] |
Gets the video sampling rate.
int NeuroscopeDoc::getChannelNb | ( | ) | const [inline] |
Gets the number of channels for the current document.
int NeuroscopeDoc::getWidth | ( | ) | const [inline] |
Returns the video image width.
int NeuroscopeDoc::getHeight | ( | ) | const [inline] |
Returns the video image height.
QString NeuroscopeDoc::getBackgroundImage | ( | ) | const [inline] |
QString NeuroscopeDoc::getTraceBackgroundImage | ( | ) | const [inline] |
int NeuroscopeDoc::getRotation | ( | ) | const [inline] |
Returns the video image rotation angle.
int NeuroscopeDoc::getFlip | ( | ) | const [inline] |
Returns the video image flip orientation.
0 stands for none, 1 for vertical and 2 for horizontal.
void NeuroscopeDoc::removePositionFile | ( | NeuroscopeView * | activeView | ) |
Removes the positon provider corresponding to the position file from the list of providers.
activeView | the view in which the change has to be immediate. |
void NeuroscopeDoc::addPositionView | ( | NeuroscopeView * | activeView, | |
QColor | backgroundColor | |||
) |
Adds a PositionView in the current display.
activeView | the view in which the position view will be added. | |
backgroundColor |
QImage NeuroscopeDoc::getWhiteTrajectoryBackground | ( | ) | [inline] |
Gets a background image containing the animal trajectory on a white background.
Transformation (rotation and flip have been applied if necessary).
void NeuroscopeDoc::updateSkippedChannelColors | ( | bool | whiteBackground, | |
QColor | backgroundColor | |||
) |
Updates the color of the skipped channels to either white or background color.
whiteBackground | true if the skipped channels should be colored in white, false otherwise. | |
backgroundColor | current background color. |
void NeuroscopeDoc::slotNewEventDescriptionCreated | ( | QString | providerName, | |
QMap< int, int > | oldNewEventIds, | |||
QMap< int, int > | newOldEventIds, | |||
QString | eventDescriptionAdded | |||
) | [slot] |
Updates the event palette and the views after the creation of a new event description.
providerName | provider identifier. | |
oldNewEventIds | map between the previous eventIds and the new ones. | |
newOldEventIds | map between the new eventIds and the previous ones. | |
eventDescriptionAdded | new event description added. |
void NeuroscopeDoc::slotEventDescriptionRemoved | ( | QString | providerName, | |
QMap< int, int > | oldNewEventIds, | |||
QMap< int, int > | newOldEventIds, | |||
int | eventIdToRemove, | |||
QString | eventDescriptionToRemove | |||
) | [slot] |
Updates the event palette and the views after the suppression of an event description.
providerName | provider identifier. | |
oldNewEventIds | map between the previous eventIds and the new ones. | |
newOldEventIds | map between the new eventIds and the previous ones. | |
eventIdToRemove | event id removed. | |
eventDescriptionToRemove | removed event description. |
void NeuroscopeDoc::noSession | ( | QMap< int, int > & | channelDefaultOffsets, | |
QMap< int, bool > & | skipStatus | |||
) | [signal] |
Informs the application that there is no session file available.
channelDefaultOffsets | map given the channel default offsets. | |
skipStatus | map given the skip status of the channels. |
void NeuroscopeDoc::loadFirstDisplay | ( | QValueList< int > * | channelsToDisplay, | |
bool | verticalLines, | |||
bool | raster, | |||
bool | waveforms, | |||
bool | showLabels, | |||
bool | multipleColumns, | |||
bool | greyMode, | |||
QValueList< int > | offsets, | |||
QValueList< int > | channelGains, | |||
QValueList< int > | selectedChannels, | |||
QMap< int, bool > & | skipStatus, | |||
long | startTime, | |||
long | duration, | |||
QString | tabLabel, | |||
bool | positionView, | |||
int | rasterHeight, | |||
bool | showEventsInPositionView | |||
) | [signal] |
Informs the application that there the first display to create will show the channels contained in channelsToDisplay
.
channelsToDisplay | list of channel ids to show at start up. | |
verticalLines | true if vertical lines will be drawn if clusters are selected. | |
raster | true if a raster will be drawn if clusters are selected. | |
waveforms | true if the spike waveforms will be drawn if clusters are selected. | |
showLabels | true if labels are displayed next to the traces, false otherwise. | |
multipleColumns | true if the traces are diplay on several columns,false otherwise. | |
greyMode | true if the channels are displayed in grey-scale, false otherwise. | |
offsets | list containing the offset for each channel. | |
channelGains | list of the exponents used to compute the drawing gain for each channel. | |
selectedChannels | list of the selected channels. | |
skipStatus | map given the skip status of the channels. | |
startTime | starting time in miliseconds. | |
duration | time window in miliseconds. | |
tabLabel | label for the display when in tab page mode. | |
positionView | true if a position view in shown in the display, false otherwise. | |
rasterHeight | height of the rasters in the world coordinate system. | |
showEventsInPositionView | 1 if events are displayed in the PositionView, 0 otherwise. |