API Javascript

brainsprite(params)

Brainsprite viewer object prototype

Arguments
  • params.smooth (boolean) – turn on/off smoothing of the main slices.

  • params.flagValue (boolean) – turn on/off display of the current value.

  • params.colorBackground (string) – the color for background.

  • params.colorFont (string) – the color for the fonts.

  • params.colorCrosshair (string) – the color of the crosshair.

  • params.flagCoordinates (boolean) – turn on/off slice coordinates.

  • params.origin (object) – {“X”,”Y”,”Z”} coordinates of the origin .

  • params.voxelSize (number) – the size of one voxel (assumed to be isotropic)

  • params.affine (array) – the voxel-to-world transform. Use folse for isotropic diagonal using origin and voxelSize.

  • params.heightColorBar (number) – height of the text for the colorbar.

  • params.sizeFont (number) – the size of other texts.

  • params.nbDecimals (integer) – the number of decimals when showing the value.

  • params.crosshair (boolean) – turns on/off the crosshair.

  • params.sizeCrosshair (float) – the size of the crosshair, expressed as a fraction of the slice (comprised between 0 and 1).

  • params.title (string) – the title for the viewer. false will use no title.

  • params.numSlice (object) – {“X”, “Y”, “Z”} coordinates of the initial cut. false will use the middle of the volume.

  • params.overlay (object) – object. If false, no overlay.

  • params.overlay.opacity (number) – the opacity of the overlay.

  • params.onclick (string) – command to call on click.

  • params.colormap (object) – object. if false, no colormap.

  • params.nanValue (boolean) – unable to read values.

Returns

object – a brainsprite viewer object.