The volume defines the space in which reconstruction can take place. The example below illustrates the basic usage.
const void *bytes;
int length;
bool continue_scanning = true;
if (_kbhit()) {
char k = _getch();
switch(k) {
case 'r': {
break;
}
case 's' : {
FILE *f = fopen("volume.bin", "wb");
fwrite(&length, sizeof(int), 1, f);
fwrite(bytes, 1, length, f);
fclose(f);
break;
}
case 'l': {
FILE *f = fopen("volume.bin", "rb");
fread(&length, sizeof(int), 1, f);
void *buffer = malloc(length);
fread(buffer, 1, length, f);
fclose(f);
free(buffer);
break;
}
case 'x': {
continue_scanning = false;
break;
}
}
}
}
}
Handle referencing a volume object.
A reme_volume_t represents a volume in 3D space. Everything within that volume is potentially reconstructed during processing sensor data.
Destroy a previously created volume object.
- Parameters
-
c | A pointer to a valid context object |
v | A mutable pointer to a valid volume handle to destroy |
- Return values
-
Get the volume time.
The volume time corresponds to the number of updates performed on this volume. Initialize it is set to zero.
- Parameters
-
c | A valid context object |
v | A valid volume object |
time | The volume time |
- Return values
-
Returns the content of the volume as an array of bytes.
Downloads the current content of the volume to host side. Using in combination with reme_volume_set_bytes one can resume a previously started reconstruction as long as the volume parameters (dimensions) match.
- Parameters
-
c | A valid context object |
v | A valid volume object |
bytes | A mutable pointer that will receive the address of the volume content. |
length | A pointer that will receive the size of the returned array in bytes. |
- Return values
-
- Examples:
- example_reconstructmesdk_volume.cpp.
Sets the content of the volume to the given array of bytes.
Uploads the given array as volume content to the device side. Using in combination with reme_volume_get_bytes one can resume a previously started reconstruction as long as the volume parameters (dimensions) match.
- Parameters
-
c | A valid context object |
v | A valid volume object |
bytes | An array of bytes |
length | Number of bytes in the array |
- Return values
-
- Examples:
- example_reconstructmesdk_volume.cpp.
Reset the volume to empty state.
Forces the volume to clear its content.
- Parameters
-
c | A valid context object |
v | A valid volume object |
- Return values
-
- Examples:
- example_reconstructmesdk_volume.cpp.