General parameters that are used during creation of a BrainVoyager project are the file type and the first file name. An short explanation follows below.
A statement to create an FMR project could look the following:
var docFMR = BVQX.CreateProjectFMR( FileType, FirstFileName, NrOfVolumes, nrOfVolumesToSkip, createAMR, nrOfSlices, prefixSTCs, swapBytes, resX, resY, nrBytes, savingDir);
Dependent from the file type of the raw data, one of the following values can be selected for the "File type" parameter.
File type |
Value |
DICOM |
"DICOM" |
DICOM mosaic |
"DICOM" |
Siemens |
"SIEMENS" |
General Electric *.I |
"GE_I" (no parameters for +20 logic like in GUI) |
General Electric *.MR |
"GE_MR" |
Philips |
"PHILIPS_REC" |
Analyze |
"ANALYZE" |
User defined |
name of *.uff file (without ".uff" extension), f.e. "MY_UFF" |
If the first file name includes a path (i.e. "C:/MyData/CG_OBJECTS.fmr"), it can be located anywhere; otherwise BrainVoyager assumes that the file is located in the current directory. The current directory can be set explicitly with the command <bvqx object>.SetCurrentDirectory( <path> ). When all the required files are in the current directory, no path name needs to be added to the filename parameter: "CG_OBJECTS.fmr".
To retrieve a path or file name without typing it literally, the FileDialog object can be used.
When the script is running, a dialog window showing the file structure will be shown:
The method getOpenFileName() of the object FileDialog returns the name of the file including the path name:
Path names are separated by a "/", but "\" are also accepted. They will be converted internally.
This is the total number of volumes per run. For each run, create one FMR. The FMRs can then be aligned using intra-session alignment.
This is the number of volumes at the beginning that should be skipped because of for example higher saturation.
This value corresponds to the option "Create pseudo-AMR from first volume". Enter true when you would like a pseudo-AMR (*.amr) of the first volume of the functional data; otherwise enter false.
Provide here the number of slices per volume, for example 25.
This option corresponds to the option "Prefix of .stc files" on the Create Project Dialog (see figure above). Provide a string (text between double quotes) with the name for the *.stc file(s), for example: "untitled-".
The swapping of bytes refers to the order in which bytes are stored within a data type. For more information on swapping, see the section Bytes per pixel.
This refers to the number of pixels/voxels per row; common resolution values for functional images are 64 and 128. For anatomical or structural volumes, this is mostly 256.
This refers to the number of pixels/voxels per column; common resolution values for functional images are 64 and 128. For anatomical or structural volumes, this is mostly 256.
The number of bytes per pixel refers to the storage space that is used to save the intensity value. In case little storage space per pixel is chosen, the number of bytes per pixel is 1. A regular number for functional data is two bytes per pixel. For more information, see the section Bytes per pixel.
For the target directory, provide a string (text between double quotes) with the name of the target directory, for example "C:/Data/NewExperiment/".