Let me be a bit more explicit....
First thing you do is get the size of your original object in voxels. We'll call it I, J, K.
Now you take the maximum of I, J and K and round that up to the nearest power of 2. For example if your object is 490 by 496 by 832 voxels, the largest is 832 and you round that up to 1024. We'll call that number S...
Now you calculate the depth of your octree, call it D. So that is 2^(D-1) = S. So for 1024, D=11, including the root voxel. You can just do some calculation on the highest order bit number of S to get D. You can do a loop and bit shifts and mask to get the number easily. I think you might have to add or subtract one in places.
Now you can create a coordinate system you can use to address voxels. Each one has 3 coordinates like your original voxels. Also each level of the tree has it's own coordinate system. In the top level there is only one voxel so it's (0 to 0,0 to 0, 0 to 0), For the second level you have eight voxels so each one has coordinates ranging from (0 to 1,0 to 1, 0 to 1). The third level has (0 to 3, 0 to 3, 0 to 3), the fourth has (0 to 7, 0 to 7, 0 to 7) ...... all the way to (0 to 1023, 0 to 1023, 0 to 1024) ....
But how do you generate these numbers? It's easy, every time you subdivide a voxel. The new numbers are based on it's parent. So if the parent has (IP, JP, KP) the children's voxel coordinates are as follows:
Child 0 = (IP*2, JP*2, KP*2 )
Child 1 = (IP*2+1, JP*2, KP*2 )
Child 2 = (IP*2 , JP*2+1, KP*2 )
Child 3 = (IP*2+1, JP*2+1, KP*2 )
Child 4 = (IP*2, JP*2, KP*2+1)
Child 5 = (IP*2+1, JP*2, KP*2+1)
Child 6 = (IP*2 , JP*2+1, KP*2+1)
Child 7 = (IP*2+1, JP*2+1, KP*2+1)
So now each of our children has coordinates. So what do we do with them? We subdivide our tree all the way down to level D, but we do it recursively in a "depth first" traversal. Once we get to leaf voxels, we can use the child's coordinates to check the original voxel matrix which you provided, and it's coordinates will exactly match your matrix! (assuming I didn't mess up).
So let's talk about subdivision. We allocate 8 new voxels and have the parent point to them. Then we call a recursive function on each of them. Once we get to the leaf voxels we grab data from the original table using our coordinates. If there is data, save it in the voxel and our function returns true, if not, our function returns false. When we return to the parent function, it deletes all child voxels for which it's function returned false. If they all return false we delete them all and that function itself returns false to it's parent. If there is at least one with a sub-voxel remaining (i.e. there is data below) it returns true.
So now when we get back to the top we have our octree with your skull in it. The leaf nodes have I, J, K indexes which you can easily translate into X,Y, Z however you like. You can also calculate the X, Y, Z bounds of your higher level nodes with a a simple calculation using depth and that will work for ray tracking nicely.