Share via


ColorReconstruction.ExportVolumeBlock Method (Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int16[], Int32[])

Kinect for Windows 1.8

Exports a part or all of the reconstruction volume as a short array, with color as an integer array.

Syntax

public void ExportVolumeBlock (
         int sourceOriginX,
         int sourceOriginY,
         int sourceOriginZ,
         int destinationResolutionX,
         int destinationResolutionY,
         int destinationResolutionZ,
         int voxelStep,
         short[] volumeBlock,
         int[] colorVolumeBlock
)

Parameters

  • sourceOriginX
    Type: Int32
    The reconstruction volume voxel index in the x-axis from which the extraction should begin. This value must be greater than or equal to zero and less than the reconstruction volume x-axis voxel resolution.

  • sourceOriginY
    Type: Int32
    The reconstruction volume voxel index in the y-axis from which the extraction should begin. This value must be greater than or equal to zero and less than the reconstruction volume y-axis voxel resolution.

  • sourceOriginZ
    Type: Int32
    The reconstruction volume voxel index in the z-axis from which the extraction should begin. This value must be greater than or equal to zero and less than the reconstruction volume z-axis voxel resolution.

  • destinationResolutionX
    Type: Int32
    The x-axis resolution/width of the new voxel volume to return in the array. This value must be greater than zero and less than or equal to the current volume x-axis voxel resolution. The final count of (sourceOriginX+(destinationResolutionX*voxelStep) must not be greater than the current reconstruction volume x-axis voxel resolution.

  • destinationResolutionY
    Type: Int32
    The y-axis resolution/height of the new voxel volume to return in the array. This value must be greater than zero and less than or equal to the current volume y-axis voxel resolution. The final count of (sourceOriginY+(destinationResolutionY*voxelStep) must not be greater than the current reconstruction volume y-axis voxel resolution.

  • destinationResolutionZ
    Type: Int32
    The z-axis resolution/depth of the new voxel volume to return in the array. This value must be greater than zero and less than or equal to the current volume z-axis voxel resolution. The final count of (sourceOriginZ+(destinationResolutionZ*voxelStep) must not be greater than the current reconstruction volume z-axis voxel resolution.

  • voxelStep
    Type: Int32
    The step value in integer voxels for sampling points to use in the volume when exporting. This value must be greater than zero and less than the smallest volume axis voxel resolution. To export the volume at its full resolution, use a step value of one. Use higher step values to skip voxels and return the new volume as if there were a lower effective resolution volume. For example, when exporting with a destination resolution of 320^3, setting voxelStep to two would actually cover a 640^3 voxel area (destinationResolution*voxelStep) in the source reconstruction, but the data returned would skip every other voxel in the original volume.

    Note

    Any value higher than one for this value runs the risk of missing zero crossings, and hence missing surfaces or surface details.

  • volumeBlock
    Type: Int16

    A pre-allocated short array to be filled with volume data. The number of elements in this array should be allocated as (destinationResolutionX*destinationResolutionY*destinationResolutionZ). To access the voxel located at x,y,z use pVolume[z][y][x], or index as a one-dimensional array for a particular voxel (x,y,z) as follows (with pitch = x resolution, slice = (y resolution * pitch)).

    unsigned int index = (z * slice)  + (y * pitch) + x;

    Note

    A right handed coordinate system is used, with the origin of the volume (that is, voxel 0,0,0) at the top left of the front plane of the cube. Similar to bitmap images with top left origin, +X is to the right, +Y down, and +Z is forward from the origin into the reconstruction volume.

  • colorVolumeBlock
    Type: Int32
    A pre-allocated integer array to be filled with color volume data. The number of elements in this array must be the same as the number of elements in the volumeBlock array.

Remarks

The surface boundary occurs where the trilinearly-interpolated voxel values have a zero crossing (that is, when an interpolation crosses from positive to negative or vice versa). A voxel value of 0x8000 indicates that a voxel is uninitialized and has no valid data associated with it.

Requirements

Namespace: Microsoft.Kinect.Toolkit.Fusion

Assembly: Microsoft.Kinect.Toolkit.Fusion (in microsoft.kinect.toolkit.fusion.dll)

See Also

Reference

ColorReconstruction Class
ColorReconstruction Members
Microsoft.Kinect.Toolkit.Fusion Namespace