Creating VMR Projects

 

A script to create a VMR could look the following:

 

var BVQX = Application.BrainVoyagerQX;

var vmrPath = "C:/MyData/";

docVMR = BVQX.CreateProjectVMR("DICOM", vmrPath + "BetSog_20040312_Goebel_C2 -0002-0001-0001.dcm", 192, true, 256, 256, 2, vmrPath);

docVMR.SaveAs(vmrPath + "newProject.vmr");

 

 

Via scripting

Via the BrainVoyager user interface

 

Select the project type:

 

...CreateProjectVMR(..,..,..,..,..,..,..,..);

 

 

 

 

Define the file type (see topic 'Project parameters'):

 

..("DICOM",..,..,..,..,..,..,..);

 

 

 

 

Create a variable with the first file name:

 

..(..,vmrPath + "BetSog_20040312_Goebel_C2 -0002-0001-0001.dcm",..,..,..,..,..,..);

 

 

 

 

Specify the number of slices:

 

..(..,..,192,..,..,..,..,..);

 

 

 

5. In case the data are Big Endian, set the 'swapBytes' parameter to true:

 

..(..,..,..,true,..,..,..,..);

 

 

 

 

6. The x-resolution parameter should describe the width of the image (number of columns):

 

..(..,..,..,..,256,..,..,..);

 

 

 

 

7. The y-resolution parameter should describe the height of the image (number of rows):

 

..(..,..,..,..,..,256,..,..);

 

 

 

8. The number of bytes is for a VMR project often just 2 (16 bits) or 1 (8 bits). In the script example above, the value 2 is used.

 

..(..,..,..,..,..,..,2,..);

 

For more information, see Bytes per pixel.

 

 

 

 

9. Enter a target directory:

 

..(..,..,..,..,..,..,..,vmrPath);

 

 

 

 

 

10. Save the project with the SaveAs( name ) method.

 

 

 

 

 

VMR specific methods

CreateProjectVMR():doc

AutoTransformToIsoVoxel( interpolationmethod, filename )

AutoTransformToSAG( filename )

GetVoxelIntensity():Number

SetVoxelIntensity( intensityValue )