The Document
interface contains all properties and methods of objects of a FMR/VMR/AMR
project (=document)
-
Public
Methods
-
PathName()
-
Gets
the name of a project.
PathName(string
value)
-
Sets
the name of a project.
MapThreshold()
-
Gets
the statistical threshold used in subsequent commands visualizing statistical
maps.
MapThreshold(number
value)
-
Sets
the statistical threshold used in subsequent commands visualizing statistical
maps.
MapClusterSize()
-
Valid
only if objDocument is of type FMR or VMR.
PixelSizeOfInplaneX()
-
Resolution
of one pixel in x dimension [mm]
PixelSizeOfInplaneY()
-
Resolution
of one pixel in y dimension [mm]
SliceThickness()
-
Get
slice thickness without slice gap [mm]
SliceThickness(number
value)
-
Set
slice thickness without slice gap [mm]
GapThickness()
-
Get
slice thickness without slice gap [mm]
GapThickness(number
value)
-
Set
slice thickness without slice gap [mm]
TR()
-
Gets
TR of FMR project
TR(number
value)
-
Sets
TR of fmr-project
InterSliceTime()
-
Gets
or set InterSliceTime of fmr-project
TimeResolutionVerified()
-
Get
flag ensuring that "TR" and "IST" are correct
TimeResolutionVerified(number
value)
-
Set
flag ensuring that "TR" and "IST" are correct
VoxelResolutionVerified([out,
retval] number* value)
-
Get
flag ensuring that pixel resolution values are correct
VoxelResolutionVerified(number
value)
-
Set
flag ensuring that pixel resolution values are correct
FileNameOfPreprocessdFMR()
-
Property
of preprocessed fmr-project, generated by BrainVoyager; non-preprocessed
fmr-project still exists
StimulationProtocolResolution()
-
Gets
time resolution of stimulation protocol in msec or volumes
StimulationProtocolResolution(number
value)
-
Sets
time resolution of stimulation protocol in msec or volumes
NrOfStimulationProtocolConditions()
-
Gets
or sets the number of stimulation protocol conditions
StimulationProtocolExperimentName()
-
Gets
the experiment name as defined in the stimulation protocol
StimulationProtocolExperimentName(string
value)
-
Sets
the experiment name in the stimulation protocol
StimulationProtocolBackgroundColorR()
-
Gets
the 'Red' dimension of stimulation protocol background color; value between
0 and 255.
StimulationProtocolBackgroundColorR(number
value)
-
Sets
the 'Red' dimension of stimulation protocol background color; value between
0 and 255.
StimulationProtocolBackgroundColorG()
-
Gets
the 'Green' dimension of stimulation protocol background color; value
between 0 and 255.
StimulationProtocolBackgroundColorG(number
value)
-
Sets
the 'Green' dimension of stimulation protocol background color; value
between 0 and 255.
StimulationProtocolBackgroundColorB()
-
Gets
the 'Blue' dimension of stimulation protocol background color; value between
0 and 255.
StimulationProtocolBackgroundColorB(number
value)
-
Sets
the 'Blue' dimension of stimulation protocol background color; value between
0 and 255.
StimulationProtocolTextColorR()
-
Gets
the 'Red' dimension of stimulation protocol text color; value between
0 and 255.
StimulationProtocolTextColorR(number
value)
-
Sets
the 'Red' dimension of stimulation protocol text color; value between
0 and 255.
StimulationProtocolTextColorG()
-
Gets
the 'Green' dimension of stimulation protocol text color; value between
0 and 255.
StimulationProtocolTextColorG(number
value)
-
Sets
the 'Green' dimension of stimulation protocol text color; value between
0 and 255.
StimulationProtocolTextColorB()
-
Gets
the 'Blue' dimension of stimulation protocol text color; value between
0 and 255.
StimulationProtocolTextColorB(number
value)
-
Sets
the 'Blue' dimension of stimulation protocol text color; value between
0 and 255.
StimulationProtocolTimeCourseColorR()
-
Gets
the 'Red' dimension of the stimulation protocol time course color; value
between 0 and 255.
StimulationProtocolTimeCourseColorR(number
value)
-
Sets
the 'Red' dimension of the stimulation protocol time course color; value
between 0 and 255.
StimulationProtocolTimeCourseColorG()
-
Gets
the 'Green' dimension of the stimulation protocol time course color; value
between 0 and 255.
StimulationProtocolTimeCourseColorG(number
value)
-
Sets
the 'Green' dimension of the stimulation protocol time course color; value
between 0 and 255.
StimulationProtocolTimeCourseColorB()
-
Gets
the 'Blue' dimension of the stimulation protocol time course color; value
between 0 and 255.
StimulationProtocolTimeCourseColorB(number
value)
-
Sets
the 'Blue' dimension of the stimulation protocol time course color; value
between 0 and 255.
StimulationProtocolTimeCourseThickness()
-
Gets
thickness of line of response function
StimulationProtocolTimeCourseThickness(number
value)
-
Sets
thickness of line of response function
PositiveStatisticalValues()
-
Get
whether positive values on overlay statistical map are shown
PositiveStatisticalValues(number
value)
-
Set
whether positive values on overlay statistical map are shown
NegativeStatisticalValues()
-
Get
whether negative values on overlay statistical map are shown
NegativeStatisticalValues(number
value)
-
Set
whether negative values on overlay statistical map are shown
TwoSetContributionMaps()
-
Get
whether the two set contribution maps option should be used (Overlay GLM
contrasts dialog)
TwoSetContributionMaps(number
value)
-
Set
whether relative contribution should be used.
MatrixSizeX()
-
Gets
number of columns of slice image matrix
MatrixSizeY()
-
Gets
number of rows of slice image matrix
NrOfSlices()
-
Gets
number of slices per volume (scan)
NrOfSlices(number
value)
-
Sets
number of slices per volume (scan)
NrOfVolumes()
-
Gets
or sets number of volumes
NrOfSkippedVolumes([out,
retval] number* value)
-
Gets
number of skipped volumes
NrOfSkippedVolumes(number
value)
-
Sets
number of skipped volumes
SeparationOfSubjectPredictors()
-
GLM-property
SeparationOfStudyPredictors()
-
GLM-property
ZTransformationOfStudies()
-
Get
ZTransformationOfStudies; 1 -> time courses of runs have been z-transformed,
0 -> not.
ZTransformationOfStudies(number
value)
-
Set
ZTransformationOfStudies; 1 -> time courses of runs have been z-transformed,
0 -> not.
Save()
-
Saves
a BrainVoyager project file using the current file name
SaveAs(string
SaveAsFileName)
-
Saves
a BrainVoyager project file under a specifed file name.
Close()
-
Closes
a BrainVoyager project file.
Remove()
-
Method
Remove() is used to remove intermediate fmr-files while preprocessing.
RefreshView()
-
Repaints
the document's view which is a window showing an FMR, VMR or AMR project.
SetCrossPosition(
number x, number y, number z)
-
Sets
the current voxel.
SwitchToSurfaceModule()
-
Activates
the Surface Module window.
Show3DVolumeTools()
-
Shows
the 3D Volume Tools dialog.
Hide3DVolumeTools()
-
Hides
the 3D Volume Tools dialog.
LoadMesh(string
MeshFileName)
-
Loads
a surface mesh file.
SaveSnapshotOfSurfaceWindow(string
MeshFileName)
-
Makes
a snapshot of the surface module window.
AddMesh(string
MeshFileName)
-
Reads
a surface mesh file and adds it to the Surface Module window of the referenced
VMR document.
UpdateSurfaceWindow()
-
Repaints
the Surface Module window which is a window showing one or more surface
mesh files.
SetViewpointPosition(
number x, number y, number z)
-
Sets
the 3D position of the viewpoint from which the scene in the Surface Module
window is "seen".
ViewpointTranslationX(int
translX)
-
Move
the viewing direction from which the scene in the Surface Module window
is "seen" right or left.
ViewpointTranslationY(int
translY)
-
Move
the viewing direction from which the scene in the Surface Module window
is "seen" up or down.
ViewpointTranslationZ(int
translZ)
-
Move
the viewing direction from which the scene in the Surface Module window
is "seen" backward or forward.
ViewpointRotationX(int
rotX)
-
Rotate
the viewing direction from which the scene in the Surface Module window
around the X-axis (back to front in Talairach space) (in degrees (0-360)).
ViewpointRotationY(int
rotY)
-
Rotate
the viewing direction from which the scene in the Surface Module window
around the Y-axis (right to left in Talairach space) (in degrees (0-360)).
ViewpointRotationZ(int
rotZ)
-
Rotate
the viewing direction from which the scene in the Surface Module window
around the Z-axis (top to bottom in Talairach space) (in degrees (0-360)).
SliceMeshAxial(number
z)
-
Slices
a surface mesh parallel to the XY-plane at the specified Z-level.
SliceMeshCoronal(number
y)
-
Slices
a surface mesh parallel to the XZ-plane at the specified Y-level.
SliceMeshSagittal(number
x)
-
Slices
a surface mesh parallel to the YZ-plane at the specified X-level.
MeshSlicesOff()
-
Removes
all activated slices from the current mesh.
LoadViewingSettings(string
FileNameVWP)
-
Restores
surface module settings about the viewing position, angles, lightning
conditions previously stored to disk.
LoadGLM(string
FileNameGLM)
-
Loads
a file containg the results of a multiple regression (GLM) analysis.
RunGLMFromProtocol()
-
Compute
the General Linear Model with the linked protocol
SaveGLM(string
FileNameGLM)
-
Save
the computed General Linear Model with the provided name
ShowGLM()
-
Shows
statistical map based on selected predictors of a GLM superimposed on
(anatomical) reference images.
SelectPredictorInSet1(number
prednr)
-
Adds
a predictor into set1 of two sets available for display of multiple regression
(GLM) results.
SelectPredictorInSet2(number
prednr)
-
Adds
a predictor into set2 of two sets available for display of multiple regression
(GLM) results.
SelectAllPredictors()
-
Selects
all predictors of a multiple regression (GLM) result for display.
DeselectAllPredictors()
-
Deselects
all predictors of a multiple regression (GLM) result allowing to start
a new predictor selection process.
EnableTwoSetPredictorColours()
-
A
flag is set to show the relative contribution of the combined variance
explained by two sets of predictors in a multiple regression (GLM).
EnableTwoSetPredictorContrast()
-
Sets
the status of a flag to show the contrast between two sets of predictors
in a multiple regression (GLM).
SliceTimeCorrection(number
SliceSamplingType)
-
Most
EPI sequences measure the slices of a functional volume in succession
but one often would like to treat the data of one volume as if it were
acquired at the same time, particularly in the context of event-related
studies.
SliceTimeCorrectionEx(
number TR,
number InterSliceTime,
number SliceSamplingType, number SincInterpolation, string NewFMRFile,
string NewSTCPrefix)
-
Most EPI sequences
measure the slices of a functional volume in succession but one often
would like to treat the data of one volume as if it were acquired at the
same time, particularly in the context of event-related studies.
TemporalSmoothingFD2D(number
HighPass, number LowPass)
-
Filters in the
frequency domain the time series of each voxel in the STC files of an
FMR project.
TemporalSmoothingFD2DEx(
number HighPass, number LowPass, string NewFMRFile, string NewSTCPrefix)
-
Filters the time
series of each voxel in the STC files of an FMR project.
SpatialSmoothingFD2D(
number HighPass, number LowPass)
-
Spatially filters
each recorded image in the STC files of an FMR project in the frequency
domain.
SpatialSmoothingFD2DEx(
number HighPass, number LowPass, string NewFMRFile, string NewSTCPrefix)
-
Spatially filters
each recorded image in the STC files of an FMR project in the frequency
domain.
CreateVTC(
string FMRFile, string 2D3DTRFFile, string ACPCTRFFile, string TALFile,
string VTCFileName)
-
Transforms the
time course data of an FMR project into a defined 3D space, typically
Talairach space.
CorrectMotion(int
targetVolume)
-
Detects and corrects
rigid-body motion within an FMR file.
CorrectMotionTargetVolumeInOtherRun(str
intraSessionRunName, int targetVolume)
-
Detects and corrects
rigid-body motion within several runs.
TemporalSmoothingFD3D(
number HighPass, number LowPass)
-
Filters in the
frequency domain the time series of each voxel in a VTC file.
SpatialSmoothingFD3D(
number HighPass, number LowPass)
-
Spatially filters
each 3D volume of a VTC file in the frequency domain.
TemporalSmoothingFD3DEx(
number HighPass, number LowPass, string VTCFileNameIn, string VTCFileNameOut)
-
Filters the time
series of each voxel in a VTC file.
SpatialSmoothingFD3DEx(
number HighPass, number LowPass, string VTCFileNameIn, string VTCFileNameOut)
-
Spatially filters
each 3D volume of a VTC file in the frequency domain.
LinkVTC(
string VTCFileName, number LoadInMem)
-
Links a 3D time
course file (VTC) to a 3D anatomical project (VMR).
SetVoxelIntensity(
int x, int y, int z, int value)
-
Sets the intensity
value of the specified voxel in an VMR data set.
GetVoxelIntensity(
int x, int y, int z)
-
Gets the voxel
intensity of the voxel specified by the coordinates
SetLayoutRowsCols(
number NrOfRows, number NrOfCols)
-
Defines a grid
of rows and columns in which multiple images of an FMR or AMR project
are shown.
SetZoomLevel(number
ZoomLevel)
-
Sets the zoom
level of the view of a BrainVoyager project file (FMR, VMR, AMR).
ConvertFuncToAMR(string
AMRFileName)
-
Converts the
first functional volume of an FMR project into an AMR file.
LinkAMRFile(string
AMRFileName)
-
Links a (pseudo-)
anatomical AMR file to an FMR document.
LinkStimulationProtocol(string
ProtocolFileName)
-
Links a stimulation
protocol PRT file to an FMR project or a 3D volume time course VTC file.
BeginRecordingSurfaceWindowMovie(string
AVIMovieFileName)
-
Starts recording
every updated view in the Surface Module window and saves it to a movie
file.
EndRecordingSurfaceWindowMovie()
-
Stops recording
Surface Module window movie and closes the movie file.
ShowTimeCourseOfVoxel(
number x, number y, number z, string TCWinName)
-
Shows a time
course from a Region-Of-Interest of the currently linked VTC file.
ShowTimeCourseOfVoxelEx(
number x, number y, number z, string TCWinName, number SingleVoxel, number
tc_win_x, number tc_win_y, number tc_win_width, number tc_win_height,
number NewWin, number AddWin)
-
Shows a time
course from a Region-Of-Interest of the currently linked VTC file.
MoveTimeCoursePlot(
string TCWinName, number tc_win_x, number tc_win_y, number tc_win_width,
number tc_win_height)
-
Moves a previously
created time course window to a new screen position and changes its width
and height.
CloseTimeCoursePlot(string
TCWinName)
-
Closes a previously
created time course window.
CloseAllTimeCoursePlots()
-
Closes all previously
created time course windows.
ShowEventRelatedAverage(
string TCWinName, string AVGFile)
-
Averages events
as specified in an AVG file and shows the event-related averaging results
in a window.
ShowEventRelatedAverageEx(
string TCWinName, string AVGFile, number tc_win_x, number tc_win_y, number
tc_win_width, number tc_win_height)
-
Averages events
as specified in an AVG file and shows the event-related averaging results
in a window.
MoveEventRelatedAveragePlot(
string TCWinName, number tc_win_x, number tc_win_y, number tc_win_width,
number tc_win_height)
-
Moves a previously
created event-related averaging window to a new screen position and changes
its width and height.
CreateSphereMesh()
-
Creates a new
spherical mesh which can be used to reconstruct the skin of a subject's
head by iterative morphing.
RemoveBridges(string
SourceVMRFileName)
-
Remove topological
errors named 'handles' or 'bridges' (object produced by puncturing a surface
twice)
RemoveBridgesEx(
string SourceVMRFileName, int GreyMatterIntensity, int WhiteMatterIntensity,
int GMWMThreshold)
-
Remove topological
errors - extended version
PrepareBoundaryReconstruction()
-
This option guarantees
that the subsequent reconstruction process creates a valid 2D surface
(eg, without moebius bands).
ReconstructBoundary()
-
Creates a new
triangle mesh by reconstructing the boundary of a segmented data set.
MorphMesh(
number NrOfIterations, number ScreenUpdateIterations, number SmoothTau,
number VMRFindSurfTau, number VMRFindSurfValue, number SmoothingMode)
-
Morphs a created
or loaded mesh; typical applications are surface smoothing or skin reconstruction.
InflateMesh(
number NrOfIterations, number ScreenUpdateIterations, number SmoothTau,
string RefMesh)
-
Unfolds the sulci
of a folded mesh representing the cortical sheet of a hemisphere.
SaveMesh(string
MeshFileName)
-
Saves a surface
mesh file to disk.
ReverseSliceOrder()
-
Reverse the order
of the slices (*stc files) from ascending to descending
UninterleaveSliceOrder()
-
Change the interleaved
slices to continuous ascending or descending
SpatialGaussianSmoothing(
number FWHM, string UnitsFWHM)
-
Spatial Gaussian
smoothing for FMR projects
SpatialGaussianSmoothingEx(
number FWHM, string UnitsFWHM, number InSpaceDomain, number In3D, string
NewFMRFile, string NewSTCPrefix)
-
Spatial Gaussian
smoothing for FMR projects - extended version
TemporalGaussianSmoothing(
number FWHM, string UnitsFWHM)
-
Temporal Gaussian
smoothing
TemporalGaussianSmoothingEx(
number FWHM, string UnitsFWHM, number InTimeDomain, string NewFMRFile,
string NewSTCPrefix)
-
Temporal Gaussian
smoothing - extended version
LinearTrendRemoval()
-
Remove linear
drifts from the data
LinearTrendRemovalEx(
string NewFMRFile, string NewSTCPrefix)
-
Remove linear
drifts from the data - extended version
TemporalHighPassFilter(
number HighPassValue, string UnitsHighPass)
-
Apply a HighPassFilter
in the temporal domain; typically used with '2D' fmr files HighPassFiltered
fmr file is saved under name <previous_name>_THP<nr>c.
TemporalHighPassFilterEx(
number HighPassValue, string UnitsHighPass, string NewFMRFile, string
NewSTCPrefix)
-
Apply a HighPassFilter
in the temporal domain; typically used with '2D' fmr files HighPassFiltered
fmr file is saved under name <previous_name>_THP<nr>c.
ClearStimulationProtocol()
-
Used to start
a new stimulation protocol;
AddCondition(string
ConditionName)
-
Adds a condition
to a stimulation protocol
AddInterval(
string ConditionName, number IntervalStart, number IntervalEnd)
-
Add an interval
to a stimulation protocol.
SetConditionColor(
string ConditionName, number ColorR, number ColorG, number ColorB)
-
Sets the condition
color in stimulation protocol.
SaveStimulationProtocol(string
StimulationProtocolFileName)
-
Save the created
protocol.
ClearDesignMatrix()
-
Create a design
matrix.
AddPredictor(string
PredictorName)
-
Adds a predictor
to a design matrix Example: 'docAddPredictor "RVF"'
SetPredictorValuesFromCondition(
string PredictorName, string ConditionName, number ValueForConditionIntervals)
-
Set predictor
value for a condition in a design matrix.
SetPredictorValues(
string PredictorName, number IntervalStart, number IntervalEnd, number
ValueForInterval)
-
Set any predictor
value at any time point (interval) in a design matrix.
ApplyHemodynamicResponseFunctionToPredictor(string
PredictorName)
-
Apply the hemodynamic
response function to a predictor in a design matrix Example: 'docApplyHemodynamicResponseFunctionToPredictor
"RVF"'
LoadSingleStudyGLMDesignMatrix(string
DesignMatrixFileName)
-
Loads an existing
design matrix.
SaveSingleStudyGLMDesignMatrix(string
DesignMatrixFileName)
-
Save the single
study design matrix (reference time course, *rtc)
ComputeSingleStudyGLM()
-
Run the single
study GLM
ClearContrast()
-
Clear contrast
in design matrix
SetContrastValue(
string PredictorName, int ValueForContrastElement)
-
Define whether
a predictor is included in the model Example: 'docSetContrastValue "RVF",
-1'
ClearMultiStudyGLMDefinition()
-
Clear/create
multi study, multi subject GLM to specify study x predictor interaction
effects
AddStudyAndDesignMatrix(
string StudyFileName, string DesignMatrixFileName)
-
Add subject study
and design matrix to multi study, multi subject GLM
ComputeMultiStudyGLM(string
GLMFileName)
-
Run the multi
study, multi subject GLM
LoadMultiStudyGLMDefinitionFile(string
MultiStudyGLMDefinitionFileName)
-
Loads an existing
multi study, multi subject design matrix
SaveMultiStudyGLMDefinitionFile(string
MultiStudyGLMDefinitionFileName)
-
Saves a mulit
study, multi subject design matrix
Documentation
The
Document interface contains all properties and methods of objects of a
FMR/VMR/AMR project (=document)
PathName()
-
Gets
the name of a project. Works with all three project types. This property
keeps internally the full path plus file name of objDocument. If you specify
a filename without a path, the current pathway is used to define the full
file name. If you assign a new file name for this property and then save
the document (see below), the dcoument is saved under the new name. An
alternative method would be to call the SaveAs method.
-
- Returns:
-
pathName
-
PathName(string
value)
-
Sets
the name of a project. For more information: see get Pathname
-
- Parameters:
-
pathname
- Pathname of the project
-
MapThreshold()
-
Gets
the statistical threshold used in subsequent commands visualizing statistical
maps. Valid only if objDocument is of type FMR or VMR. The method retrieves
the value used by a document to threshold statistical maps.
-
- Returns:
-
thresholdvalue
(number)
-
MapThreshold(number
value)
-
Sets
the statistical threshold used in subsequent commands visualizing statistical
maps. Valid only if objDocument is of type FMR or VMR. The method sets
the value used by a document to threshold statistical maps.
-
- Parameters:
-
thresholdvalue
-
-
MapClusterSize()
-
Valid
only if objDocument is of type FMR or VMR. The property sets or retrieves
the cluster size used by objDocument to filter out all activated clusters
which do not reach the statistical threshold when a map is visualized,
i.e. by calling ShowGLM. The statistical threshold can be modified or
inspected using the MapThreshold property.
-
- Returns:
-
mapClusterSize
in voxels (number)
-
PixelSizeOfInplaneX()
-
Resolution
of one pixel in x dimension [mm]
-
- Returns:
-
x-Resolution
- Since:
-
4.6
-
PixelSizeOfInplaneY()
-
Resolution
of one pixel in y dimension [mm]
-
- Returns:
-
y-Resolution
- Since:
-
4.6
-
SliceThickness()
-
Get
slice thickness without slice gap [mm]
-
- Returns:
-
Slice
thickness
- Since:
-
4.6
-
SliceThickness(number
value)
-
Set
slice thickness without slice gap [mm]
-
- Parameters:
-
-
SliceThickness
in mm
- Since:
-
4.6
-
GapThickness()
-
Get
slice thickness without slice gap [mm]
-
- Returns:
-
GapThickness
in mm
-
GapThickness(number
value)
-
Set
slice thickness without slice gap [mm]
-
- Parameters:
-
-
GapThickness
in mm
-
TR()
-
Gets
TR of FMR project
-
- Returns:
-
TR
Time of Repetition in msec
- Since:
-
4.6
-
TR(number
value)
-
Sets
TR of fmr-project
-
- Parameters:
-
-
TR
Time of Repetition in msec
- Since:
-
4.6
-
InterSliceTime()
-
Gets
or set InterSliceTime of fmr-project
-
- Returns:
-
Inter
slice time (IST) in msec
- Since:
-
4.6
-
TimeResolutionVerified()
-
Get
flag ensuring that "TR" and "IST" are correct
-
- Returns:
-
TimeResolutionVerified,
boolean (0 or 1)
- Since:
-
4.6
-
TimeResolutionVerified(number
value)
-
Set
flag ensuring that "TR" and "IST" are correct
-
- Parameters:
-
-
TimeResolutionVerified
boolean (0 or 1)
- Since:
-
4.6
-
VoxelResolutionVerified([out,
retval] number* value)
-
Get
flag ensuring that pixel resolution values are correct
-
- Returns:
-
VoxelResolutionVerified
boolean (0 or 1)
- Since:
-
4.6
-
VoxelResolutionVerified(number
value)
-
Set
flag ensuring that pixel resolution values are correct
-
- Parameters:
-
-
VoxelResolutionVerified
boolean (0 or 1)
- Since:
-
4.6
-
FileNameOfPreprocessdFMR()
-
Property
of preprocessed fmr-project, generated by BrainVoyager; non-preprocessed
fmr-project still exists
-
- Returns:
-
Filename
of preprocessed FMR
-
StimulationProtocolResolution()
-
Gets
time resolution of stimulation protocol in msec or volumes
-
- Returns:
-
Volumes_or_msec,
1 = volumes, 2 = msec
- Since:
-
4.2
-
StimulationProtocolResolution(number
value)
-
Sets
time resolution of stimulation protocol in msec or volumes
-
- Parameters:
-
Volumes_or_msec
- , 1 = volumes, 2 = msec
- Since:
-
4.2
-
NrOfStimulationProtocolConditions()
-
Gets
or sets the number of stimulation protocol conditions
-
- Returns:
-
Number
of conditions within run (integer)
-
StimulationProtocolExperimentName()
-
Gets
the experiment name as defined in the stimulation protocol
-
- Returns:
-
stimulation
protocol experiment name
-
StimulationProtocolExperimentName(string
value)
-
Sets
the experiment name in the stimulation protocol
-
- Parameters:
-
stimulation
- protocol experiment name
-
StimulationProtocolBackgroundColorR()
-
Gets
the 'Red' dimension of stimulation protocol background color; value between
0 and 255.
-
- Returns:
-
red
hue
-
StimulationProtocolBackgroundColorR(number
value)
-
Sets
the 'Red' dimension of stimulation protocol background color; value between
0 and 255.
-
- Parameters:
-
redIntensity
- intensity of red
-
StimulationProtocolBackgroundColorG()
-
Gets
the 'Green' dimension of stimulation protocol background color; value
between 0 and 255.
-
- Returns:
-
greenIntensity
intensity of green
-
StimulationProtocolBackgroundColorG(number
value)
-
Sets
the 'Green' dimension of stimulation protocol background color; value
between 0 and 255.
-
- Parameters:
-
greenIntensity
- intensity of green
-
StimulationProtocolBackgroundColorB()
-
Gets
the 'Blue' dimension of stimulation protocol background color; value between
0 and 255.
-
- Returns:
-
blueIntensity
intensity of blue
-
StimulationProtocolBackgroundColorB(number
value)
-
Sets
the 'Blue' dimension of stimulation protocol background color; value between
0 and 255.
-
- Parameters:
-
blueIntensity
- intensity of blue
-
StimulationProtocolTextColorR()
-
Gets
the 'Red' dimension of stimulation protocol text color; value between
0 and 255.
-
- Returns:
-
redIntensity
intensity of red
-
StimulationProtocolTextColorR(number
value)
-
Sets
the 'Red' dimension of stimulation protocol text color; value between
0 and 255.
-
- Parameters:
-
redIntensity
- intensity of red
-
StimulationProtocolTextColorG()
-
Gets
the 'Green' dimension of stimulation protocol text color; value between
0 and 255.
-
- Returns:
-
greenIntensity
intensity of green
-
StimulationProtocolTextColorG(number
value)
-
Sets
the 'Green' dimension of stimulation protocol text color; value between
0 and 255.
-
- Parameters:
-
greenIntensity
- intensity of green
-
StimulationProtocolTextColorB()
-
Gets
the 'Blue' dimension of stimulation protocol text color; value between
0 and 255.
-
- Returns:
-
blueIntensity
intensity of blue
-
StimulationProtocolTextColorB(number
value)
-
Sets
the 'Blue' dimension of stimulation protocol text color; value between
0 and 255.
-
- Parameters:
-
blueIntensity
- intensity of blue
-
StimulationProtocolTimeCourseColorR()
-
Gets
the 'Red' dimension of the stimulation protocol time course color; value
between 0 and 255.
-
- Returns:
-
redIntensity
intensity of red
-
StimulationProtocolTimeCourseColorR(number
value)
-
Sets
the 'Red' dimension of the stimulation protocol time course color; value
between 0 and 255.
-
- Parameters:
-
redIntensity
- intensity of red
-
StimulationProtocolTimeCourseColorG()
-
Gets
the 'Green' dimension of the stimulation protocol time course color; value
between 0 and 255.
-
- Returns:
-
greenIntensity
intensity of green
-
StimulationProtocolTimeCourseColorG(number
value)
-
Sets
the 'Green' dimension of the stimulation protocol time course color; value
between 0 and 255.
-
- Parameters:
-
greenIntensity
- intensity of green
-
StimulationProtocolTimeCourseColorB()
-
Gets
the 'Blue' dimension of the stimulation protocol time course color; value
between 0 and 255.
-
- Returns:
-
blueIntensity
intensity of blue
-
StimulationProtocolTimeCourseColorB(number
value)
-
Sets
the 'Blue' dimension of the stimulation protocol time course color; value
between 0 and 255.
-
- Parameters:
-
blueIntensity
- intensity of blue
-
StimulationProtocolTimeCourseThickness()
-
Gets
thickness of line of response function
-
- Returns:
-
Thickness
in mm (number)
-
StimulationProtocolTimeCourseThickness(number
value)
-
Sets
thickness of line of response function
-
- Parameters:
-
Thickness
- in mm (number)
-
PositiveStatisticalValues()
-
Get
whether positive values on overlay statistical map are shown
-
- Returns:
-
value
(boolean): 0 or 1
-
PositiveStatisticalValues(number
value)
-
Set
whether positive values on overlay statistical map are shown
-
- Parameters:
-
value - (boolean):
0 or 1
-
NegativeStatisticalValues()
-
Get
whether negative values on overlay statistical map are shown
-
- Returns:
-
value
(boolean): 0 or 1
-
NegativeStatisticalValues(number
value)
-
Set
whether negative values on overlay statistical map are shown
-
- Parameters:
-
value - (boolean):
0 or 1
-
TwoSetContributionMaps()
-
Get
whether the two set contribution maps option should be used (Overlay GLM
contrasts dialog)
-
- Returns:
-
value
(number)
-
TwoSetContributionMaps(number
value)
-
Set
whether relative contribution should be used. Example: 'doc.TwoSetContributionMaps
= 1'. (Overlay GLM contrasts dialog)
-
- Parameters:
-
numericalValue
- relative contribution indication
-
MatrixSizeX()
-
Gets
number of columns of slice image matrix
-
- Returns:
-
numberOfColumns
-
MatrixSizeY()
-
Gets
number of rows of slice image matrix
-
- Returns:
-
numberOfRows
-
NrOfSlices()
-
Gets
number of slices per volume (scan)
-
- Returns:
-
number
of slices (number)
-
NrOfSlices(number
value)
-
Sets
number of slices per volume (scan)
-
- Parameters:
-
number -
of slices (number)
-
NrOfVolumes()
-
Gets
or sets number of volumes
-
- Returns:
-
Number
of time points per pixel (data points, samples)
-
NrOfSkippedVolumes([out,
retval] number* value)
-
Gets
number of skipped volumes
-
- Returns:
-
Number
of skipped volumes (number)
- Since:
-
4.6
-
NrOfSkippedVolumes(number
value)
-
Sets
number of skipped volumes
-
- Parameters:
-
Number -
of volumes skipped during project creation
- Since:
-
4.6
-
SeparationOfSubjectPredictors()
-
GLM-property
-
- Returns:
-
separationOfSubjectPredictorsOrNot
0 -> no, 1 -> for each study, 2 -> for each subject
-
SeparationOfStudyPredictors()
-
GLM-property
-
- Returns:
-
separationOfStudyPredictorsOrNot
0 -> no, 1 -> for each study, 2 -> for each subject
-
ZTransformationOfStudies()
-
Get
ZTransformationOfStudies; 1 -> time courses of runs have been z-transformed,
0 -> not. GLM-file property.
-
- Returns:
-
Z-transformed
or not (number)
-
ZTransformationOfStudies(number
value)
-
Set
ZTransformationOfStudies; 1 -> time courses of runs have been z-transformed,
0 -> not. GLM-file property.
-
- Parameters:
-
Z-transformed
- or not (number)
-
Save()
-
Saves
a BrainVoyager project file using the current file name
-
-
SaveAs(string
SaveAsFileName)
-
Saves
a BrainVoyager project file under a specifed file name. Saves the referenced
document object objDocument to disk with the provided file name strFileName.
-
- Parameters:
-
filename
-
-
Close()
-
Closes
a BrainVoyager project file. Closing a project file also deletes the associated
objDocument. You can no longer invoke methods using the respective document
variable.
-
-
Remove()
-
Method
Remove() is used to remove intermediate fmr-files while preprocessing.
Used for fmr-projects. Instead of calling "Close", we call "Remove"
to close and delete the document from disk. This is useful if one wants
not to keep intermediate preprocessing files. Syntax: "docFMR_2.Remove"
-
-
RefreshView()
-
Repaints
the document's view which is a window showing an FMR, VMR or AMR project.
Most document methods are defined to operate without updating the document's
view. Use this method to refresh the respective document window to render
the effect of an operation visible.
-
-
SetCrossPosition(
number x, number y, number z)
-
Sets
the current voxel. The current voxel is shown as the center of the red
cross in the SAG, COR and TRA window. Valid only if objDocument is of
type VMR. The method is executed independent of whether the red cross
is turned on (visible) or off (invisible). To update the SAG, COR and
TRA window, call RefreshView after execution of this method.
-
- Parameters:
-
x - in pixels
y - in pixels
z - in pixels
-
SwitchToSurfaceModule()
-
Activates
the Surface Module window. Valid only if objDocument is of type VMR. Each
VMR project can call exactly one Surface Module window. If the Surface
Module window has not been activated before, the window is created showing
the 3D string "BrainVoyager". If the Surface Module window has
been created, you can access surface-related document methods like LoadMesh.
-
-
Show3DVolumeTools()
-
Shows
the 3D Volume Tools dialog. If the Surface Module window is shown maximized,
this method also switches to the VMR window thereby hiding the Surface
Module window. Valid only if objDocument is of type VMR.
-
-
Hide3DVolumeTools()
-
Hides
the 3D Volume Tools dialog. Valid only if objDocument is of type VMR.
-
-
LoadMesh(string
MeshFileName)
-
Loads
a surface mesh file. Surface mesh file names have extension ".srf".
Valid only if objDocument is of type VMR and if the Surface Module window
for this VMR project has been created. The loaded mesh is not shown automatically
in the Surface Module window. To update it, call the UpdateSurfaceWindow()
method.
-
- Parameters:
-
MeshFileName
- name of mesh file to load
- Returns:
-
succeeded
(boolean)
-
SaveSnapshotOfSurfaceWindow(string
MeshFileName)
-
Makes
a snapshot of the surface module window. Valid only if objDocument is
of type VMR and if the Surface Module window for this VMR project has
been created. The image is saved with the by the user provided filename
and extension specified in the 'Global preferences'.
-
- Parameters:
-
snapShotFileName
-
- Returns:
-
succeeded
(boolean)
-
AddMesh(string
MeshFileName)
-
Reads
a surface mesh file and adds it to the Surface Module window of the referenced
VMR document. This method allows to compose scenes of surface meshes,
i.e. loading the mesh file of the reconstructed head of a subject and
adding the reconstructed meshes of the cortical hemispheres of that subject.
Valid only if objDocument is of type VMR and if the Surface Module window
for this VMR project has been created. The loaded mesh is not shown automatically
in the Surface Module window. To update it, call the UpdateSurfaceWindow
method.
-
- Parameters:
-
strMeshFileName
-
- Returns:
-
success
(boolean)
-
UpdateSurfaceWindow()
-
Repaints
the Surface Module window which is a window showing one or more surface
mesh files. Valid only if objDocument is of type VMR and if the Surface
Module window for this VMR project has been created. Most surface-related
document methods are defined to operate without updating the Surface Module
window. Use this method to refresh this window to render the effect of
an operation visible.
-
- Returns:
-
boolSuccess
operationSucceeded
-
SetViewpointPosition(
number x, number y, number z)
-
Sets
the 3D position of the viewpoint from which the scene in the Surface Module
window is "seen". Valid only if objDocument is of type VMR and
if the Surface Module window for this VMR project has been created. This
method sets only the position of the viewpoint; use the method SetViewpointAngles
to also set the viewing direction. To update the Surface Module window,
call the RefreshSurfaceWindow method.
-
- Parameters:
-
intX - coordinate
on x-axis
intY - coordinate on y-axis
intZ - coordinate on z-axis
-
ViewpointTranslationX(int
translX)
-
Move
the viewing direction from which the scene in the Surface Module window
is "seen" right or left. Valid only if objDocument is of type
VMR and a mesh is loaded in the Surface Module window. To update the Surface
Module window, call the UpdateSurfaceWindow method. The origin (0,0,0)
of the space is in the middle so from the origin the surface object can
be translated to the right (+) or to the left (-).
-
- Parameters:
-
intTranslationX
- shift on the x axis
-
ViewpointTranslationY(int
translY)
-
Move
the viewing direction from which the scene in the Surface Module window
is "seen" up or down. Valid only if objDocument is of type VMR
and a mesh is loaded in the Surface Module window. To update the Surface
Module window, call the UpdateSurfaceWindow method. The origin (0,0,0)
of the space is in the middle so from the origin the surface object can
be translated upward (+) or downward (-).
-
- Parameters:
-
intTranslationY
- shift on the y axis
-
ViewpointTranslationZ(int
translZ)
-
Move
the viewing direction from which the scene in the Surface Module window
is "seen" backward or forward. Valid only if objDocument is
of type VMR and a mesh is loaded in the Surface Module window. To update
the Surface Module window, call the UpdateSurfaceWindow method. The origin
(0,0,0) of the space is in the middle so from the origin the surface object
can be translated forward or backward.
-
- Parameters:
-
intTranslationZ
- shift on the z axis
-
ViewpointRotationX(int
rotX)
-
Rotate
the viewing direction from which the scene in the Surface Module window
around the X-axis (back to front in Talairach space) (in degrees (0-360)).
Valid only if objDocument is of type VMR and a mesh is loaded in the Surface
Module window. To update the Surface Module window, call the UpdateSurfaceWindow
method.
-
- Parameters:
-
intRotationXaxis
-
-
ViewpointRotationY(int
rotY)
-
Rotate
the viewing direction from which the scene in the Surface Module window
around the Y-axis (right to left in Talairach space) (in degrees (0-360)).
Valid only if objDocument is of type VMR and a mesh is loaded in the Surface
Module window. To update the Surface Module window, call the UpdateSurfaceWindow
method.
-
- Parameters:
-
intRotationYaxis
-
-
ViewpointRotationZ(int
rotZ)
-
Rotate
the viewing direction from which the scene in the Surface Module window
around the Z-axis (top to bottom in Talairach space) (in degrees (0-360)).
Valid only if objDocument is of type VMR and a mesh is loaded in the Surface
Module window. To update the Surface Module window, call the UpdateSurfaceWindow
method.
-
- Parameters:
-
intRotationZaxis
-
-
SliceMeshAxial(number
z)
-
Slices
a surface mesh parallel to the XY-plane at the specified Z-level. Valid
only if objDocument is of type VMR and if a mesh has been loaded or created.
The slice shows the data contained at that level in the respective VMR
document. If multiple surface meshes are present, the method is applied
to the current mesh. If a mesh is created or loaded/added, it automatically
becomes the current mesh. To update the Surface Module window, call the
RefreshSurfaceWindow method.
-
- Parameters:
-
intSlice
-
-
SliceMeshCoronal(number
y)
-
Slices
a surface mesh parallel to the XZ-plane at the specified Y-level.
-
- Parameters:
-
intSlice
- slice shown in mesh Valid only if objDocument is of type VMR and if
a mesh has been loaded or created. The slice shows the data contained
at that level in the respective VMR document. If multiple surface meshes
are present, the method is applied to the current mesh. If a mesh is created
or loaded/added, it automatically becomes the current mesh. To update
the Surface Module window, call the RefreshSurfaceWindow method.
-
SliceMeshSagittal(number
x)
-
Slices
a surface mesh parallel to the YZ-plane at the specified X-level. Valid
only if objDocument is of type VMR and if a mesh has been loaded or created.
The slice shows the data contained at that level in the respective VMR
document. If multiple surface meshes are present, the method is applied
to the current mesh. If a mesh is created or loaded/added, it automatically
becomes the current mesh. To update the Surface Module window, call the
RefreshSurfaceWindow method.
-
- Parameters:
-
intSlice
- Integer, indicates at which slice the mesh will be cut
-
MeshSlicesOff()
-
Removes
all activated slices from the current mesh. Valid only if objDocument
is of type VMR and if a mesh has been loaded or created. If multiple surface
meshes are present, the method is applied to the current mesh. If a mesh
is created or loaded/added, it automatically becomes the current mesh.
To update the Surface Module window, call the RefreshSurfaceWindow method.
-
-
LoadViewingSettings(string
FileNameVWP)
-
Restores
surface module settings about the viewing position, angles, lightning
conditions previously stored to disk. Valid only if objDocument is of
type VMR and and if the Surface Module window for this VMR project has
been created. Viewpoint files possess the extension "vwp". To
update the Surface Module window, call the RefreshSurfaceWindow method.
-
- Parameters:
-
strViewpointFileName
- File with viewpoint settings to be loaded (*.vwp)
-
LoadGLM(string
FileNameGLM)
-
Loads
a file containg the results of a multiple regression (GLM) analysis. Valid
only if objDocument is of type FMR or VMR. If it is of type VMR, all three
dimensions currently must be 256. The specified GLM file strGLMFileName
is loaded into memory and can be shown superimposed on anatomical images
by selecting predictors (i.e. using the SelectAllPredictors method) and
then calling the ShowGLM method. During loading of the GLM, BrainVoyager
also tries to find all VTC files referenced by the GLM file.
-
- Parameters:
-
FileNameGLM
- Name of file to be loaded
-
RunGLMFromProtocol()
-
Compute
the General Linear Model with the linked protocol
-
-
SaveGLM(string
FileNameGLM)
-
Save
the computed General Linear Model with the provided name
-
- Parameters:
-
fileName
-
-
ShowGLM()
-
Shows
statistical map based on selected predictors of a GLM superimposed on
(anatomical) reference images. Valid only if objDocument is of type FMR
or VMR. After performing or loading a GLM file, predictors can be selected
and then shown as statistical maps on reference images of an FMR or VMR
project. To select predictors, use one of the following methods: SelectAllPredictors,
SelectPredictorInSet1, SelectPredictorInSet2. You can also deselect all
currently selected predictors by using the DeselectAllPredictors method.
To show a contrast between two predictor sets, select the desired predictors
in set 1 and set 2 and make sure to call DisableTwoSetPredictorColours
prior to the ShowGLM method. If you want to visualize the relative contribution
of explained variance between two predictor sets, call EnableTwoSetPredictorColours
prior to the ShowGLM method.
-
-
SelectPredictorInSet1(number
prednr)
-
Adds
a predictor into set1 of two sets available for display of multiple regression
(GLM) results. Valid only if objDocument is of type FMR or VMR. and a
GLM has been run or loaded from disk. You can put more than one predictor
into set1 by calling the method repeatedly. Set1 is the standard set for
showing the explained variance of a subset of the full model, i.e. one
or more predictors. If you want to show contrasts or the relative contribution
of explained variance between two sets of predictors, you must use the
SelectPredictorInSet2 method in addition to the present method. The set
of selected predictors produces a statistical map which represents the
amount of variance explained by the selected partial model. After selecting
the predictors, call the ShowGLM method to visualize the resulting statistical
map. The generated statistical map is internally stored in a VMP (volume
map) data set which you can save to disk (currently only interactively
using the Analysis->Overlay maps->Save 3D Map... menu item).
-
- Parameters:
-
prednr -
Number of the predictor to be selected in set 1
-
SelectPredictorInSet2(number
prednr)
-
Adds
a predictor into set2 of two sets available for display of multiple regression
(GLM) results. Valid only if objDocument is of type FMR or VMR. and a
GLM has been run or loaded from disk. You can put more than one predictor
into set2 by calling the method repeatedly. Set2 can only be used in addition
to set1 in order to show contrasts between two sets of predictors or to
show the relative contribution of the combined variance explained by the
two sets of predictors. After selecting predictors, call the ShowGLM method
to visualize the resulting statistical map. The generated statistical
map is internally stored in a VMP (volume map) data set which you can
save to disk (currently only interactively using the Analysis->Overlay
maps->Save 3D Map... menu item).
-
- Parameters:
-
prednr -
Number of the predictor to be selected in set 2
-
SelectAllPredictors()
-
Selects
all predictors of a multiple regression (GLM) result for display. Valid
only if objDocument is of type FMR or VMR. and a GLM has been run or loaded
from disk. Selecting all predictors produces a statistical map which is
identical to the overall multiple R value, i.e. the amount of variance
explained by the full model. After selecting the predictors, call the
ShowGLM method to visualize the resulting statistical map. The generated
statistical map is internally stored in a VMP (volume map) data set which
you can save to disk (currently only interactively using the Analysis->Overlay
maps->Save 3D Map... menu item).
-
-
DeselectAllPredictors()
-
Deselects
all predictors of a multiple regression (GLM) result allowing to start
a new predictor selection process. Valid only if objDocument is of type
FMR or VMR. and a GLM has been run or loaded from disk. Deselect all predictors
before defining a new statistical map using the SelectPredictorInSet1
and/or SelectPredictorInSet2 method.
-
-
EnableTwoSetPredictorColours()
-
A flag
is set to show the relative contribution of the combined variance explained
by two sets of predictors in a multiple regression (GLM). Valid only if
objDocument is of type FMR or VMR. and a GLM has been run or loaded from
disk. The flag set internally by this method has only an effect if predictors
are selected into both set1 and set2 using the SelectPredictorInSet1 and
SelectPredictorInSet2 method. In this case, the relative contribution
of the combined explained variance in the time series of each voxel is
visualized.
-
-
EnableTwoSetPredictorContrast()
-
Sets
the status of a flag to show the contrast between two sets of predictors
in a multiple regression (GLM). Valid only if objDocument is of type FMR
or VMR. and a GLM has been run or loaded from disk. The flag set internally
by this method has only an effect if predictors are selected into both
set1 and set2 using the SelectPredictorInSet1 and SelectPredictorInSet2
method. In this case, the contrast between the two sets of predictors
is computed, i.e. how much variance is explained by predictor set 1 over
and above the variance explained by predictor set 2.
-
-
SliceTimeCorrection(number
SliceSamplingType)
-
Most
EPI sequences measure the slices of a functional volume in succession
but one often would like to treat the data of one volume as if it were
acquired at the same time, particularly in the context of event-related
studies. Using linear interpolation, the present method resamples the
time series for the different slices in such a way that the resulting
slice time courses can be treated as if they were obtained simultaneously.
Valid only if objDocument is of type FMR. Slice time correction can only
be done in FMR projects because these projects contain the time series
data separated with respect to the individually measured slices (STC files);
this information is lost in VTC files after spatial transformation. Slices
typically are scanned ascending (i.e., slice 1, slice 2, slice 3 ...)
or interleaved (i.e., slice 1, slice 3, slice 5 .. slice 2, slice 4, slice
6 ...). If your data had been scanned interleaved, specify "1"
as the third argument, if it had been scanned ascending, specify "0".
The first two parameters are necessary to perform the correct resampling
of the data. While the TR value should be easily obtained from the scanner
protocol or from a file header, the inter slice time might be more difficult
to get. If scanning ran continously, i..e. if there is no pause between
scanning the last slice of volume N and the first slice of volume N+1,
then you can simply divide the TR value by the number of slices per volume
to get the inter slice time. If scanning ran not continously, you must
either get the information about the duration of acquiring all slices
or the duration of the pause between volumes. An alternative possibility
(used by our group) is to read slice trigger pulses from the scanner measuring
the time point when each slice is scanned; by subtracting, for example
the time point of slice 1 from the time point of slice 2 results in the
inter slice time. The resulting corrected data is automatically saved
to disk. The names for the new FMR project and the new STC prefix is determined
as in the GUI version, i.e., if the FMR project "cg_objects.fmr"
is used, the resulting new file on disk will be "cg_objects_pp.fmr".
In addition, a set of new STC files, actuallly containing the time series
data, is stored to disk. If, for example, the prefix in the source FMR
project was "slice-" (referencing file slice-1.stc, slice-2.stc
etc.), the STC prefix of the new FMR file will be "slice_pp-".
If you do not want to use this implicit naming scheme, you might want
to use the method SliceTimeCorrectionEx which allows to specify the name
of the resulting FMR project and STC prefix.
-
- Parameters:
-
sliceSamplingType -
0 -> Ascending
1 -> Ascending-Interleaved
2 -> Ascending-Interleaved2
10 -> Descending
11 -> Desc-Interleaved
12 -> Descending-Interleaved2
-
SliceTimeCorrectionEx(
number TR,
number InterSliceTime,
number SliceSamplingType, number SincInterpolation, string NewFMRFile,
string NewSTCPrefix)
-
Most
EPI sequences measure the slices of a functional volume in succession
but one often would like to treat the data of one volume as if it were
acquired at the same time, particularly in the context of event-related
studies. Using linear interpolation, the present method resamples the
time series for the different slices in such a way that the resulting
slice time courses can be treated as if they were obtained simultaneously.
Valid only if objDocument is of type FMR. The method operates identical
as the SliceTimeCorrection version. In addition to the specification of
the intTR, intInterSliceTime and intSliceSamplingType, the name of the
resulting FMR project (strNewFMRFileName) and the resulting STC prefix
(strNewSTCPrefix) must be specified.
-
- Parameters:
-
intTR -
intInterSliceTime -
intSliceSamplingType -
numberSincInterpolation -
strNewFMRFileName -
strNewSTCPrefix -
-
TemporalSmoothingFD2D(number
HighPass, number LowPass)
-
Filters
in the frequency domain the time series of each voxel in the STC files
of an FMR project. Can be used to remove linear and non-linear drifts
(high-pass) and/or to smooth the time series (low-pass). Valid only if
objDocument is of type FMR. The high- and low pass values are interpreted
in cycles per length of the time course measured in volumes. A high pass
value of "3" removes frequency components below 3 cycles within
the time series. A low pass value equal to or greater than half the length
of the time series will have no effect (Nyquist theorem), i.e. the low-pass
filter is turned off. If the time series data, for example, contains 256
measurements, then a low pass value of 128 or greater lets everything
pass, i.e. it has no effect and is turned off. In the GUI version, BrainVoyager
sets the default value of the low pass to one-third of the lenght of the
time series which proved to produce good results, i..e. it results in
slightly smoothed time series. It is, however, recommended, not to use
low pass filtering at all when preprocessing data sets from event-related
designs. This is also the reason, why low pass filtering is turned off
in the GUI version (2D Data Preprocessing dialog) as default. The resulting
filtered data is automatically saved to disk. The names for the new FMR
project and the new STC prefix is determined as in the GUI version, i.e.,
if the FMR project "cg_objects.fmr" is used, the resulting new
file on disk will be "cg_objects_pp.fmr". In addition, a set
of new STC files, actually containing the time series data, is stored
to disk. If, for example, the prefix in the source FMR project was "slice-"
(referencing file slice-1.stc, slice-2.stc etc.), the STC prefix of the
new FMR file will be "slice_pp-". If you do not want to use
this implicit naming scheme, you might want to use the method TemporalSmoothingFD2DEx
which allows to specify the name of the resulting FMR project and STC
prefix.
-
- Parameters:
-
HighPass
- value
LowPass - value
-
TemporalSmoothingFD2DEx(
number HighPass, number LowPass, string NewFMRFile, string NewSTCPrefix)
-
Filters
the time series of each voxel in the STC files of an FMR project. Can
be used to remove linear and non-linear drifts (high-pass) and/or to smooth
the time series (low-pass). Valid only if objDocument is of type FMR.
The method operates identical as the TemporalSmoothingFD2D version. In
addition to the specification of the high-pass and low pass filter values,
the name of the resulting FMR project (strNewFMRFileName) and the resulting
STC prefix (strNewSTCPrefix) must be specified.
-
- Parameters:
-
HighPass
-
LowPass -
NewFMRFile -
NewSTCPrefix -
-
SpatialSmoothingFD2D(
number HighPass, number LowPass)
-
Spatially
filters each recorded image in the STC files of an FMR project in the
frequency domain. Valid only if objDocument is of type FMR. The high-
and low pass values are interpreted in cycles per spatial dimension measured
in voxels (i.e. matrix size). In the rare case of a non-square matrices,
the largest dimension is chosen as reference. A low pass value equal to
or greater than half of the dimension (i.e. > 32 in the case of a 64
x 64 matrix) lets everyghing pass, it will have no effect (Nyquist theorem).
In the GUI version (2D Data Preprocessing dialog), BrainVoyager sets the
default value of the low pass filter to half of this value (i.e. 16 in
case of a 64 x 64 matrix, 32 in case of a 128 x 128 matrix) which produces
a modest spatial smoothing roughly equal to spatial smoothing with a FWHM
of 4mm in the spatial domain. In the GUI version, the low-pass filter
is turned off completely for 64 x 64 matrices and is only turned on by
greater matrices. The high-pass filter is also turned off in the GUI version
since such a spatial filter is not useful in the context of fMRI data
analysis. To turn the high-pass filter off, specify "1" as the
intHighPass argument. The resulting filtered data is automatically saved
to disk. The names for the new FMR project and the new STC prefix is determined
as in the GUI version, i.e., if the FMR project "cg_objects.fmr"
is used, the resulting new file on disk will be "cg_objects_pp.fmr".
In addition, a set of new STC files, actually containing the smoothed
data, is stored to disk. If, for example, the prefix in the source FMR
project was "slice-" (referencing file slice-1.stc, slice-2.stc
etc.), the STC prefix of the new FMR file will be "slice_pp-".
If you do not want to use this implicit naming scheme, you might want
to use the method SpatialSmoothingFD2DEx which allows to specify the name
of the resulting FMR project and STC prefix.
-
- Parameters:
-
HighPass
-
LowPass -
-
SpatialSmoothingFD2DEx(
number HighPass, number LowPass, string NewFMRFile, string NewSTCPrefix)
-
Spatially
filters each recorded image in the STC files of an FMR project in the
frequency domain. Valid only if objDocument is of type FMR. The method
operates identical as the SpatialSmoothingFD2D version. In addition to
the specification of the high-pass and low pass filter values, the name
of the resulting FMR project (strNewFMRFileName) and the resulting STC
prefix (strNewSTCPrefix) must be specified.
-
- Parameters:
-
HighPass
-
LowPass -
NewFMRFile -
NewSTCPrefix -
-
CreateVTC(
string FMRFile, string 2D3DTRFFile, string ACPCTRFFile, string TALFile,
string VTCFileName)
-
Transforms
the time course data of an FMR project into a defined 3D space, typically
Talairach space. The result of this transformation is a VTC file. Valid
only if objDocument is of type VMR. FMR projects contain functional data
in the originally recorded slices without any knowledge about where these
slices are located with respect to a 3D reference frame, i.e. Talairach
space. Transforming the functional data in Talairach space allows to analyze
data from the same subject across different scanner sessions as well as
to analyze data coming from different subjects. The resulting 4D VTC file
consists of a series of 3D volumes aligned in stereotactic space. The
file is saved to disk under the name strFileVTC entered as the last parameter.
The first parameter strFileFMR specifies the FMR project whose functional
data should be transformed in 3D space (the functional data actually resides
in STC files which are referenced by the FMR project). The spatial transformation
into Talairach space is controlled by three files which must exist prior
to calling this method. The strFile2D3DTRF is responsible to align the
stack of 2D slices at the correct position of a 3D VMR data set which
is typically recorded in the same session as the functional data. If this
is the case, the alignment can be done automatically based on the header
information of the functional and anatomical data sets (assuming no or
only minimal motion between the two data sets). The automatic alignment
is currently only possible for Siemens IMA and DICOM files but should
be available soon also for Philips and GE scanners (for further information,
contact Brain Innovation). If the necessary header information is not
available, the alignment has to be performed interactively within BrainVoyager.
If the functional data has been registered with a 3D VMR data set, the
further alignment information can be obtained from anatomical transformations.
The 3D data set to which the functional data has been aligned can be rotated
into the AC-PC plane. If you have already once rotated a 3D data set of
the same subject into the AC-PC plane, you can use BrainVoyager's automatic
3D-3D alignment routine to do this step. In both cases, a TRF file is
produced which transforms the source 3D data set into the AC-PC plane.
Since the functional data should undergo exactly the same transformation,
you must enter the obtained file as the strFileACPCTRFF file for the present
method. The AC-PC plane space is not Talairach space. The final step is
to apply a non-linear scaling operation to bring the data in stereotactic
space. This is done for the 3D VMR data set in AC-PC space and results
in a TAL file. In order to apply the same transformation to the functional
data, enter the obtained file as the strFileCerebrumTAL file.
-
- Parameters:
-
strFileFMR
- Name of FMR file to be transformed
strFile2D3DTRF - *.trf file
strFileACPCTRFF -
strFileCerebrumTAL -
strFileVTC - Name of the 4D VTC file to be created and saved
-
CorrectMotion(int
targetVolume)
-
Detects
and corrects rigid-body motion within an FMR file. The target volume provided
by the user serves as the reference to which all other volumes are aligned.
This version uses the default settings as shown in the GUI version (FMR
Data Preprocessing): trilinear interpolation to perform the rigid-body
translation/rotation, a reduced data set (every second voxel in each dimension
= one eighth of a full volume = 12.5%), a maximum of 100 iterations to
fit a volume to the reference, creation of pre- and post AVI movie files
and a standard log file. The new file name is based on the name of the
FMR file prior to starting the filter and adds a suing describing the
preprocessing performed. If, for example, the name of the FMR file was
"cg_objects.fmr", the new name will be "cg_objects_3DMC.fmr".
The added suing "_3DMC" describes that motion correction (MC)
has been performed in 3D (3DMC), i.e. fitting 3 translation and 3 rotation
parameters. All 3D preprocessing steps add such descriptive suings which
makes it easy to get the information about the sequence of steps which
has been performed to produce a particular FMR file.
-
- Parameters:
-
intTargetVolume
- Volume of FMR file to align to
-
CorrectMotionTargetVolumeInOtherRun(str
intraSessionRunName, int targetVolume)
-
Detects
and corrects rigid-body motion within several runs. This intra-session
alignment method makes it possible to align all volumes of all runs in
a session to the same targetvolume. This version uses the default settings
as shown in the GUI version (FMR Data Preprocessing): trilinear interpolation
to perform the rigid-body translation/rotation, a reduced data set (every
second voxel in each dimension = one eighth of a full volume = 12.5%),
a maximum of 100 iterations to fit a volume to the reference, creation
of pre- and post AVI movie files and a standard log file. The new file
name is based on the name of the FMR file prior to starting the filter
and adds a suing describing the preprocessing performed. If, for example,
the name of the FMR file was "cg_objects.fmr", the new name
will be "cg_objects_3DMC.fmr". The added suing "_3DMC"
describes that motion correction (MC) has been performed in 3D (3DMC),
i.e. fitting 3 translation and 3 rotation parameters. All 3D preprocessing
steps add such descriptive suings which makes it easy to get the information
about the sequence of steps which has been performed to produce a particular
FMR file. The intra-session alignment is integrated in the 3D motion correction
step by specifying to which target volume and target run the data should
be aligned. The target run should be the one, which is closest in time
to the recorded 3D data set to minimize the effect of motion across scans.
If a session, for example, started with a 3D data set followed by three
runs, run 1, run 2 and run 3, 3D motion correction in the first run would
proceed as in the 3DMotionCorrection() method by selecting a target volume
i.e. volume 1 (default). For run 2, the same target volume in run 1 is
specified aligning th data of run 2 directly with run 1. The same is specified
for run 3, i.e. the data are directly aligned to the target volume in
run 1. This procedure ensures that all volumes in all runs are aligned
to the very same target volume. Note that the described strategy works
only if all runs have been recorded with the same nominal slice positions.
If slice positions have been changed across runs, intra-session alignment
can be achieved by using coregistration.
-
- Parameters:
-
strIntraSessionRun
- Name of the FMR file to align all runs and volumes to
intTargetVolume - Volume of FMR file to align to
-
TemporalSmoothingFD3D(
number HighPass, number LowPass)
-
Filters
in the frequency domain the time series of each voxel in a VTC file. Can
be used to remove linear and non-linear drifts (high-pass) and/or to smooth
the time series (low-pass). Valid only if objDocument is of type VMR and
if a VTC file has been linked. If the VTC file is referenced but not in
memory, BrainVoyager will load the VTC file prior to running the temporal
filter. A high pass value of "3" removes frequency components
below 3 cycles within the time series. A low pass value equal to or greater
than half the length of the time series will have no effect (Nyquist theorem),
i.e. the low-pass filter is turned off. If the time series data, for example,
contains 256 measurements, then a low pass value of 128 or greater lets
everything pass, i.e. it has no effect and is turned off. In the GUI version,
BrainVoyager sets the default value of the low pass to one-third of the
length of the time series which proved to produce good results, i..e.
it results in slightly smoothed time series. It is, however, recommended,
not to use low pass filtering at all when preprocessing data sets from
event-related designs. This is also the reason, why low pass filtering
is turned off in the GUI version (3D Data Preprocessing dialog). As in
the GUI version, the temporal filter produces a new VTC file which is
saved to disk automatically under a new file name. The new file name is
based on the name of the linked VTC file prior to starting the filter
and adds a suing describing the preprocessing performed. If, for example,
the name of the linked VTC file was "cg_objects_SC_3DMC.vtc",
the new name will be "cg_objects_SC_3DMC_FTS-3-126.vtc". The
added suing "_FTS-3-126" describes that temporal smoothing (TS)
has been performed in the frequency domain (FTS) using a high-pass filter
of "3" and a low-pass filter of "126". All 3D preprocessing
steps add such descriptive suings which makes it easy to get the information
about the sequence of steps which has been performed to produce a particular
VTC file. If you do not want to use the implicit naming scheme, you might
want to use the method TemporalSmoothingFD3DEx which allows to specify
the source VTC file and the target VTC file. Note also that the resulting
VTC file is linked automatically to objDocument which allows to run a
cascade of preprocessing commands without having to link intermediate
files.
-
- Parameters:
-
HighPass
- Interpreted in cycles per length of the time course measured in volumes
LowPass - interpreted in cycles per length of the time course
measured in volumes
-
SpatialSmoothingFD3D(
number HighPass, number LowPass)
-
Spatially
filters each 3D volume of a VTC file in the frequency domain. Valid only
if objDocument is of type VMR and if a VTC file has been linked. If the
VTC file is referenced but not in memory, BrainVoyager will load the VTC
file prior to running the spatial filter. Since there are three spatial
dimensions, the largest dimension is chosen as reference. Since VTC files
normally are in Talairach space, the largest dimension is the YTAL-dimension
corresponding to 174 mm or 174 voxels in a 1mm3 VMR data set (for details
about the dimensions of VTC files, see chapter "BrainVoyager File
Formats"). Since the functional data in VTC files consists typically
of 3mm3 voxels, this results in a value of 174/3 = 58 when measured in
voxels. A low pass value equal to or greater than half of this value (>
26) lets everything pass, it will have no effect (Nyquist theorem). In
the GUI version (3D Data Preprocessing dialog), BrainVoyager sets the
default value of the low pass filter to roughly half of this value (14)
which produces a modest spatial smoothing roughly equal to spatial smoothing
with a FWHM of 4mm in the spatial domain. In the GUI version the high-pass
filter is turned off since it is not useful in the context of fMRI data
analysis. To turn the high-pass filter off, specify "1" as the
intHighPass value. As in the GUI version, the spatial filter produces
a new VTC file which is saved to disk automatically under a new file name.
The new file name is based on the name of the linked VTC file prior to
starting the filter and adds a suing describing the preprocessing performed.
If, for example, the name of the linked VTC file was "cg_objects_SC_3DMC.vtc",
the new name will be "cg_objects_SC_3DMC_FSS-1-14.vtc". The
added suing "_FSS-1-14" describes that spatial smoothing (SS)
has been performed in the frequency domain (FSS) using a high-pass filter
of "1" and a low-pass filter of "14". All 3D preprocessing
steps add such descriptive suings which makes it easy to get the information
about the sequence of steps which has been performed to produce a particular
VTC file. If you do not want to use the implicit naming scheme, you might
want to use the method SpatialSmoothingFD3DEx which allows to specify
the source VTC file and the target VTC file. Note also that the resulting
VTC file is linked automatically to objDocument which allows to run a
cascade of preprocessing commands without having to link intermediate
files.
-
- Parameters:
-
HighPass
- interpreted in cycles per spatial dimension measured in voxels
LowPass - interpreted in cycles per spatial dimension measured
in voxels
-
TemporalSmoothingFD3DEx(
number HighPass, number LowPass, string VTCFileNameIn, string VTCFileNameOut)
-
Filters
the time series of each voxel in a VTC file. Can be used to remove linear
and non-linear drifts (high-pass) and/or to smooth the time series (low-pass).
Valid only if objDocument is of type VMR. The method operates identical
as the TemporalSmoothingFD3D version. In addition to the specification
of the high-pass and low pass filter values, the source VTC file (strVTCFileNameIn)
and a file name for the resulting VTC file (strVTCFileNameOut) must be
specified. The source VTC file will be linked to objDocument and loaded
into memory prior to temporal smoothing. The filtered file will be saved
to disk under the specified "Out" file name. The resulting VTC
file is linked automatically to objDocument.
-
- Parameters:
-
intHighPass
-
intLowPass -
strVTCFileNameIn -
strVTCFileNameOut -
-
SpatialSmoothingFD3DEx(
number HighPass, number LowPass, string VTCFileNameIn, string VTCFileNameOut)
-
Spatially
filters each 3D volume of a VTC file in the frequency domain. Valid only
if objDocument is of type VMR. The method operates identical as the SpatialSmoothingFD3D
version. In addition to the specification of the high-pass and low pass
filter values, the source VTC file (strVTCFileNameIn) and a file name
for the resulting VTC file (strVTCFileNameOut) must be specified. The
source VTC file will be linked to objDocument and loaded into memory prior
to spatial smoothing. The filtered file will be saved to disk under the
specified "Out" file name. The resulting VTC file is linked
automatically to objDocument.
-
- Parameters:
-
intHighPass
-
intLowPass -
strVTCFileNameIn -
strVTCFileNameOut -
-
LinkVTC( string
VTCFileName, number LoadInMem)
-
Links
a 3D time course file (VTC) to a 3D anatomical project (VMR). Valid only
if objDocument is of type VMR. The VMR and VTC file must be in the same
space, normally Talairach space. After linking the VTC file, statistical
tests can be performed across the data set and time courses and event-related
averages can be shown. If the second parameter is set to "1",
the VTC file is load into working memory, if it is set to "0",
a file reference is created and used to access the file when necessary.
-
- Parameters:
-
VTCFileName
-
LoadInMemory - Boolean, to be 0 (load in memory) or 1 (create
reference file)
-
SetVoxelIntensity(
int x, int y, int z, int value)
-
Sets
the intensity value of the specified voxel in an VMR data set. (In User's
Guide known as 'SetVoxelValue') Valid only if objDocument is of type VMR.
Intensity values in VMR files are stored in bytes. The values for intIntensity
should be in the range of 10 - 245 since the colors indices below 10 and
above 245 are reserved for the Windows system palette. The range of values
normally interpreted as grey scale is from 10 to 225. To update the SAG,
COR and TRA window, call RefreshView after execution of this method. Note
that the method is quite slow, i.e. it is not appropriate to use this
method to loop across all data points. If you want to work efficiently
with VMR files, you should follow the method described in the topics "A
simple C++ program" and "An easy C++ program". The method
has been developed mainly for internal use, i.e. to test the speed of
data access using scripts. If in a later release a so called in-process
COM server is provided (basically BrainVoyager as a DLL), the speed might
be as fast as with using C++. If this turns out to be the case, we will
provide further methods for setting and retrieving intensity and dimension
values from VMR files.
-
- Parameters:
-
intX -
intY -
intZ -
intIntensity -
-
GetVoxelIntensity(
int x, int y, int z)
-
Gets
the voxel intensity of the voxel specified by the coordinates
-
- Parameters:
-
x - axis
coordinate
y - axis coordinate
z - axis coordinate
- Returns:
-
intensity
of voxel at specified coordinate (integer)
-
SetLayoutRowsCols(
number NrOfRows, number NrOfCols)
-
Defines
a grid of rows and columns in which multiple images of an FMR or AMR project
are shown. Only valid if objDocument is of type FMR or AMR. If an FMR
project is saved, the current layout is stored with the file; when the
file is reloaded, the previously stored layout (number of rows and columns)
is used to display the project's images. This kind of persistence is not
supported by AMR files.
-
- Parameters:
-
Rows -
Cols -
-
SetZoomLevel(number
ZoomLevel)
-
Sets
the zoom level of the view of a BrainVoyager project file (FMR, VMR, AMR).
Valid for all document types: objDocument can be a VMR, FMR or AMR project.
If an FMR project is saved, the current zoom level is stored with the
file; when the file is reloaded, the previously stored zoom level is used
to display the project's images. This kind of persistence is not supported
by AMR and VMR files. Zoom level range: 1 to 10 (1 = slice resolution)
-
- Parameters:
-
Zoomlevel
-
-
ConvertFuncToAMR(string
AMRFileName)
-
Converts
the first functional volume of an FMR project into an AMR file. Valid
only if objDocument is of type FMR. This method is useful to produce a
"pseudo-anatomical" representation within the same space as
the functional data. When short TR's are used (i.e. in event-related paradigms),
the first measurement of the functional slices produces images with high
T1-saturation, i.e. high signal level and good tissue contrast. The high
signal drops rapidly with further measurements reaching a steady state.
Since this signal change presents a problem for showing and analyzing
time series data, the first few measurements are normally not read in
when creating an FMR project. Because of good tissue contrast, It is,
however, desirable to use the very first measurement as the images on
which statistical maps should be shown. This is where the present method
is useful: create an FMR project of the first volume only, then apply
the method to produce a respective AMR file which can then be linked to
the "real" FMR file containing the full time series data (except
the very first measurements). Another advantage of using a pseudo-AMR
file is that spatial smoothing does not change the AMR so that the anatomical
location of functional clusters can be better visualized. Another possibility
to obtain a pseudo-AMR file would be to create an AMR project from the
images of the first functional volume. Although this is possible, the
presented method is recommended since it produces an FMR file which can
be transformed to a VTC file of the first volume. This again can be used
in stereotactic space to show statistical maps not only on T1-weighted
data sets but also on the original EPI data. The method corresponds to
the function invoked by the Options->Convert func to AMR menu item.
The transformation uses all default settings of the Rescale Images dialog
which appears in the GUI version: the AMR will transform the original
FMR slices (of the first volume) to a resolution of 256 x 256, it uses
bilinear interpolation, it does not invert the intensity values and it
does not invert the background. A method which allows to specify these
settings will be provided shortly (ConvertFuncToAMREx).
-
- Parameters:
-
AMRFileName
- Name of the amr-file to be created
-
LinkAMRFile(string
AMRFileName)
-
Links
a (pseudo-) anatomical AMR file to an FMR document. Valid only if objDocument
is of type FMR. To establish a permanent link to the AMR file, save the
FMR file using the Save method.
-
- Parameters:
-
AMRFileName
- Name of amr-file to be linked
-
LinkStimulationProtocol(string
ProtocolFileName)
-
Links
a stimulation protocol PRT file to an FMR project or a 3D volume time
course VTC file. Valid only if objDocument is a) of type FMR or b) of
type VMR and if a VTC file has been linked. In the latter case, the specified
stimulation protocol is linked to the VTC file. To establish a permanent
link, save the FMR project or the VTC file.
-
- Parameters:
-
stimulationProtocolFileName
- String, expects path from root, including extension of stimulationprotocol
(*.prt)
-
BeginRecordingSurfaceWindowMovie(string
AVIMovieFileName)
-
Starts
recording every updated view in the Surface Module window and saves it
to a movie file. Valid only if objDocument is of type VMR and if the Surface
Module window for this VMR project has been created. The method must be
completed by a matching call to EndRecordingSurfaceWindowMovie, otherwise
the movie file can not be used. The "grabbed" frames are stored
in a movie file with the provided filename which should have the extension
".avi" since it is stored in Microsoft's format. Note, that
the frames are stored uncompressed, i.e. each pixel of each frame is stored
using 3 bytes (RGB values). This means that movie files become very large.
Use the NewMainWindowSize method to reduce the size of the main window
and thus also the size of the Surface Module window. You might use other
software to compress the saved movie further, i.e. by converting the uncompressed
AVI into GIF animation files. Any command that updates the Surface Module
window will result in grabbing the windows content as a frame which is
saved in the file. In most cases this will be triggered by the RefreshSurfaceWindow
method.
-
- Parameters:
-
strMovieFileName
-
-
EndRecordingSurfaceWindowMovie()
-
Stops
recording Surface Module window movie and closes the movie file. Valid
only if objDocument is of type VMR and if the Surface Module window for
this VMR project has been created. The method should be the matching call
to an earlier call of the BeginRecordingSurfaceWindowMovie method. The
present method closes the opened AVI file properly. If it is omitted,
the movie file can not be used.
-
-
ShowTimeCourseOfVoxel(
number x, number y, number z, string TCWinName)
-
Shows
a time course from a Region-Of-Interest of the currently linked VTC file.
Valid only if objDocument is of type VMR. A VTC file must be linked to
the VMR. The voxel is specified by system coordinates intX, intY and intZ.
The name for the window (strTimeCourseWindowName) can be used to move
the window to a new position using the MoveTimeCoursePlot method and to
close the window using the CloseTimeCoursePlot method. The function behaves
exactly like clicking with the right mouse button at a position in the
VMR viewing window. If no statistical map (VMP) has been computed, a ROI
Time Course window appears showing the time course of the respective voxel.
If a map has been computed, the ROI Time Course window shows the time
course of the Region-Of-Interest to which the selected voxel belongs.
No window will appear in the latter case if the specified voxel does not
hit a "hot" voxel. You can control this behavior by using the
ShowTimeCourseOfVoxelEx method.
-
- Parameters:
-
x - x axis
coordinate
y - y axis coordinate
z - z axis coordinate
strTimeCourseWindowName -
-
ShowTimeCourseOfVoxelEx(
number x, number y, number z, string TCWinName, number SingleVoxel, number
tc_win_x, number tc_win_y, number tc_win_width, number tc_win_height,
number NewWin, number AddWin)
-
Shows
a time course from a Region-Of-Interest of the currently linked VTC file.
Valid only if objDocument is of type VMR. A VTC file must be linked to
the VMR. In contrast to the ShowTimeCourseOfVoxel version, this function
allows to specify whether the invoked time course window shows the time
course of a single voxel (boolSingleVoxel = 1) or of a functional cluster
(boolSingleVoxel = 0). In the latter case, a statistical map has to be
present and the specified voxel must hit a "hot" (significant)
voxel. This version allows to specify the position of the invoked ROI
Time Course window on screen as well as its width and height (see MoveTimeCoursePlot
method). The position is specified with respect to the left corner (intXPos
= 0, intYPos = 0) of the corresponding VMR window. If boolNewTCWindow
is set to "1" (or "True"), a new ROI Time Course window
is invoked for the specified time course. If this parameter is set to
"0" (or "False"), a new window is only shown if no
ROI Time Course window has been invoked previously for the corresponding
VMR document. If there is already a ROI Time Course window, the last parameter
specifies whether the time course shown in the existing window is replaced
(boolAddToWindow = 0) by the new one or whether it is added to the existing
window (boolAddToWindow = 1).
-
- Parameters:
-
intX -
intY -
intZ -
strTCWindowName -
boolSingleVoxel -
intXPos -
intYPos -
intWidth -
intHeight -
boolNewTCWindow -
boolAddToWindow -
-
MoveTimeCoursePlot(
string TCWinName, number tc_win_x, number tc_win_y, number tc_win_width,
number tc_win_height)
-
Moves
a previously created time course window to a new screen position and changes
its width and height. Valid only if objDocument is of type VMR. The window
name (strTCWindowName) refers to the name specified when the ROI Time
Course window has been created using the ShowTimeCourseOfVoxel or ShowTimeCourseOfVoxelEx
method. The referred window is moved to a new position and gets width
intWidth and height intHeight. The position is specified with respect
to the left corner (intXPos = 0, intYPos = 0) of the corresponding VMR
window.
-
- Parameters:
-
strTCWindowName
-
intXPos -
intYPos -
intWidth -
intHeight -
-
CloseTimeCoursePlot(string
TCWinName)
-
Closes
a previously created time course window. Valid only if objDocument is
of type VMR. The window name (strTCWindowName) refers to the name specified
when the ROI Time Course window has been created using the ShowTimeCourseOfVoxel
or ShowTimeCourseOfVoxelEx method.
-
-
CloseAllTimeCoursePlots()
-
Closes
all previously created time course windows. Valid only if objDocument
is of type VMR. All ROI Time Course windows previously created with the
ShowTimeCourseOfVoxel or ShowTimeCourseOfVoxelEx method are closed at
once.
-
-
ShowEventRelatedAverage(
string TCWinName, string AVGFile)
-
Averages
events as specified in an AVG file and shows the event-related averaging
results in a window. Valid only if objDocument is of type VMR or FMR.
A ROI Time Course window must be created with the ShowTimeCourseOfVoxel
or ShowTimeCourseOfVoxelEx method before the ShowEventRelatedAverage method
can be used. The event-related averaging runs across time courses at the
ROI of the corresponding time course window. The position and size of
the created window can be controlled by using the ShowEventRelatedAverageEx
method.
-
- Parameters:
-
strTimeCourseWindowName
- The window name (strTimeCourseWindowName) refers to the name specified
when the ROI Time Course window has been created
strAVGFileName -
-
ShowEventRelatedAverageEx(
string TCWinName, string AVGFile, number tc_win_x, number tc_win_y, number
tc_win_width, number tc_win_height)
-
Averages
events as specified in an AVG file and shows the event-related averaging
results in a window. Valid only if objDocument is of type VMR or FMR.
A ROI Time Course window must be created with the ShowTimeCourseOfVoxel
or ShowTimeCourseOfVoxelEx method before the ShowEventRelatedAverageEx
method can be used. The window name (strTimeCourseWindowName) refers to
the name specified when the ROI Time Course window has been created. The
event-related averaging runs across time courses at the ROI of the corresponding
time course window. The position and size of the created window can be
controlled by specifying values for the intXPos, intYPos, intWidth and
intHeight parameters. The position is specified with respect to the left
corner (intXPos = 0, intYPos = 0) of the corresponding ROI Time Course
(RTC) window. If a AVG window has been invoked and if a new ROI (voxel)
for the corresponding RTC window is specified, the event-related averaging
will be performed for the new ROI and the AVG window will be updated automatically.
-
- Parameters:
-
strTimeCourseWindowName
-
strAVGFileName -
intXPos -
intYPos -
intWidth -
intHeight -
-
MoveEventRelatedAveragePlot(
string TCWinName, number tc_win_x, number tc_win_y, number tc_win_width,
number tc_win_height)
-
Moves
a previously created event-related averaging window to a new screen position
and changes its width and height. Valid only if objDocument is of type
VMR. The window name (strTCWindowName) refers to the name specified when
the ROI Time Course (RTC) window to which the event-related averaging
(AVG) window is linked has been created. The referred AVG window is moved
to a new position and gets width intWidth and height intHeight. The position
is specified with respect to the left corner (intXPos = 0, intYPos = 0)
of the corresponding RTC window. The AVG window is closed when the linked
RTC window is closed with the CloseTimeCoursePlot method.
-
- Parameters:
-
strTCWindowName
-
intXPos -
intYPos -
intWidth -
intHeight -
-
CreateSphereMesh()
-
Creates
a new spherical mesh which can be used to reconstruct the skin of a subject's
head by iterative morphing. Valid only if objDocument is of type VMR and
the Surface Module window has been invoked using the SwitchToSurfaceModule
method. Any meshes in the surface module are deleted when this function
is executed. The created sphere possesses a standard mesh resolution (20480
vertices), a radius of 140 mm and it is centred at the midpoint of the
underlying VMR data set.
-
-
RemoveBridges(string
SourceVMRFileName)
-
Remove
topological errors named 'handles' or 'bridges' (object produced by puncturing
a surface twice) Used to reconstruct the boundaries of a segmented VMR
file, producing a mesh representation. The goal is to reduce the genus
of the object as much as possible.
-
- Parameters:
-
sourceVMRFileName
- Name of segmented VMR file
-
RemoveBridgesEx(
string SourceVMRFileName, int GreyMatterIntensity, int WhiteMatterIntensity,
int GMWMThreshold)
-
Remove
topological errors - extended version Used to reconstruct the boundaries
of a segmented VMR file, producing a mesh representation. The goal is
to reduce the genus of the object as much as possible.
-
- Parameters:
-
sourceVMRFileName
- Name of segmented VMR file
GreyMatterIntensity - - average intensity of gray matter (value
between - and 225)
WhiteMatterIntensity - - average intensity of white matter
(value between - and 225)
GMWMThreshold - - value indicating the value separating between
white and gray
-
PrepareBoundaryReconstruction()
-
This
option guarantees that the subsequent reconstruction process creates a
valid 2D surface (eg, without moebius bands). This step is a necessary
prerequisite of cortex reconstruction, to prevent a nonorientable surface.
-
-
ReconstructBoundary()
-
Creates
a new triangle mesh by reconstructing the boundary of a segmented data
set. A typical application is the reconstruction of the cortical sheet
from a segmented hemisphere. Valid only if objDocument is of type VMR
and the Surface Module window has been invoked using the SwitchToSurfaceModule
method. Any meshes in the surface module are deleted when this function
is executed. The new mesh is created by tesselation of the outer boundary
of a segmented VMR data set. The initial surface representation shows
the voxelated nature of the underlying segmented data set. To remove this,
the triangle mesh can be smoothed by using the MorphMesh method.
-
-
MorphMesh(
number NrOfIterations, number ScreenUpdateIterations, number SmoothTau,
number VMRFindSurfTau, number VMRFindSurfValue, number SmoothingMode)
-
Morphs
a created or loaded mesh; typical applications are surface smoothing or
skin reconstruction. Valid only if objDocument is of type VMR and and
at least one mesh is present in the Surface Module window. If multiple
meshes exist, morphing is applied to the current mesh. Individual morphing
steps producing small changes can be repeated as specified by the intNrOfIterations
parameter. The screen is not necessarily updated after each morphing step
but after several steps as specified by the intUpdateScreen parameter.
The changes performed by a single morphing step are controlled by several
forces. The smoothing force is specified by the floatSmoothFactor which
typically has values between 0.05 and 0.8. Another force is the surface
finding force which is specified by the intFindSurfFactor parameter which
typically has values between 0.0 and 0.5. The surface finding force lets
a vertex move in the direction of its normal vector until it finds an
intensity value in the underlying VMR data set as specified by the intFindIntensity
parameter. The surface finding force can be turned off by specifying a
intFindSurfFactor of '0.0' or by setting the boolSmoothingMode parameter
to 'True'.
-
- Parameters:
-
intNrOfIterations
- number of sequential morphing steps
intUpdateScreen - Specifies number of morphing steps after
which the screen has to be updated
floatSmoothFactor - Smoothing force
floatFindSurfFactor - Surface finding force
intFindIntensity - Intensity value at which a moving vertex
has to stop
boolSmoothingMode -
-
InflateMesh(
number NrOfIterations, number ScreenUpdateIterations, number SmoothTau,
string RefMesh)
-
Unfolds
the sulci of a folded mesh representing the cortical sheet of a hemisphere.
During the inflation process, the hemisphere grows because the surface
area is kept constant with respect to a linked reference mesh. Valid only
if objDocument is of type VMR and and at least one mesh is present in
the Surface Module window. If multiple meshes exist, the inflation process
is applied to the current mesh. This is a specialized version of mesh
morphing using only the smoothing force.
-
- Parameters:
-
intNrOfIterations
- Individual morphing steps producing small changes can be repeated as
specified by the intNrOfIterations parameter.
intUpdateScreen - The screen is not necessarily updated after
each morphing step but after several steps as specified by the intUpdateScreen
parameter.
floatSmoothFactor - The smoothing force is specified by the
floatSmoothFactor which typically has values between 0.3 and 0.8 for inflation.
strReferenceMesh - In the strReferenceMesh parameter, a mesh
is specified which is used for the computation of the reference surface
area. This mesh is typically the same mesh used at the start of the inflation
process.
-
SaveMesh(string
MeshFileName)
-
Saves
a surface mesh file to disk. Surface mesh file names have extension ".srf".
Valid only if objDocument is of type VMR and at least one mesh is present
in the Surface Module window. If multiple meshes exist, the current mesh
is saved. The last loaded or created mesh automatically gets the "current"
status. The current mesh can be specified interactively by using the "Select
Mesh icon"; a script command for this purpose will be added in a
later release.
-
- Parameters:
-
strMeshFileName
-
- Returns:
-
operationSucceeded
(boolean)
-
ReverseSliceOrder()
-
Reverse
the order of the slices (*stc files) from ascending to descending
-
-
UninterleaveSliceOrder()
-
Change
the interleaved slices to continuous ascending or descending
-
-
SpatialGaussianSmoothing(
number FWHM, string UnitsFWHM)
-
Spatial
Gaussian smoothing for FMR projects Spatial smoothing uses a 3D gaussian
kernel. The width of the kernel can be specified in millimeters or pixels.
Note that the millimeter specification is only correct if the "voxel
resolution" has been specified correctly (or more conveniently if
it was extracted from the file header during project creation). The kernel
width is specified by the FWHM parameter.
-
- Parameters:
-
FWHM - number,
Full width at half maximum of the smoothing kernel
UnitsFWHM - String, should indicate 'mm' or 'pixel'
-
SpatialGaussianSmoothingEx(
number FWHM, string UnitsFWHM, number InSpaceDomain, number In3D, string
NewFMRFile, string NewSTCPrefix)
-
Spatial
Gaussian smoothing for FMR projects - extended version If you want to
run gaussian smoothing only within the slices, specify the 2D or the 3D
(default) parameter. Spatial smoothing is executed in the space domain
(image space) as default, which is fast for small kernels. For large kernels
(more than 15 mm), smoothing in the frequency domain is often faster.
If you want to use frequency domain gaussian smoothing, specify the the
frequency domain parameter.
-
- Parameters:
-
FWHM - number,
Full width at half maximum of the smoothing kernel
UnitsFWHM - String, should indicate 'mm' or 'pixel'
Specification - whether to smooth in space domain or not (otherwise
in frequency domain)
Smooth - in 3D (default) (or 2D) (boolean)
Name - of new FMR file
name - of new *.stc prefix
-
TemporalGaussianSmoothing(
number FWHM, string UnitsFWHM)
-
Temporal
Gaussian smoothing Since temporal gaussian smoothing blurs timing information
across neighboring data points, it is not recommended as default. Temporal
smoothing improves, however, the signal-to-noise ratio by removing high
frequency fluctuations. The width of the kernel can now be specified in
seconds. Note that the specification in seconds is only correct if the
TR value has been specified correctly. The kernel width has a default
value of "2.8" seconds. If you want to specify the width of
the kernel in units of data points (TR's), set the data points parameter
instead of the secs parameter.
-
- Parameters:
-
Width - of
the smoothing kernel full width at half a maximum - default 2.8 secs
Smoothing - units - "sec" or "TR"
-
TemporalGaussianSmoothingEx(
number FWHM, string UnitsFWHM, number InTimeDomain, string NewFMRFile,
string NewSTCPrefix)
-
Temporal
Gaussian smoothing - extended version Since temporal gaussian smoothing
blurs timing information across neighboring data points, it is not recommended
as default. Temporal smoothing improves, however, the signal-to-noise
ratio by removing high frequency fluctuations. The width of the kernel
can now be specified in seconds. Note that the specification in seconds
is only correct if the TR value has been specified correctly. The kernel
width has a default value of "2.8" seconds. If you want to specify
the width of the kernel in units of data points (TR's), set the data points
parameter instead of the secs parameter.
-
- Parameters:
-
Width - of
the smoothing kernel full width at half a maximum - default 2.8 secs
Smoothing - units - "sec" or "TR"
Domain - where the smoothing takes place - time domain or frequency
domain
Name - of the new FMR file
Name - of teh new STC prefix
-
LinearTrendRemoval()
-
Remove
linear drifts from the data
-
-
LinearTrendRemovalEx(
string NewFMRFile, string NewSTCPrefix)
-
Remove
linear drifts from the data - extended version
-
- Parameters:
-
Name - of
new FMR file //@param Name of new STC prefix
-
TemporalHighPassFilter(
number HighPassValue, string UnitsHighPass)
-
Apply
a HighPassFilter in the temporal domain; typically used with '2D' fmr
files HighPassFiltered fmr file is saved under name <previous_name>_THP<nr>c.
'THP' means 'temporal high pass filter' and <nr>c saves the number
of cycles.
-
- Parameters:
-
HighPassValue
-
UnitsHighPass -
-
TemporalHighPassFilterEx(
number HighPassValue, string UnitsHighPass, string NewFMRFile, string
NewSTCPrefix)
-
Apply
a HighPassFilter in the temporal domain; typically used with '2D' fmr
files HighPassFiltered fmr file is saved under name <previous_name>_THP<nr>c.
'THP' means 'temporal high pass filter' and <nr>c saves the number
of cycles.
-
- Parameters:
-
HighPassValue
- in cycles
UnitsHighPass - in cycles
NewFMRFile - new name of the fmr file to be filtered
NewSTCPrefix - new prefix of the stc files
-
ClearStimulationProtocol()
-
Used
to start a new stimulation protocol;
-
-
AddCondition(string
ConditionName)
-
Adds
a condition to a stimulation protocol
-
- Parameters:
-
conditionName
-
-
AddInterval(
string ConditionName, number IntervalStart, number IntervalEnd)
-
Add
an interval to a stimulation protocol. Example: 'doc.AddInterval "Images
in RVF", 1, 2'.
-
- Parameters:
-
conditionName
-
intervalStart -
intervalEnd -
-
SetConditionColor(
string ConditionName, number ColorR, number ColorG, number ColorB)
-
Sets
the condition color in stimulation protocol. Example: 'doc.SetConditionColor
"Images in LVF", 0, 255, 0'.
-
- Parameters:
-
ColorR -
Red intensity in a scale from 0 to 255
ColorG - Green intensity in a scale from 0 to 255
ColorB - Blue intensity in a scale from 0 to 255
-
SaveStimulationProtocol(string
StimulationProtocolFileName)
-
Save
the created protocol. Example: 'doc.SaveStimulationProtocol "CG_OBJECTS_FROMSCRIPT.prt"'
-
- Parameters:
-
stimulationProtocolFileName
-
-
ClearDesignMatrix()
-
Create
a design matrix. Example: 'doc.ClearDesignMatrix'
-
-
AddPredictor(string
PredictorName)
-
Adds
a predictor to a design matrix Example: 'docAddPredictor "RVF"'
-
- Parameters:
-
predictorName
-
-
SetPredictorValuesFromCondition(
string PredictorName, string ConditionName, number ValueForConditionIntervals)
-
Set
predictor value for a condition in a design matrix. Example: 'doc.SetPredictorValuesFromCondition
"RVF", "Images in RVF", 1.0'.
-
- Parameters:
-
predictorName
-
conditionName -
valueForConditionIntervals -
-
SetPredictorValues(
string PredictorName, number IntervalStart, number IntervalEnd, number
ValueForInterval)
-
Set
any predictor value at any time point (interval) in a design matrix. Example:
'doc.AddPredictor "Linear Trend" For i = 1 To doc.NrOfVolumes
value = i*0.1 doc.SetPredictorValues "Linear Trend", i, i, value
Next'
-
- Parameters:
-
predictorName
-
intervalStart -
intervalEnd -
valueForInterval -
-
ApplyHemodynamicResponseFunctionToPredictor(string
PredictorName)
-
Apply
the hemodynamic response function to a predictor in a design matrix Example:
'docApplyHemodynamicResponseFunctionToPredictor "RVF"'
-
- Parameters:
-
predictorName
-
-
LoadSingleStudyGLMDesignMatrix(string
DesignMatrixFileName)
-
Loads
an existing design matrix. Example: 'doc.LoadSingleStudyGLMDesignMatrix
"CG_OBJECTS_FROMSCRIPT.rtc"'
-
- Parameters:
-
designMatrixFileName
-
-
SaveSingleStudyGLMDesignMatrix(string
DesignMatrixFileName)
-
Save
the single study design matrix (reference time course, *rtc)
-
- Parameters:
-
RTCFileName
- Name and filepath of design matrix
-
ComputeSingleStudyGLM()
-
Run
the single study GLM
-
-
ClearContrast()
-
Clear
contrast in design matrix
-
-
SetContrastValue(
string PredictorName, int ValueForContrastElement)
-
Define
whether a predictor is included in the model Example: 'docSetContrastValue
"RVF", -1'
-
- Parameters:
-
valueForContrastElement
-
-
ClearMultiStudyGLMDefinition()
-
Clear/create
multi study, multi subject GLM to specify study x predictor interaction
effects
-
- Since:
-
4.6.0
-
AddStudyAndDesignMatrix(
string StudyFileName, string DesignMatrixFileName)
-
Add
subject study and design matrix to multi study, multi subject GLM
-
- Parameters:
-
studyFileName
- Should be a .fmr or .vtc file
designMatrixFileName - Should be a .rtc file
-
ComputeMultiStudyGLM(string
GLMFileName)
-
Run
the multi study, multi subject GLM
-
- Parameters:
-
GLMFileName
- Multi study, multi subject GLM file (*.mdm)
-
LoadMultiStudyGLMDefinitionFile(string
MultiStudyGLMDefinitionFileName)
-
Loads
an existing multi study, multi subject design matrix
-
- Parameters:
-
multiStudyGLMDefinitionFileName
- Should be a *.mdm file
-
SaveMultiStudyGLMDefinitionFile(string
MultiStudyGLMDefinitionFileName)
-
Saves
a mulit study, multi subject design matrix
-
- Parameters:
-
multiStudyGLMDefinitionFileName
- Name with *.mdm extension
-
- This class
has no child classes.
-
-
Alphabetic
index
This page was
generated with the help of DOC++.