NeuroscopeXmlReader Class Reference

Class reading the parameter and session xml file. More...

#include <neuroscopexmlreader.h>

List of all members.

Public Types

enum  fileType { PARAMETER = 0, SESSION = 1, PARAMETER = 0, SESSION = 1 }
 Type of xml file supported by this class.
enum  fileType { PARAMETER = 0, SESSION = 1, PARAMETER = 0, SESSION = 1 }
 Type of xml file supported by this class.

Public Member Functions

bool parseFile (const KURL &url, fileType type)
 Opens and parses the file with the url.
void closeFile ()
 Closes the currently open file.
int getResolution () const
 Returns the resolution in bits.
int getNbChannels () const
 Returns the number of channels.
double getSamplingRate () const
 Returns the sampling rate of the system in hertz.
double getUpsamplingRate () const
 Returns the sampling rate used to upsample the waveforms.
double getLfpInformation () const
 Returns the local field potential sampling rate in hertz.
float getScreenGain () const
 Returns the screen gain in milivolts by centimeters used to display the field potentiels or zero if the element could not be found in the file.
int getVoltageRange () const
 Returns the voltage range of the acquisition system in volts, or zero if the element could not be found in the file.
int getAmplification () const
 Returns the amplification of the acquisition system, or zero if the element could not be found in the file.
int getOffset () const
 Returns the offset store in the session file, or zero if the element could not be found in the file.
QValueList< ChannelDescriptiongetChannelDescription ()
 Returns the list of ChannelDescription, class given the color for each channel.
void getChannelDefaultOffset (QMap< int, int > &channelDefaultOffsets)
 Returns the list of channel default offsets.
void getAnatomicalDescription (int nbChannels, QMap< int, int > &displayChannelsGroups, QMap< int, QValueList< int > > &displayGroupsChannels, QMap< int, bool > &skipStatus)
 Returns the anatomical description.
void getSpikeDescription (int nbChannels, QMap< int, int > &spikeChannelsGroups, QMap< int, QValueList< int > > &spikeGroupsChannels)
 Returns the spike description.
int getNbSamples () const
 Returns the number of samples in a spike, or zero if the element could not be found in the file.
float getWaveformLength () const
 Returns the length for a spike, or zero if the corresponding information could not be found in the file.
int getPeakSampleIndex () const
 Returns the sample index corresponding to the peak of the spike, or zero if the element could not be found in the file.
float getPeakSampleLength () const
 Returns the Length corresponding to the index of the spike peak, or zero if the corresponding could not be found in the file.
QValueList< SessionFilegetFilesToLoad ()
 Returns the list of files which where loaded in the last session, cluster, spike or event files.
QValueList< DisplayInformationgetDisplayInformation ()
 Returns the list of DisplayInformation, class given the information on a display.
QMap< QString, double > getSampleRateByExtension ()
 A base file name can be used for different kind of files corresponding to the same data and having different sampling rates.
int getVideoWidth () const
 Returns the video image width.
int getVideoHeight () const
 Returns the video image height.
int getRotation () const
 Returns the video image rotation angle (0,90,180,270).
int getFlip () const
 Returns the video image flip orientation.
int getTrajectory () const
 All the positions contained in a position file can be used to create a background image for the PositionView.
QString getBackgroundImage () const
 Gets the url of the background image.
QString getTraceBackgroundImage () const
 Gets the url of the background image use for the trace view.
QString getVersion () const
 Returns the version of current file.
NeuroscopeXmlReader::fileType getType () const
 Returns the version of current file.
bool parseFile (const KURL &url, fileType type)
 Opens and parses the file with the url.
void closeFile ()
 Closes the currently open file.
int getResolution () const
 Returns the resolution in bits.
int getNbChannels () const
 Returns the number of channels.
double getSamplingRate () const
 Returns the sampling rate of the system in hertz.
double getUpsamplingRate () const
 Returns the sampling rate used to upsample the waveforms.
double getLfpInformation () const
 Returns the local field potential sampling rate in hertz.
float getScreenGain () const
 Returns the screen gain in milivolts by centimeters used to display the field potentiels or zero if the element could not be found in the file.
int getVoltageRange () const
 Returns the voltage range of the acquisition system in volts, or zero if the element could not be found in the file.
int getAmplification () const
 Returns the amplification of the acquisition system, or zero if the element could not be found in the file.
int getOffset () const
 Returns the offset store in the session file, or zero if the element could not be found in the file.
QValueList< ChannelDescriptiongetChannelDescription ()
 Returns the list of ChannelDescription, class given the color for each channel.
void getChannelDefaultOffset (QMap< int, int > &channelDefaultOffsets)
 Returns the list of channel default offsets.
