vol.create {espadon}R Documentation

Volume creating

Description

The vol.create function creates a volume object from a user-defined grid.

Usage

vol.create(
  n.ijk,
  dxyz,
  mid.pt = NULL,
  pt000 = NULL,
  default.value = NA,
  ref.pseudo = "ref1",
  frame.of.reference = "",
  alias = "",
  modality = "",
  description = "",
  number = 0
)

Arguments

n.ijk

Vector of length 3, representing the number of elements on the i, j and k axes.

dxyz

Vector of length 3, representing the x, y, z steps in mm, between voxels. See details.

mid.pt

Vector of length 3, representing the x, y, z coordinates of the midpoint of the volume. See details.

pt000

Vector of length 3, representing the x, y, z coordinates of the first voxel of the first plane.

default.value

Numerical or boolean value, representing the default value of the voxels.

ref.pseudo

Character string, frame of reference pseudonym of the created object.By defaukt equal to "ref1"

frame.of.reference

Character string, frame of reference of the created object.

alias

Character string, $alias of the created object.

modality

Character string, $modality of the created object.

description

Character string, describing the the created object.

number

Integer, by default set to 0, number of the created object.

Details

If mid.pt and pt000 are both equal to NULL, then mid.pt = c (0, 0, 0) by default. If mid.pt and pt000 are both different from NULL, then only mid.pt is taken into account.

Value

Returns a "volume" class object (see espadon.class for class definitions), in which the grid is defined by pt000 or mid.pt, dxyz n.ijk. If default.value are initialized to FALSE, then modality = "binary". The orientation of the patient is orthonormal to the grid.

Examples

new.vol <- vol.create (pt000 = c(1,10,10), dxyz = c (1 , 1, 1),
                       n.ijk = c(100, 100, 100),
                       ref.pseudo = "ref1",
                       frame.of.reference = "toyref1",
                       alias = "new ct", modality = "ct",
                       description = "")
str (new.vol)

[Package espadon version 1.6.0 Index]