-
Cubic subdomains limit the max size of the subdomain that is used in the REV function due to the high aspect ratio of my image. If I could randomly generate volumes that have the same aspect ratio as my original image this would be useful. Any ideas? Many thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @MaPhewJ, I was on vacay last week, sorry for the delay. Your proposal is interesting. I'm pretty sure we could easily control the aspect ratio of the cube, but that would require altering the function, and I'm not totally convinced this is a universally desired behavior. Have you thought about zooming your image to be cubic? If you use the scipy.ndimage.zoom function you can zoom different amounts in different directions, so |
Beta Was this translation helpful? Give feedback.
Hi @MaPhewJ, I was on vacay last week, sorry for the delay. Your proposal is interesting. I'm pretty sure we could easily control the aspect ratio of the cube, but that would require altering the function, and I'm not totally convinced this is a universally desired behavior. Have you thought about zooming your image to be cubic? If you use the scipy.ndimage.zoom function you can zoom different amounts in different directions, so
zoom(im, zoom=[1, 1, 10], order=0)
would expand the z-dimension by a factor of 10. I "think" the result would actually be valid "as is" since you'll get 10x more pixels in your volume, but your volume will be 10x larger, so this should cancel out. Worth a shot maybe?