void getAnatomicalDescription (int nbChannels, QMap< int, int > &displayChannelsGroups, QMap< int, QValueList< int > > &displayGroupsChannels, QMap< int, bool > &skipStatus)
 Returns the anatomical description.
void getSpikeDescription (int nbChannels, QMap< int, int > &spikeChannelsGroups, QMap< int, QValueList< int > > &spikeGroupsChannels)
 Returns the spike description.
int getNbSamples () const
 Returns the number of samples in a spike, or zero if the element could not be found in the file.
float getWaveformLength () const
 Returns the length for a spike, or zero if the corresponding information could not be found in the file.
int getPeakSampleIndex () const
 Returns the sample index corresponding to the peak of the spike, or zero if the element could not be found in the file.
float getPeakSampleLength () const
 Returns the Length corresponding to the index of the spike peak, or zero if the corresponding could not be found in the file.
QValueList< SessionFilegetFilesToLoad ()
 Returns the list of files which where loaded in the last session, cluster, spike or event files.
QValueList< DisplayInformationgetDisplayInformation ()
 Returns the list of DisplayInformation, class given the information on a display.
QMap< QString, double > getSampleRateByExtension ()
 A base file name can be used for different kind of files corresponding to the same data and having different sampling rates.
int getVideoWidth () const
 Returns the video image width.
int getVideoHeight () const
 Returns the video image height.
int getRotation () const
 Returns the video image rotation angle (0,90,180,270).
int getFlip () const
 Returns the video image flip orientation.
int getTrajectory () const
 All the positions contained in a position file can be used to create a background image for the PositionView.
QString getBackgroundImage () const
 Gets the url of the background image.
QString getTraceBackgroundImage () const
 Gets the url of the background image use for the trace view.
QString getVersion () const
 Returns the version of current file.
NeuroscopeXmlReader::fileType getType () const
 Returns the version of current file.


Detailed Description

Class reading the parameter and session xml file.

Author:
Lynn Hazan


Member Function Documentation

bool NeuroscopeXmlReader::parseFile ( const KURL &  url,
fileType  type 
)

Opens and parses the file with the url.

Parameters:
url url of the file to open.
type type of the xml file to open.
Returns:
true if the file was correctly parse, false othewise.

int NeuroscopeXmlReader::getResolution (  )  const

Returns the resolution in bits.

Returns:
resolution.

int NeuroscopeXmlReader::getNbChannels (  )  const

Returns the number of channels.

Returns:
number of channels.

double NeuroscopeXmlReader::getSamplingRate (  )  const

Returns the sampling rate of the system in hertz.

Returns:
sampling rate in hertz.

double NeuroscopeXmlReader::getUpsamplingRate (  )  const

Returns the sampling rate used to upsample the waveforms.

Returns:
upsampling rate in hertz.

double NeuroscopeXmlReader::getLfpInformation (  )  const

Returns the local field potential sampling rate in hertz.

Returns:
local field potential sampling rate in hertz.

float NeuroscopeXmlReader::getScreenGain (  )  const

Returns the screen gain in milivolts by centimeters used to display the field potentiels or zero if the element could not be found in the file.

Returns:
the screen gain.

int NeuroscopeXmlReader::getVoltageRange (  )  const

Returns the voltage range of the acquisition system in volts, or zero if the element could not be found in the file.

Returns:
the voltage range.

int NeuroscopeXmlReader::getAmplification (  )  const

Returns the amplification of the acquisition system, or zero if the element could not be found in the file.

Returns:
the amplification.

int NeuroscopeXmlReader::getOffset (  )  const

Returns the offset store in the session file, or zero if the element could not be found in the file.

Returns:
offset.

QValueList< ChannelDescription > NeuroscopeXmlReader::getChannelDescription (  ) 

Returns the list of ChannelDescription, class given the color for each channel.

Returns:
list of ChannelDescription.

void NeuroscopeXmlReader::getChannelDefaultOffset ( QMap< int, int > &  channelDefaultOffsets  ) 

Returns the list of channel default offsets.

Parameters:
channelDefaultOffsets empty map to be filled with the channel default offsets.

void NeuroscopeXmlReader::getAnatomicalDescription ( int  nbChannels,
QMap< int, int > &  displayChannelsGroups,
QMap< int, QValueList< int > > &  displayGroupsChannels,
QMap< int, bool > &  skipStatus 
)

Returns the anatomical description.

Parameters:
nbChannels total number of channels.
displayChannelsGroups reference to the map given the correspondance between the channel ids and the display group ids.
displayGroupsChannels reference to the map given the correspondance between the display group ids and the channel ids.
skipStatus reference to the map given the correspondance between the channels and their skip status.

void NeuroscopeXmlReader::getSpikeDescription ( int  nbChannels,
QMap< int, int > &  spikeChannelsGroups,
QMap< int, QValueList< int > > &  spikeGroupsChannels 
)

