I have Ported your VoxelSDK to .net c# completely managed.
I will post it here as soon as i get rid of some bugs.
It seems like i am filling the cell matrix in a wrong order which results in the attached image slice of a ball.
Does someone have a clue in which order the values are in the array ??
Here is a sample code in which i am putting one cell into the complete voxelPhantom .. but something seems to be mixed up ..
ushort[, ,] voxelPhantom = new ushort[width * 9, height * 9, depth * 9];
foreach (VolumeCell cell in pos.Cells)
{
int xpos = (cell.Cx + xmin * -1) * 8;
int ypos = (cell.Cy + ymin * -1) * 8;
int zpos = (cell.Cz + zmin * -1) * 8;
int counter = 0;
for (int z = 0; z < 8; z++)
{
for (int y = 0; y < 8; y++)
{
for (int x = 0; x < 8; x++)
{
if (cell.Values.Count == 0)
{
voxelPhantom[xpos + x, ypos + y, zpos + z] = cell.SameValue;
}
else
{
voxelPhantom[xpos + x, ypos + y, zpos + z] = cell.Values[counter];
}
}
counter++;
}
counter += 9;
}
}