[yt-svn] commit/yt: 4 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Sep 21 11:47:47 PDT 2015


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/0392dd31534b/
Changeset:   0392dd31534b
Branch:      yt
User:        jisuoqing
Date:        2015-09-04 06:54:32+00:00
Summary:     Change VR to RHS
Affected #:  1 file

diff -r fceb5ab0e3c639902f1d00e9ad6413367fd8fe27 -r 0392dd31534b3b51307207b377cd5147a289d843 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):
+        # If the call is from VR, the image is flipped to get RHS
         image = self.volume.reduce_tree_images(image,
                                                camera.lens.viewpoint)
         image.shape = camera.resolution[0], camera.resolution[1], 4
+        if call_from_VR: image = np.fliplr(image)
         if self.transfer_function.grey_opacity is False:
             image[:, :, 3] = 1.0
         return image


https://bitbucket.org/yt_analysis/yt/commits/2663b2457d33/
Changeset:   2663b2457d33
Branch:      yt
User:        jisuoqing
Date:        2015-09-04 07:16:30+00:00
Summary:     Minor change
Affected #:  1 file

diff -r 0392dd31534b3b51307207b377cd5147a289d843 -r 2663b2457d3318c208c18c1e1181d0ffcfff94f0 yt/visualization/volume_rendering/render_source.py
--- a/yt/visualization/volume_rendering/render_source.py
+++ b/yt/visualization/volume_rendering/render_source.py
@@ -238,10 +238,10 @@
         return self.current_image
 
     def finalize_image(self, camera, image, call_from_VR=False):
-        # If the call is from VR, the image is flipped to get RHS
         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 flipped to get RHS
         if call_from_VR: image = np.fliplr(image)
         if self.transfer_function.grey_opacity is False:
             image[:, :, 3] = 1.0


https://bitbucket.org/yt_analysis/yt/commits/37bacc221379/
Changeset:   37bacc221379
Branch:      yt
User:        jisuoqing
Date:        2015-09-14 21:38:52+00:00
Summary:     Change fliplr to rotation by 180 degree
Affected #:  1 file

diff -r 2663b2457d3318c208c18c1e1181d0ffcfff94f0 -r 37bacc22137900e2377f7c1f4fa0870d9ea029ad yt/visualization/volume_rendering/render_source.py
--- a/yt/visualization/volume_rendering/render_source.py
+++ b/yt/visualization/volume_rendering/render_source.py
@@ -241,8 +241,8 @@
         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 flipped to get RHS
-        if call_from_VR: image = np.fliplr(image)
+        # 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


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