Returns the spike description.

Parameters:
nbChannels total number of channels.
spikeChannelsGroups reference to the map given the correspondance between the channel ids and the spike group ids.
spikeGroupsChannels reference to the map given the correspondance between the spike group ids and the channel ids.

int NeuroscopeXmlReader::getNbSamples (  )  const

Returns the number of samples in a spike, or zero if the element could not be found in the file.

Returns:
number of samples.

float NeuroscopeXmlReader::getWaveformLength (  )  const

Returns the length for a spike, or zero if the corresponding information could not be found in the file.

Returns:
length of a spike in miliseconds.

int NeuroscopeXmlReader::getPeakSampleIndex (  )  const

Returns the sample index corresponding to the peak of the spike, or zero if the element could not be found in the file.

Returns:
index.

float NeuroscopeXmlReader::getPeakSampleLength (  )  const

Returns the Length corresponding to the index of the spike peak, or zero if the corresponding could not be found in the file.

Returns:
length of the index of the peak index in miliseconds.

QValueList< SessionFile > NeuroscopeXmlReader::getFilesToLoad (  ) 

Returns the list of files which where loaded in the last session, cluster, spike or event files.

Returns:
list of the files to load.

QValueList< DisplayInformation > NeuroscopeXmlReader::getDisplayInformation (  ) 

Returns the list of DisplayInformation, class given the information on a display.

Returns:
list of DisplayInformation.

QMap< QString, double > NeuroscopeXmlReader::getSampleRateByExtension (  ) 

A base file name can be used for different kind of files corresponding to the same data and having different sampling rates.

Each file is identified by its extension. this function returns the map of the file extensions with the sampling rates for the current document. This map does not includes the sampling rates for the extension dat and eeg, they treated separately.

Returns:
map between file extension and the sampling rate.

int NeuroscopeXmlReader::getVideoWidth (  )  const

Returns the video image width.

Returns:
width.

int NeuroscopeXmlReader::getVideoHeight (  )  const

Returns the video image height.

Returns:
height.

int NeuroscopeXmlReader::getRotation (  )  const

Returns the video image rotation angle (0,90,180,270).

The angle is counted counterclockwise.

Returns:
rotation angle.

int NeuroscopeXmlReader::getFlip (  )  const

Returns the video image flip orientation.

0 stands for none, 1 for vertical and 2 for horizontal.

Returns:
flip orientation.

int NeuroscopeXmlReader::getTrajectory (  )  const

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.

Returns:
1 if the all the positions contain in the position file have to be drawn on the background, 0 otherwise.

QString NeuroscopeXmlReader::getBackgroundImage (  )  const

Gets the url of the background image.

Returns:
the url of the background image, an empty string if no background has been choosen and a dash if the entry does not exist in the file.

QString NeuroscopeXmlReader::getTraceBackgroundImage (  )  const

Gets the url of the background image use for the trace view.

Returns:
the url of the background image use for the trace view, an empty string if no background has been choosen and a dash if the entry does not exist in the file.

QString NeuroscopeXmlReader::getVersion (  )  const [inline]

Returns the version of current file.

Returns:
version.

NeuroscopeXmlReader::fileType NeuroscopeXmlReader::getType (  )  const [inline]

Returns the version of current file.

Returns:
version.

bool NeuroscopeXmlReader::parseFile ( const KURL &  url,
fileType  type 
)

Opens and parses the file with the url.

Parameters:
url url of the file to open.
type type of the xml file to open.
Returns:
true if the file was correctly parse, false othewise.

int NeuroscopeXmlReader::getResolution (  )  const

Returns the resolution in bits.

Returns:
resolution.

int NeuroscopeXmlReader::getNbChannels (  )  const

Returns the number of channels.

Returns:
number of channels.

double NeuroscopeXmlReader::getSamplingRate (  )  const

Returns the sampling rate of the system in hertz.

Returns:
sampling rate in hertz.

double NeuroscopeXmlReader::getUpsamplingRate (  )  const

Returns the sampling rate used to upsample the waveforms.

Returns:
upsampling rate in hertz.

double NeuroscopeXmlReader::getLfpInformation (  )  const

Returns the local field potential sampling rate in hertz.

Returns:
local field potential sampling rate in hertz.

float NeuroscopeXmlReader::getScreenGain (  )  const

Returns the screen gain in milivolts by centimeters used to display the field potentiels or zero if the element could not be found in the file.

Returns:
the screen gain.

int NeuroscopeXmlReader::getVoltageRange (  )  const

Returns the voltage range of the acquisition system in volts, or zero if the element could not be found in the file.

Returns:
the voltage range.

int NeuroscopeXmlReader::getAmplification (  )  const

Returns the amplification of the acquisition system, or zero if the element could not be found in the file.

Returns:
the amplification.

