It was pointed out to me on a few test files that the converted output had the first slice as last within each volume, and I noticed that the logic utilized for slice ordering int(chunk.slice_id / 2) - 1 becomes -1 if chunk.slice_id is 0, which was happening with the test E2E files.
Are there other files that you've encountered where the - 1 is needed? Removing it seems like a simple solution, but if some files need that last bit of the equation, then there might need to be more logic around whether or not to do the subtraction...
I think this is jsut a bug, thanks for spotting. I do recall an issue about e2e slice ordering, can't find it now but it seems like this may be the solution :)
It was pointed out to me on a few test files that the converted output had the first slice as last within each volume, and I noticed that the logic utilized for slice ordering
int(chunk.slice_id / 2) - 1
becomes -1 ifchunk.slice_id
is 0, which was happening with the test E2E files.Are there other files that you've encountered where the
- 1
is needed? Removing it seems like a simple solution, but if some files need that last bit of the equation, then there might need to be more logic around whether or not to do the subtraction...