PET Volume

petl_server.PETLserver.volume_defined(self)

Returns True if the volume parameters are specified, otherwise returns False

petl_server.PETLserver.set_default_volume(self, scale=1.0)

Sets the default values for the volume parameters. This volume fills the entire PET field of view and the voxel size matches the detector pixel pitch. The PET geometry MUST be specified prior to calling this function.

scale (float): optional parameter the scales the voxel size by the given amount

small numbers make smaller voxels (and thus more voxels), while larger numbers make larger voxels (and thus fewer voxels)

petl_server.PETLserver.set_volume(self, numX, numY, numZ, voxelWidth, voxelHeight=0.0, offsetX=0.0, offsetY=0.0, offsetZ=0.0)

Sets the PET volume parameters

Parameters:
  • numX (int) – number of voxels in x

  • numY (int) – number of voxels in y

  • numZ (int) – number of voxels in z

  • voxelWidth (float) – the width (x and y dimensions) of a voxel (mm)

  • voxelHeight (float) – the height (z dimension) of a voxel (mm)

  • offsetX (float) – the x-coordinate of the center voxel

  • offsetY (float) – the y-coordinate of the center voxel

  • offsetZ (float) – the z-coordinate of the center voxel

petl_server.PETLserver.numX(self, N=None)

If a positive number is given, then sets the number of voxels in the x dimension to this value. If no argument is given, simply returns the number of voxels in the x dimension.

Parameters:

N (int) – number of voxels in the x dimension

Returns:

number of voxels in the x dimension

petl_server.PETLserver.numY(self, N=None)

If a positive number is given, then sets the number of voxels in the y dimension to this value. If no argument is given, simply returns the number of voxels in the y dimension.

Parameters:

N (int) – number of voxels in the y dimension

Returns:

number of voxels in the y dimension

petl_server.PETLserver.numZ(self, N=None)

If a positive number is given, then sets the number of voxels in the z dimension to this value. If no argument is given, simply returns the number of voxels in the z dimension.

Parameters:

N (int) – number of voxels in the z dimension

Returns:

number of voxels in the z dimension

petl_server.PETLserver.voxelWidth(self, w=None)

If a positive number is given, then sets the voxel width to this value. If no argument is given, simply returns the voxelWidth value.

Parameters:

w (float) – voxel width (mm)

Returns:

the volume voxel width (mm)

petl_server.PETLserver.voxelHeight(self, h=None)

If a positive number is given, then sets the voxel height to this value. If no argument is given, simply returns the voxelHeight value.

Parameters:

h (float) – voxel height (mm)

Returns:

the volume voxel height (mm)

petl_server.PETLserver.offsetX(self, x_0=None)

If a positive number is given, then sets the offsetX to this value. If no argument is given, simply returns the offsetX value.

Parameters:

x_0 (float) – the x-coordinate of the center voxel

Returns:

the x-coordinate of the center voxel

petl_server.PETLserver.offsetY(self, y_0=None)

If a positive number is given, then sets the offsetY to this value. If no argument is given, simply returns the offsetY value.

Parameters:

y_0 (float) – the y-coordinate of the center voxel

Returns:

the y-coordinate of the center voxel

petl_server.PETLserver.offsetZ(self, z_0=None)

If a positive number is given, then sets the offsetZ to this value. If no argument is given, simply returns the offsetZ value.

Parameters:

z_0 (float) – the z-coordinate of the center voxel

Returns:

the z-coordinate of the center voxel

petl_server.PETLserver.allocate_volume(self)

Allocates a numpy array for the volume.