int NeuroscopeXmlReader::getOffset (  )  const

Returns the offset store in the session file, or zero if the element could not be found in the file.

Returns:
offset.

QValueList<ChannelDescription> NeuroscopeXmlReader::getChannelDescription (  ) 

Returns the list of ChannelDescription, class given the color for each channel.

Returns:
list of ChannelDescription.

void NeuroscopeXmlReader::getChannelDefaultOffset ( QMap< int, int > &  channelDefaultOffsets  ) 

Returns the list of channel default offsets.

Parameters:
channelDefaultOffsets empty map to be filled with the channel default offsets.

void NeuroscopeXmlReader::getAnatomicalDescription ( int  nbChannels,
QMap< int, int > &  displayChannelsGroups,
QMap< int, QValueList< int > > &  displayGroupsChannels,
QMap< int, bool > &  skipStatus 
)

Returns the anatomical description.

Parameters:
nbChannels total number of channels.
displayChannelsGroups reference to the map given the correspondance between the channel ids and the display group ids.
displayGroupsChannels reference to the map given the correspondance between the display group ids and the channel ids.
skipStatus reference to the map given the correspondance between the channels and their skip status.

void NeuroscopeXmlReader::getSpikeDescription ( int  nbChannels,
QMap< int, int > &  spikeChannelsGroups,
QMap< int, QValueList< int > > &  spikeGroupsChannels 
)

Returns the spike description.

Parameters:
nbChannels total number of channels.
spikeChannelsGroups reference to the map given the correspondance between the channel ids and the spike group ids.
spikeGroupsChannels reference to the map given the correspondance between the spike group ids and the channel ids.

int NeuroscopeXmlReader::getNbSamples (  )  const

Returns the number of samples in a spike, or zero if the element could not be found in the file.

Returns:
number of samples.

float NeuroscopeXmlReader::getWaveformLength (  )  const

Returns the length for a spike, or zero if the corresponding information could not be found in the file.

Returns:
length of a spike in miliseconds.

int NeuroscopeXmlReader::getPeakSampleIndex (  )  const

Returns the sample index corresponding to the peak of the spike, or zero if the element could not be found in the file.

Returns:
index.

float NeuroscopeXmlReader::getPeakSampleLength (  )  const

Returns the Length corresponding to the index of the spike peak, or zero if the corresponding could not be found in the file.

Returns:
length of the index of the peak index in miliseconds.

QValueList<SessionFile> NeuroscopeXmlReader::getFilesToLoad (  ) 

Returns the list of files which where loaded in the last session, cluster, spike or event files.

Returns:
list of the files to load.

QValueList<DisplayInformation> NeuroscopeXmlReader::getDisplayInformation (  ) 

Returns the list of DisplayInformation, class given the information on a display.

Returns:
list of DisplayInformation.

QMap<QString,double> NeuroscopeXmlReader::getSampleRateByExtension (  ) 

A base file name can be used for different kind of files corresponding to the same data and having different sampling rates.

Each file is identified by its extension. this function returns the map of the file extensions with the sampling rates for the current document. This map does not includes the sampling rates for the extension dat and eeg, they treated separately.

Returns:
map between file extension and the sampling rate.

int NeuroscopeXmlReader::getVideoWidth (  )  const

Returns the video image width.

Returns:
width.

int NeuroscopeXmlReader::getVideoHeight (  )  const

Returns the video image height.

Returns:
height.

int NeuroscopeXmlReader::getRotation (  )  const

Returns the video image rotation angle (0,90,180,270).

The angle is counted counterclockwise.

Returns:
rotation angle.

int NeuroscopeXmlReader::getFlip (  )  const

Returns the video image flip orientation.

0 stands for none, 1 for vertical and 2 for horizontal.

Returns:
flip orientation.

int NeuroscopeXmlReader::getTrajectory (  )  const

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.

Returns:
1 if the all the positions contain in the position file have to be drawn on the background, 0 otherwise.

QString NeuroscopeXmlReader::getBackgroundImage (  )  const

Gets the url of the background image.

Returns:
the url of the background image, an empty string if no background has been choosen and a dash if the entry does not exist in the file.

QString NeuroscopeXmlReader::getTraceBackgroundImage (  )  const

Gets the url of the background image use for the trace view.

Returns:
the url of the background image use for the trace view, an empty string if no background has been choosen and a dash if the entry does not exist in the file.

QString NeuroscopeXmlReader::getVersion (  )  const [inline]

Returns the version of current file.

Returns:
version.

NeuroscopeXmlReader::fileType NeuroscopeXmlReader::getType (  )  const [inline]

Returns the version of current file.

Returns:
version.


The documentation for this class was generated from the following files:
Generated on Mon Sep 17 20:47:34 2007 for NeuroScope by  doxygen 1.5.1