Hi,
I have run into a problem with voxel dimensions when I use large numerical values in the origin of the im3d object. voxdims() on my object returns values close to, but not exactly the same as the correct values. Example:
> test_1 <- im3d(dims = c(83,83,83), voxdims = c(25.3, 25, 0.25), origin = c(573015.5,6222512.5,-33) )
does not give the expected voxel dimensions of 25.3, 25 and 0.25:
> voxdims(test_1)
[1] 25.2926829 25.0000000 0.2560976
When I change the coordinates of the origin:
> test_2 <- im3d(dims = c(83,83,83), voxdims = c(25.3, 25, 0.25), origin = c(15.5,12.5,-33) )
I get the expected result.
> voxdims(test_2)
[1] 25.30 25.00 0.25
This happens when one of the origin coordinates is above 3160227
test_3 <- im3d(dims = c(83,83,83), voxdims = c(25.3, 25, 0.25), origin = c(573015.5,3160227,-33) )
voxdims(test_3)
is ok, but
test_4 <- im3d(dims = c(83,83,83), voxdims = c(25.3, 25, 0.25), origin = c(573015.5,3160227,-33) )
voxdims(test_4)
is not.
Is this behavior expected or is it a bug?
I can reproduce this behaviour on Windows 10 and MacOS catalina. on (Microsoft) R 3.5 with nat version 1.8.11 and 1.10.2.
Regards,
Magnus