In some circumstances, it is desirable to create volumes in ways other than reading from a file. The following functions provide methods to create a volume from scratch or to create a volume which is similar to an existing volume.
public Volume create_volume(
int n_dimensions,
char *dimension_names[],
nc_type nc_data_type,
BOOLEAN signed_flag,
Real voxel_min,
Real voxel_max )
public void set_volume_voxel_range(
Volume volume,
Real voxel_min,
Real voxel_max )
public void set_volume_real_range(
Volume volume,
Real real_min,
Real real_max )
public void set_volume_sizes(
Volume volume,
int sizes[] )
public void alloc_volume_data(
Volume volume )
Associated with each volume is a transformation from voxel space to world space. There are several ways to define this transformation. The simplest is just to specify it directly:
public void set_voxel_to_world_transform(
Volume volume,
General_transform *transform )
public General_transform *get_voxel_to_world_transform(
Volume volume )
public void set_volume_separations(
Volume volume,
Real separations[] )
public void set_volume_translation(
Volume volume,
Real voxel[],
Real world_space_voxel_maps_to[] )
public void set_volume_direction_cosine(
Volume volume,
int dimension,
Real dir[] )