[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Mar 9 09:35:33 PST 2016
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/bb1dddde79ea/
Changeset: bb1dddde79ea
Branch: yt
User: jisuoqing
Date: 2016-03-06 02:15:27+00:00
Summary: Make project_to_plane compatible with length-width auto-correction
Affected #: 1 file
diff -r 169c6b14377e4e691657a18547322d3d0c87aae3 -r bb1dddde79ea7cbf92ada7908538fce1cba97273 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -90,10 +90,6 @@
super(PlaneParallelLens, self).__init__()
def _get_sampler_params(self, camera, render_source):
- # Enforce width[1] / width[0] = resolution[1] / resolution[0]
- camera.width[1] = camera.width[0] \
- * (camera.resolution[1] / camera.resolution[0])
-
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
else:
@@ -127,6 +123,7 @@
dy = np.dot(pos - self.origin.d, camera.unit_vectors[0])
dz = np.dot(pos - self.front_center.d, -camera.unit_vectors[2])
# Transpose into image coords.
+ print int(res[1] * res[1]/res[0])
py = (res[0]*(dx/camera.width[0].d)).astype('int')
px = (res[1]*(dy/camera.width[1].d)).astype('int')
return px, py, dz
@@ -230,6 +227,11 @@
def project_to_plane(self, camera, pos, res=None):
if res is None:
res = camera.resolution
+
+ # Enforce width[1] / width[0] = resolution[1] / resolution[0]
+ camera.width[1] = camera.width[0] \
+ * (camera.resolution[1] / camera.resolution[0])
+
sight_vector = pos - camera.position.d
pos1 = sight_vector
for i in range(0, sight_vector.shape[0]):
@@ -386,6 +388,11 @@
if res is None:
res = camera.resolution
+ # Enforce width[1] / width[0] = 2 * resolution[1] / resolution[0]
+ # For stereo-type lens, images for left and right eye are pasted together,
+ # so the resolution of single-eye image will be 50% of the whole one.
+ camera.width[1] = camera.width[0] * (2. * res[1] / res[0])
+
if self.disparity is None:
self.disparity = camera.width[0] / 2.e3
https://bitbucket.org/yt_analysis/yt/commits/49e38e129afc/
Changeset: 49e38e129afc
Branch: yt
User: jisuoqing
Date: 2016-03-06 02:17:23+00:00
Summary: Minor change
Affected #: 1 file
diff -r bb1dddde79ea7cbf92ada7908538fce1cba97273 -r 49e38e129afcc87bac043bc201f42d38d45f79a4 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -229,8 +229,7 @@
res = camera.resolution
# Enforce width[1] / width[0] = resolution[1] / resolution[0]
- camera.width[1] = camera.width[0] \
- * (camera.resolution[1] / camera.resolution[0])
+ camera.width[1] = camera.width[0] * (res[1] /res[0])
sight_vector = pos - camera.position.d
pos1 = sight_vector
https://bitbucket.org/yt_analysis/yt/commits/1a97ec95eeda/
Changeset: 1a97ec95eeda
Branch: yt
User: jisuoqing
Date: 2016-03-06 02:18:48+00:00
Summary: Typo fix
Affected #: 1 file
diff -r 49e38e129afcc87bac043bc201f42d38d45f79a4 -r 1a97ec95eedae88a23c1bde3fe37825ae46ba5fb yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -123,7 +123,6 @@
dy = np.dot(pos - self.origin.d, camera.unit_vectors[0])
dz = np.dot(pos - self.front_center.d, -camera.unit_vectors[2])
# Transpose into image coords.
- print int(res[1] * res[1]/res[0])
py = (res[0]*(dx/camera.width[0].d)).astype('int')
px = (res[1]*(dy/camera.width[1].d)).astype('int')
return px, py, dz
https://bitbucket.org/yt_analysis/yt/commits/ed7bdd893ca7/
Changeset: ed7bdd893ca7
Branch: yt
User: atmyers
Date: 2016-03-09 17:35:18+00:00
Summary: Merged in jisuoqing/yt (pull request #2026)
[bugfix] Fix incorrect opaque object scale/location due to image length-size auto-adjustment, fix #1181
Affected #: 1 file
diff -r 14b7d1b6b9060f8364cff88cc0f006a8c1a7e9e6 -r ed7bdd893ca7b317c12e02dbc915bb3840ba7320 yt/visualization/volume_rendering/lens.py
--- a/yt/visualization/volume_rendering/lens.py
+++ b/yt/visualization/volume_rendering/lens.py
@@ -91,10 +91,6 @@
super(PlaneParallelLens, self).__init__()
def _get_sampler_params(self, camera, render_source):
- # Enforce width[1] / width[0] = resolution[1] / resolution[0]
- camera.width[1] = camera.width[0] \
- * (camera.resolution[1] / camera.resolution[0])
-
if render_source.zbuffer is not None:
image = render_source.zbuffer.rgba
else:
@@ -235,6 +231,10 @@
def project_to_plane(self, camera, pos, res=None):
if res is None:
res = camera.resolution
+
+ # Enforce width[1] / width[0] = resolution[1] / resolution[0]
+ camera.width[1] = camera.width[0] * (res[1] /res[0])
+
sight_vector = pos - camera.position.d
pos1 = sight_vector
for i in range(0, sight_vector.shape[0]):
@@ -393,6 +393,11 @@
if res is None:
res = camera.resolution
+ # Enforce width[1] / width[0] = 2 * resolution[1] / resolution[0]
+ # For stereo-type lens, images for left and right eye are pasted together,
+ # so the resolution of single-eye image will be 50% of the whole one.
+ camera.width[1] = camera.width[0] * (2. * res[1] / res[0])
+
if self.disparity is None:
self.disparity = camera.width[0] / 2.e3
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