#include <parameterxmlcreator.h>
Public Member Functions | |
ParameterXmlCreator () | |
Constructor which will create a parameter file. | |
bool | writeTofile (const KURL &url) |
Writes the xml tree to a parameter file given by url . | |
void | setAcquisitionSystemInformation (int resolution, int nbChannels, double samplingRate, int voltageRange, int amplification, int offset) |
Creates the elements related to the acquisition system. | |
void | setLfpInformation (double lfpSamplingRate) |
Creates the element related to the field potentials. | |
void | setMiscellaneousInformation (float screenGain, QString traceBackgroundImage) |
Creates the elements containing NeuroScope miscellaneous information. | |
void | setChannelDisplayInformation (ChannelColors *channelColors, QMap< int, int > &channelsGroups, QMap< int, int > &channelDefaultOffsets) |
Creates the elements related to the channels colors. | |
void | setAnatomicalDescription (QMap< int, QValueList< int > > &anatomicalGroups, QMap< int, bool > skipStatus) |
Creates the elements related to the anatomical description. | |
void | setSpikeDetectionInformation (int nbSamples, int peakSampleIndex, QMap< int, QValueList< int > > &spikeGroups) |
Creates the elements related to the spike detection. | |
void | setSpikeDetectionInformation (QMap< int, QValueList< int > > &spikeGroups) |
Creates the elements related to the spike detection. | |
void | setNeuroscopeVideoInformation (int rotation, int flip, QString backgroundPath, int drawTrajectory) |
Creates the elements containing the video information of the neuroscope element. | |
void | setVideoInformation (int width, int height) |
Creates the elements containing the video information. | |
void | setSampleRateByExtension (QMap< QString, double > extensionSamplingRates) |
A base file name can be used for different kind of files corresponding to the same data and having different sampling rates. | |
ParameterXmlCreator () | |
Constructor which will create a parameter file. | |
bool | writeTofile (const KURL &url) |
Writes the xml tree to a parameter file given by url . | |
void | setAcquisitionSystemInformation (int resolution, int nbChannels, double samplingRate, int voltageRange, int amplification, int offset) |
Creates the elements related to the acquisition system. | |
void | setLfpInformation (double lfpSamplingRate) |
Creates the element related to the field potentials. | |
void | setMiscellaneousInformation (float screenGain, QString traceBackgroundImage) |
Creates the elements containing NeuroScope miscellaneous information. | |
void | setChannelDisplayInformation (ChannelColors *channelColors, QMap< int, int > &channelsGroups, QMap< int, int > &channelDefaultOffsets) |
Creates the elements related to the channels colors. | |
void | setAnatomicalDescription (QMap< int, QValueList< int > > &anatomicalGroups, QMap< int, bool > skipStatus) |
Creates the elements related to the anatomical description. | |
void | setSpikeDetectionInformation (int nbSamples, int peakSampleIndex, QMap< int, QValueList< int > > &spikeGroups) |
Creates the elements related to the spike detection. | |
void | setSpikeDetectionInformation (QMap< int, QValueList< int > > &spikeGroups) |
Creates the elements related to the spike detection. | |
void | setNeuroscopeVideoInformation (int rotation, int flip, QString backgroundPath, int drawTrajectory) |
Creates the elements containing the video information of the neuroscope element. | |
void | setVideoInformation (int width, int height) |
Creates the elements containing the video information. | |
void | setSampleRateByExtension (QMap< QString, double > extensionSamplingRates) |
A base file name can be used for different kind of files corresponding to the same data and having different sampling rates. |
bool ParameterXmlCreator::writeTofile | ( | const KURL & | url | ) |
Writes the xml tree to a parameter file given by url
.
url | url of the file to write to. |
void ParameterXmlCreator::setAcquisitionSystemInformation | ( | int | resolution, | |
int | nbChannels, | |||
double | samplingRate, | |||
int | voltageRange, | |||
int | amplification, | |||
int | offset | |||
) |
Creates the elements related to the acquisition system.
resolution | resolution of the system in bits. | |
nbChannels | number of channels. | |
samplingRate | the sampling rate in hertz. | |
voltageRange | voltage range of the acquisition system in volts.oltage range of the acquisition system in volts. | |
amplification | amplification of the acquisition system. | |
offset | initial offset for all the traces. |
void ParameterXmlCreator::setLfpInformation | ( | double | lfpSamplingRate | ) |
Creates the element related to the field potentials.
lfpSamplingRate | local field potential sampling rate in hertz. |
void ParameterXmlCreator::setMiscellaneousInformation | ( | float | screenGain, | |
QString | traceBackgroundImage | |||
) |
Creates the elements containing NeuroScope miscellaneous information.
screenGain | screen gain in milivolts by centimeters used to display the field potentiels. | |
traceBackgroundImage | image used as background for the trace view. |
void ParameterXmlCreator::setChannelDisplayInformation | ( | ChannelColors * | channelColors, | |
QMap< int, int > & | channelsGroups, | |||
QMap< int, int > & | channelDefaultOffsets | |||
) |
Creates the elements related to the channels colors.
channelColors | list of colors for the channels (color use to display the channel, color of the anatomical group to which the channel belongs, color of the spike group to which the channel belongs). | |
channelsGroups | map given to which group each channel belongs. | |
channelDefaultOffsets | map given the default channel offsets. |
void ParameterXmlCreator::setAnatomicalDescription | ( | QMap< int, QValueList< int > > & | anatomicalGroups, | |
QMap< int, bool > | skipStatus | |||
) |
Creates the elements related to the anatomical description.
anatomicalGroups | map given to which anatomical group each channel belongs. | |
skipStatus | map given the skip status of the channels. |
void ParameterXmlCreator::setSpikeDetectionInformation | ( | int | nbSamples, | |
int | peakSampleIndex, | |||
QMap< int, QValueList< int > > & | spikeGroups | |||
) |
Creates the elements related to the spike detection.
nbSamples | number of samples in a spike. | |
peakSampleIndex | sample index corresponding to the peak of the spike. | |
spikeGroups | map given to which spike group each channel belongs. |
void ParameterXmlCreator::setSpikeDetectionInformation | ( | QMap< int, QValueList< int > > & | spikeGroups | ) |
Creates the elements related to the spike detection.
spikeGroups | map given to which spike group each channel belongs. |
void ParameterXmlCreator::setNeuroscopeVideoInformation | ( | int | rotation, | |
int | flip, | |||
QString | backgroundPath, | |||
int | drawTrajectory | |||
) |
Creates the elements containing the video information of the neuroscope element.
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
backgroundPath | path of the background image. | |
drawTrajectory | all the positions contained in a position file can be used to create a background image for the PositionView. This value tells if such background has to be created. |
void ParameterXmlCreator::setVideoInformation | ( | int | width, | |
int | height | |||
) |
Creates the elements containing the video information.
width | video image width. | |
height | video image height. |
void ParameterXmlCreator::setSampleRateByExtension | ( | QMap< QString, double > | extensionSamplingRates | ) |
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 creates the elements related to the mapping between 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 are treated separately.
extensionSamplingRates | map between file extension and the sampling rate. |
bool ParameterXmlCreator::writeTofile | ( | const KURL & | url | ) |
Writes the xml tree to a parameter file given by url
.
url | url of the file to write to. |
void ParameterXmlCreator::setAcquisitionSystemInformation | ( | int | resolution, | |
int | nbChannels, | |||
double | samplingRate, | |||
int | voltageRange, | |||
int | amplification, | |||
int | offset | |||
) |
Creates the elements related to the acquisition system.
resolution | resolution of the system in bits. | |
nbChannels | number of channels. | |
samplingRate | the sampling rate in hertz. | |
voltageRange | voltage range of the acquisition system in volts.oltage range of the acquisition system in volts. | |
amplification | amplification of the acquisition system. | |
offset | initial offset for all the traces. |
void ParameterXmlCreator::setLfpInformation | ( | double | lfpSamplingRate | ) |
Creates the element related to the field potentials.
lfpSamplingRate | local field potential sampling rate in hertz. |
void ParameterXmlCreator::setMiscellaneousInformation | ( | float | screenGain, | |
QString | traceBackgroundImage | |||
) |
Creates the elements containing NeuroScope miscellaneous information.
screenGain | screen gain in milivolts by centimeters used to display the field potentiels. | |
traceBackgroundImage | image used as background for the trace view. |
void ParameterXmlCreator::setChannelDisplayInformation | ( | ChannelColors * | channelColors, | |
QMap< int, int > & | channelsGroups, | |||
QMap< int, int > & | channelDefaultOffsets | |||
) |
Creates the elements related to the channels colors.
channelColors | list of colors for the channels (color use to display the channel, color of the anatomical group to which the channel belongs, color of the spike group to which the channel belongs). | |
channelsGroups | map given to which group each channel belongs. | |
channelDefaultOffsets | map given the default channel offsets. |
void ParameterXmlCreator::setAnatomicalDescription | ( | QMap< int, QValueList< int > > & | anatomicalGroups, | |
QMap< int, bool > | skipStatus | |||
) |
Creates the elements related to the anatomical description.
anatomicalGroups | map given to which anatomical group each channel belongs. | |
skipStatus | map given the skip status of the channels. |
void ParameterXmlCreator::setSpikeDetectionInformation | ( | int | nbSamples, | |
int | peakSampleIndex, | |||
QMap< int, QValueList< int > > & | spikeGroups | |||
) |
Creates the elements related to the spike detection.
nbSamples | number of samples in a spike. | |
peakSampleIndex | sample index corresponding to the peak of the spike. | |
spikeGroups | map given to which spike group each channel belongs. |
void ParameterXmlCreator::setSpikeDetectionInformation | ( | QMap< int, QValueList< int > > & | spikeGroups | ) |
Creates the elements related to the spike detection.
spikeGroups | map given to which spike group each channel belongs. |
void ParameterXmlCreator::setNeuroscopeVideoInformation | ( | int | rotation, | |
int | flip, | |||
QString | backgroundPath, | |||
int | drawTrajectory | |||
) |
Creates the elements containing the video information of the neuroscope element.
rotation | video image rotation angle. | |
flip | video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal. | |
backgroundPath | path of the background image. | |
drawTrajectory | all the positions contained in a position file can be used to create a background image for the PositionView. This value tells if such background has to be created. |
void ParameterXmlCreator::setVideoInformation | ( | int | width, | |
int | height | |||
) |
Creates the elements containing the video information.
width | video image width. | |
height | video image height. |
void ParameterXmlCreator::setSampleRateByExtension | ( | QMap< QString, double > | extensionSamplingRates | ) |
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 creates the elements related to the mapping between 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 are treated separately.
extensionSamplingRates | map between file extension and the sampling rate. |