[yt-svn] commit/yt: chummels: Merged in jisuoqing/yt (pull request #1736)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Sep 21 11:47:51 PDT 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/767fa44cb564/
Changeset: 767fa44cb564
Branch: yt
User: chummels
Date: 2015-09-21 18:47:39+00:00
Summary: Merged in jisuoqing/yt (pull request #1736)
[BUGFIX] Change VR to RHS, fix #758
Affected #: 1 file
diff -r 08729e09892c5ead10240cc2f0ba1d064cffd127 -r 767fa44cb5642b05fcc67711f6a23d4e7255a441 yt/visualization/volume_rendering/render_source.py
--- a/yt/visualization/volume_rendering/render_source.py
+++ b/yt/visualization/volume_rendering/render_source.py
@@ -229,16 +229,20 @@
total_cells += np.prod(brick.my_data[0].shape)
mylog.debug("Done casting rays")
- self.current_image = self.finalize_image(camera, self.sampler.aimage)
+ self.current_image = self.finalize_image(camera,
+ self.sampler.aimage,
+ call_from_VR=True)
if zbuffer is None:
self.zbuffer = ZBuffer(self.current_image,
np.inf*np.ones(self.current_image.shape[:2]))
return self.current_image
- def finalize_image(self, camera, image):
+ def finalize_image(self, camera, image, call_from_VR=False):
image = self.volume.reduce_tree_images(image,
camera.lens.viewpoint)
image.shape = camera.resolution[0], camera.resolution[1], 4
+ # If the call is from VR, the image is rotated by 180 to get correct up dir
+ if call_from_VR: image = np.rot90(image, k=2)
if self.transfer_function.grey_opacity is False:
image[:, :, 3] = 1.0
return image
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list