From stefan at sun.ac.za Tue May 1 01:04:57 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 30 Apr 2012 22:04:57 -0700 Subject: Bizarre error In-Reply-To: References: Message-ID: On Mon, Apr 30, 2012 at 8:51 PM, Tony Yu wrote: > Actually I'm not too surprised that you can't reproduce this since you never > got a failure with the SSIM tests. But, yes, this is very strange. Good point :) Do you have any more information on your system? Linux, 64-bit? Standard processor? NumPy compiled from source? St?fan From nadavh.horesh at gmail.com Tue May 1 02:10:07 2012 From: nadavh.horesh at gmail.com (Nadav Horesh) Date: Tue, 1 May 2012 09:10:07 +0300 Subject: filter_iter: New version Message-ID: Hi all, Attached here the 2nd version of filter_iter which compiled with the help of Tony Yu, Stefan van der Walt, Travis Oliphant and Mark Florisson. My plan for the next version is to make the package useful rather than a proof of concept (probably making an advantage of cython 0.16 fused types). I have an unresolved problem (which caused me a delay of ~3 weeks) with applying a cython callback function, which I would like your help: how to make demo/example_not_working.py work? Nadav, -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: filter_iter-0.0.1.taz Type: application/octet-stream Size: 57143 bytes Desc: not available URL: From tsyu80 at gmail.com Tue May 1 09:37:00 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 1 May 2012 09:37:00 -0400 Subject: Bizarre error In-Reply-To: References: Message-ID: On Tue, May 1, 2012 at 1:04 AM, St?fan van der Walt wrote: > On Mon, Apr 30, 2012 at 8:51 PM, Tony Yu wrote: > > Actually I'm not too surprised that you can't reproduce this since you > never > > got a failure with the SSIM tests. But, yes, this is very strange. > > Good point :) Do you have any more information on your system? > Linux, 64-bit? Standard processor? NumPy compiled from source? > > St?fan > Well, I guess if I'm suggesting this issue is system dependent, I should actually describe my system ;) OS X 10.6.8, 64-bit Intel Core 2 Duo Python 2.6.1 Numpy from github (an older master that was at least 3 months old and also with the current master) -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Tue May 1 14:24:42 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 1 May 2012 11:24:42 -0700 Subject: filter_iter: New version In-Reply-To: References: Message-ID: Hi Nadav On Mon, Apr 30, 2012 at 11:10 PM, Nadav Horesh wrote: > I have an unresolved problem (which caused me a delay of ~3 weeks) with > applying a cython callback function, which I would like your help: how to > make?demo/example_not_working.py work? I'd like to help, but unfortunately I can't get demo/example.py to work. Did you include all the relevant files in the archive? It seems filter_iter.py is missing. I can also help to get this into a git repo--feel free to ping me on google talk or via email. St?fan From tsyu80 at gmail.com Tue May 1 22:27:55 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 1 May 2012 22:27:55 -0400 Subject: filter_iter: New version In-Reply-To: References: Message-ID: On Tue, May 1, 2012 at 2:24 PM, St?fan van der Walt wrote: > Hi Nadav > > On Mon, Apr 30, 2012 at 11:10 PM, Nadav Horesh > wrote: > > I have an unresolved problem (which caused me a delay of ~3 weeks) with > > applying a cython callback function, which I would like your help: how to > > make demo/example_not_working.py work? > > I'd like to help, but unfortunately I can't get demo/example.py to > work. Did you include all the relevant files in the archive? It > seems filter_iter.py is missing. I can also help to get this into a > git repo--feel free to ping me on google talk or via email. > > St?fan > I got an error when building the main package. For me, commenting the "package_data" (i.e. the pxd file) fixed the build. For ease of testing, maybe the demo should be in the parent directory, and there should be a subdirectory "filter_iter" which contains the filter implementation. That way you don't have to add "filter_iter" to your path in order to test. After all that though, I also get an error with example.py: Traceback (most recent call last): File "example.py", line 18, in 'rand_select', (3,3)) File "../../filter_iter/gen_filter.py", line 55, in apply_C_filter File "_filter_iter.pyx", line 184, in filter_iter._filter_iter.gen_filter_matrix.filter_with_C_callback_float (./_filter_iter.c:4819) TypeError: an integer is required filter_iter_demo$ Changing the call the last argumet to an int gives an "'int' object is unsubscriptable" TypeError. As Stefan suggests, putting this into a git repo would be really helpful for testing and review. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Thu May 3 01:33:12 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Wed, 2 May 2012 22:33:12 -0700 Subject: Fast coordinate transformations Message-ID: Hi all, I just added a PR which provides a "warp" function, with signature `warp(image, transformation_function, ...)` where the function would be, e.g.: def transformation_function(xy): xy[:, 0] *= 2 return xy This is very similar to ndimage.geometric_transform, except that it is blazingly fast because it is built on top of the much faster ndimage.map_coordinates. With this change it becomes trivial to implement transformations such as swirl (the included example), ripple, the log-polar transform, etc. by writing the appropriate transformation_functions. I'd appreciate a review: https://github.com/scikits-image/scikits-image/pull/184 Thanks! St?fan From stefan at sun.ac.za Thu May 3 18:11:55 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Thu, 3 May 2012 15:11:55 -0700 Subject: Fisheye warping Message-ID: Hi all, After yesterday's post on warping, another teaser: http://mentat.za.net/refer/lena_warp.png From: def fisheye(xy): center = np.mean(xy, axis=0) c = xy - center r = np.sqrt(np.sum(c**2, axis=1)) theta = np.arctan2(c[:, 1], c[:, 0]) r = 0.87 * np.exp(r**(1/2.5) / 1.75) return np.column_stack(( r * np.cos(theta), r * np.sin(theta) )) + center St?fan From nadavh.horesh at gmail.com Sat May 5 06:37:30 2012 From: nadavh.horesh at gmail.com (Nadav Horesh) Date: Sat, 5 May 2012 13:37:30 +0300 Subject: filter_iter: New version In-Reply-To: References: Message-ID: Sorry, I had a mix between a working and a nonworking versions. Before I'll commit further changes, I'll take the advice to build a git repo. Thanks, Nadav. 2012/5/2 Tony Yu > > > On Tue, May 1, 2012 at 2:24 PM, St?fan van der Walt wrote: > >> Hi Nadav >> >> On Mon, Apr 30, 2012 at 11:10 PM, Nadav Horesh >> wrote: >> > I have an unresolved problem (which caused me a delay of ~3 weeks) with >> > applying a cython callback function, which I would like your help: how >> to >> > make demo/example_not_working.py work? >> >> I'd like to help, but unfortunately I can't get demo/example.py to >> work. Did you include all the relevant files in the archive? It >> seems filter_iter.py is missing. I can also help to get this into a >> git repo--feel free to ping me on google talk or via email. >> >> St?fan >> > > > I got an error when building the main package. For me, commenting the > "package_data" (i.e. the pxd file) fixed the build. For ease of testing, > maybe the demo should be in the parent directory, and there should be a > subdirectory "filter_iter" which contains the filter implementation. That > way you don't have to add "filter_iter" to your path in order to test. > > After all that though, I also get an error with example.py: > > Traceback (most recent call last): > File "example.py", line 18, in > 'rand_select', (3,3)) > File "../../filter_iter/gen_filter.py", line 55, in apply_C_filter > File "_filter_iter.pyx", line 184, in > filter_iter._filter_iter.gen_filter_matrix.filter_with_C_callback_float > (./_filter_iter.c:4819) > TypeError: an integer is required > filter_iter_demo$ > > Changing the call the last argumet to an int gives an "'int' object is > unsubscriptable" TypeError. As Stefan suggests, putting this into a git > repo would be really helpful for testing and review. > > -Tony > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Tue May 8 15:48:17 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 8 May 2012 12:48:17 -0700 Subject: Release 0.6 Message-ID: Hi everyone, It's time for another release of scikits-image! I would very much appreciate your help in reviewing the following outstanding pull-requests: - Tony Yu's neat visualization tools, previously packaged as skloupe: https://github.com/scikits-image/scikits-image/pull/165 - Fast image warping: https://github.com/scikits-image/scikits-image/pull/184 - RegionProps (still awaiting tests, but review the rest so long) https://github.com/scikits-image/scikits-image/pull/183 This release is due in about 10 days. I'm also happy to report that our Debian package has been submitted for approval; thanks go to Yaroslav Halchenko! St?fan From nadavh.horesh at gmail.com Tue May 8 11:18:35 2012 From: nadavh.horesh at gmail.com (Nadav Horesh) Date: Tue, 8 May 2012 18:18:35 +0300 Subject: filter_iter on github Message-ID: Just made my first github commit on https://github.com/Nadav-Horesh/filter_iter Nadav -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Tue May 8 21:25:33 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 8 May 2012 21:25:33 -0400 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Tue, May 8, 2012 at 3:48 PM, St?fan van der Walt wrote: > Hi everyone, > > It's time for another release of scikits-image! I would very much > appreciate your help in reviewing the following outstanding > pull-requests: > > > - Tony Yu's neat visualization tools, previously packaged as skloupe: > > https://github.com/scikits-image/scikits-image/pull/165 > > - Fast image warping: > > https://github.com/scikits-image/scikits-image/pull/184 > > - RegionProps (still awaiting tests, but review the rest so long) > > https://github.com/scikits-image/scikits-image/pull/183 > > > This release is due in about 10 days. I'm also happy to report that > our Debian package has been submitted for approval; thanks go to > Yaroslav Halchenko! > > St?fan > I went ahead and merged the fast image-warping PR. I've read through the code a couple of times already, and I think it looks pretty good. (Sorry if anyone else was planning to review it before merging.) -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Wed May 9 01:03:16 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 8 May 2012 22:03:16 -0700 Subject: Error building docs In-Reply-To: References: Message-ID: On May 8, 2012 8:53 PM, "Tony Yu" wrote: > > I'm getting an IOError when rebuilding the docs and I can't figure out the cause. The error is raised during the build of the api docs and appears to be in `source/api/skimage.filter.lpi_filter.txt`: > > writing output... [ 22%] api/skimage.filter.lpi_filter > Exception occurred: > File "/Library/Python/2.6/site-packages/sphinx/ext/graphviz.py", line 219, in render_dot_html > mapfile = open(outfn + '.map', 'rb') > IOError: [Errno 2] No such file or directory: '/Users/Tony/python/devel/skimage/doc/build/html/_images/inheritance-f7d294ea888e27c920fbf193effa642a3152b1be.png.map' Why are inheritance trees generated? I didn't think we enabled those? St?fan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Tue May 8 23:06:56 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 8 May 2012 23:06:56 -0400 Subject: Error building docs Message-ID: I'm getting an IOError when rebuilding the docs and I can't figure out the cause. The error is raised during the build of the api docs and appears to be in `source/api/skimage.filter.lpi_filter.txt`: writing output... [ 22%] api/skimage.filter.lpi_filter Exception occurred: File "/Library/Python/2.6/site-packages/sphinx/ext/graphviz.py", line 219, in render_dot_html mapfile = open(outfn + '.map', 'rb') IOError: [Errno 2] No such file or directory: '/Users/Tony/python/devel/skimage/doc/build/html/_images/inheritance-f7d294ea888e27c920fbf193effa642a3152b1be.png.map' The full sphinx traceback is at the end of this email. NOTE: this error only occurs when *RE*building. Running `make clean` and then `make html` in the doc directory works fine, but re-running `make html` will raise this error. Any ideas what's going on here? -Tony # Sphinx version: 1.1.3 # Python version: 2.6.1 # Docutils version: 0.9 release # Jinja2 version: 2.6 Traceback (most recent call last): File "/Library/Python/2.6/site-packages/sphinx/cmdline.py", line 189, in main app.build(force_all, filenames) File "/Library/Python/2.6/site-packages/sphinx/application.py", line 204, in build self.builder.build_update() File "/Library/Python/2.6/site-packages/sphinx/builders/__init__.py", line 196, in build_update 'out of date' % len(to_build)) File "/Library/Python/2.6/site-packages/sphinx/builders/__init__.py", line 252, in build self.write(docnames, list(updated_docnames), method) File "/Library/Python/2.6/site-packages/sphinx/builders/__init__.py", line 292, in write self.write_doc(docname, doctree) File "/Library/Python/2.6/site-packages/sphinx/builders/html.py", line 419, in write_doc self.docwriter.write(doctree, destination) File "/Library/Python/2.6/site-packages/docutils/writers/__init__.py", line 77, in write self.translate() File "/Library/Python/2.6/site-packages/sphinx/writers/html.py", line 38, in translate self.document.walkabout(visitor) File "/Library/Python/2.6/site-packages/docutils/nodes.py", line 173, in walkabout if child.walkabout(visitor): File "/Library/Python/2.6/site-packages/docutils/nodes.py", line 173, in walkabout if child.walkabout(visitor): File "/Library/Python/2.6/site-packages/docutils/nodes.py", line 165, in walkabout visitor.dispatch_visit(self) File "/Library/Python/2.6/site-packages/docutils/nodes.py", line 1611, in dispatch_visit return method(node) File "/Library/Python/2.6/site-packages/sphinx/ext/inheritance_diagram.py", line 340, in html_visit_inheritance_diagram alt='Inheritance diagram of ' + node['content']) File "/Library/Python/2.6/site-packages/sphinx/ext/graphviz.py", line 219, in render_dot_html mapfile = open(outfn + '.map', 'rb') IOError: [Errno 2] No such file or directory: '/Users/Tony/python/devel/skimage/doc/build/html/_images/inheritance-f7d294ea888e27c920fbf193effa642a3152b1be.png.map' -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Tue May 8 23:21:55 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 8 May 2012 23:21:55 -0400 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Tue, May 8, 2012 at 9:25 PM, Tony Yu wrote: > > > On Tue, May 8, 2012 at 3:48 PM, St?fan van der Walt wrote: > >> Hi everyone, >> >> It's time for another release of scikits-image! I would very much >> appreciate your help in reviewing the following outstanding >> pull-requests: >> >> >> - Tony Yu's neat visualization tools, previously packaged as skloupe: >> >> https://github.com/scikits-image/scikits-image/pull/165 >> >> - Fast image warping: >> >> https://github.com/scikits-image/scikits-image/pull/184 >> >> - RegionProps (still awaiting tests, but review the rest so long) >> >> https://github.com/scikits-image/scikits-image/pull/183 >> >> >> This release is due in about 10 days. I'm also happy to report that >> our Debian package has been submitted for approval; thanks go to >> Yaroslav Halchenko! >> >> St?fan >> > > I went ahead and merged the fast image-warping PR. I've read through the > code a couple of times already, and I think it looks pretty good. (Sorry if > anyone else was planning to review it before merging.) > > -Tony > I just uploaded a draft of a user-guide entry for the viewer. This is probably the best entry point for understanding the design of the viewer and its use. Also, I want apologize for the size of the PR: When I went to add the user-guide entry, I was shocked at the number of files added in the commit. As I mentioned in previous emails, the main parts are the viewer base classes and the plugin base class. The rest are more-or-less example uses of these classes. Best, -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Wed May 9 12:45:24 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Wed, 9 May 2012 09:45:24 -0700 Subject: Error building docs In-Reply-To: References: Message-ID: On Wed, May 9, 2012 at 7:25 AM, Tony Yu wrote: > I don't know, @stefanv: why are inheritance trees generated??;) > > The build runs fine if 'sphinx.ext.inheritance_diagram' is removed from the > list of sphinx extensions. Well, let's do that then :) St?fan From tsyu80 at gmail.com Wed May 9 10:25:16 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Wed, 9 May 2012 10:25:16 -0400 Subject: Error building docs In-Reply-To: References: Message-ID: On Wed, May 9, 2012 at 1:03 AM, St?fan van der Walt wrote: > On May 8, 2012 8:53 PM, "Tony Yu" wrote: > > > > I'm getting an IOError when rebuilding the docs and I can't figure out > the cause. The error is raised during the build of the api docs and appears > to be in `source/api/skimage.filter.lpi_filter.txt`: > > > > writing output... [ 22%] api/skimage.filter.lpi_filter > > > Exception occurred: > > File "/Library/Python/2.6/site-packages/sphinx/ext/graphviz.py", line > 219, in render_dot_html > > mapfile = open(outfn + '.map', 'rb') > > IOError: [Errno 2] No such file or directory: > '/Users/Tony/python/devel/skimage/doc/build/html/_images/inheritance-f7d294ea888e27c920fbf193effa642a3152b1be.png.map' > > Why are inheritance trees generated? I didn't think we enabled those? > > St?fan > I don't know, @stefanv: why are inheritance trees generated? ;) The build runs fine if 'sphinx.ext.inheritance_diagram' is removed from the list of sphinx extensions. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Wed May 9 15:43:09 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Wed, 9 May 2012 12:43:09 -0700 Subject: Release 0.6 In-Reply-To: References: Message-ID: Hi Tony On Tue, May 8, 2012 at 8:21 PM, Tony Yu wrote: > I just uploaded a draft of a user-guide entry for the viewer. This is > probably the best entry point for understanding the design of the viewer and > its use. That's very handy! The only part that is still opaque to me is the "imgview" property. Where does that come from? St?fan From stefan at sun.ac.za Wed May 9 20:21:48 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Wed, 9 May 2012 17:21:48 -0700 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Wed, May 9, 2012 at 4:36 PM, Tony Yu wrote: > I updated the docs to clarify this. I considered renaming the attribute > `image_viewer` but I thought it too verbose for a commonly-used attribute. Personally, I'd probably prefer "view" or "image_view" or any of those more explicit spellings. St?fan From stefan at sun.ac.za Wed May 9 20:39:01 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Wed, 9 May 2012 17:39:01 -0700 Subject: filter_iter on github In-Reply-To: References: Message-ID: Hi Nadav On Tue, May 8, 2012 at 8:18 AM, Nadav Horesh wrote: > Just made my first github commit on > https://github.com/Nadav-Horesh/filter_iter Excellent! This is going to make it much easier to review your code. Could you remove the .so files? An easy way to always ignore them is to add a ".gitignore" file to the repo with *.so on a single line. St?fan From tsyu80 at gmail.com Wed May 9 19:36:01 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Wed, 9 May 2012 19:36:01 -0400 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Wed, May 9, 2012 at 3:43 PM, St?fan van der Walt wrote: > Hi Tony > > On Tue, May 8, 2012 at 8:21 PM, Tony Yu wrote: > > I just uploaded a draft of a user-guide entry for the viewer. This is > > probably the best entry point for understanding the design of the viewer > and > > its use. > > That's very handy! The only part that is still opaque to me is the > "imgview" property. Where does that come from? > > St?fan > I updated the docs to clarify this. I considered renaming the attribute `image_viewer` but I thought it too verbose for a commonly-used attribute. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Wed May 9 22:21:55 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Wed, 9 May 2012 22:21:55 -0400 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Wed, May 9, 2012 at 8:21 PM, St?fan van der Walt wrote: > On Wed, May 9, 2012 at 4:36 PM, Tony Yu wrote: > > I updated the docs to clarify this. I considered renaming the attribute > > `image_viewer` but I thought it too verbose for a commonly-used > attribute. > > Personally, I'd probably prefer "view" or "image_view" or any of those > more explicit spellings. > > St?fan > What do think about "viewer"? -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Wed May 9 22:25:12 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Wed, 9 May 2012 22:25:12 -0400 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Wed, May 9, 2012 at 10:21 PM, Tony Yu wrote: > On Wed, May 9, 2012 at 8:21 PM, St?fan van der Walt wrote: > >> On Wed, May 9, 2012 at 4:36 PM, Tony Yu wrote: >> > I updated the docs to clarify this. I considered renaming the attribute >> > `image_viewer` but I thought it too verbose for a commonly-used >> attribute. >> >> Personally, I'd probably prefer "view" or "image_view" or any of those >> more explicit spellings. >> >> St?fan >> > > What do think about "viewer"? > > -Tony > Oops, forgot a word: what do *you* think about "viewer"? (Emphasis for missing word, not to exclude anyone else from the discussion. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Thu May 10 15:40:10 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Thu, 10 May 2012 12:40:10 -0700 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Wed, May 9, 2012 at 7:25 PM, Tony Yu wrote: >>> Personally, I'd probably prefer "view" or "image_view" or any of those >>> more explicit spellings. >>> >> What do think about "viewer"? That would work, yes. I originally thought some magic happened behind the screen, but knowing that it is just storage (and I haven't checked, but I assume the docstring also states this clearly), makes it fine. St?fan From stefan at sun.ac.za Thu May 10 18:35:45 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Thu, 10 May 2012 15:35:45 -0700 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Thu, May 10, 2012 at 2:23 PM, Tony Yu wrote: > I think the resample PR is close to completion as well: > https://github.com/scikits-image/scikits-image/pull/145 > > It's been a while since I've looked at that code, but from what I remember, > it was close to ready. I *think* that the main change is just moving some > files around (and as a result, changing some imports): move `montage` (and > tests) back to `skimage.utils`, move `resample`?(and tests)?to > `skimage.transform`, and remove the `shape` subpackage. We can certainly do that before the release. Would you ping the devs on that PR? St?fan From tsyu80 at gmail.com Thu May 10 17:23:45 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 10 May 2012 17:23:45 -0400 Subject: Release 0.6 In-Reply-To: References: Message-ID: On Tue, May 8, 2012 at 3:48 PM, St?fan van der Walt wrote: > Hi everyone, > > It's time for another release of scikits-image! I would very much > appreciate your help in reviewing the following outstanding > pull-requests: > > > - Tony Yu's neat visualization tools, previously packaged as skloupe: > > https://github.com/scikits-image/scikits-image/pull/165 > > - Fast image warping: > > https://github.com/scikits-image/scikits-image/pull/184 > > - RegionProps (still awaiting tests, but review the rest so long) > > https://github.com/scikits-image/scikits-image/pull/183 > > > This release is due in about 10 days. I'm also happy to report that > our Debian package has been submitted for approval; thanks go to > Yaroslav Halchenko! > > St?fan > I think the resample PR is close to completion as well: https://github.com/scikits-image/scikits-image/pull/145 It's been a while since I've looked at that code, but from what I remember, it was close to ready. I *think* that the main change is just moving some files around (and as a result, changing some imports): move `montage` (and tests) back to `skimage.utils`, move `resample` (and tests) to `skimage.transform`, and remove the `shape` subpackage. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From siggin at gmail.com Sat May 12 04:04:39 2012 From: siggin at gmail.com (Sigmund) Date: Sat, 12 May 2012 01:04:39 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" Message-ID: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> Hallo! To read uncompressed TIFF files I use the freeimage plugin. The reading works great but since last week I need to save a summed Image. I used the io.imsave() with the freeimage plugin but by default it writs a compressed TIFF file. The freeimage documentation provides Flags to use for different compressions or for a non compressed type (TIFF_NONE). Can someone tell me how to pass theses Flags to the plugin? I saw that Christophs 'tifffile' plugin does the job but still I would like to know how to use the freeimage plug-n for it. Thanks! Siggi -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary.pincus at yale.edu Sat May 12 09:47:10 2012 From: zachary.pincus at yale.edu (Zachary Pincus) Date: Sat, 12 May 2012 09:47:10 -0400 Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> Message-ID: <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> Hi Siggi, This functionality is not exposed by the imsave() apparatus, but can be accessed by the image writing functions in the plugin that imsave() calls. A quick scan through the source code is likely to be the most helpful thing, regarding the available flags, etc: https://github.com/scikits-image/scikits-image/blob/master/skimage/io/_plugins/freeimage_plugin.py In particular, the freeimage_plugin.write() function, around which freeimage_plugin.imsave() is a thin wrapper, allows you to set various flags. So: import skimage.io._plugins.freeimage_plugin as fi image = fi.read('/path/to/whatever') fi.write(image, 'whatever.tif', fi.IO_FLAGS.TIFF_NONE) Zach On May 12, 2012, at 4:04 AM, Sigmund wrote: > Hallo! > To read uncompressed TIFF files I use the freeimage plugin. The reading works great but since last week I need to save a summed Image. I used the io.imsave() with the freeimage plugin but by default it writs a compressed TIFF file. The freeimage documentation provides Flags to use for different compressions or for a non compressed type (TIFF_NONE). Can someone tell me how to pass theses Flags to the plugin? > I saw that Christophs 'tifffile' plugin does the job but still I would like to know how to use the freeimage plug-n for it. > > Thanks! > > Siggi From siggin at gmail.com Sun May 13 09:33:36 2012 From: siggin at gmail.com (Sigmund) Date: Sun, 13 May 2012 06:33:36 -0700 (PDT) Subject: io.imsave() problems with passing arguments to plugin "freeimage" In-Reply-To: <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> References: <28509405.259.1336809879953.JavaMail.geo-discussion-forums@ynlq12> <5A17ED22-10A7-495A-95CF-790CF1EA68B7@yale.edu> Message-ID: <6472378.1945.1336916016174.JavaMail.geo-discussion-forums@ynmk20> Thanks! Works great! Siggi -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Tue May 15 13:12:17 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 15 May 2012 10:12:17 -0700 Subject: Remarks for transform.warp function In-Reply-To: References: Message-ID: Hi Nadav On Tue, May 15, 2012 at 7:24 AM, Nadav Horesh wrote: > Remarks for today's skimage snaphot: > > The documentation state that the input image is a 2D array. In practice it > can be a colour image. > I got failures whenever I used the output_shape parameter What code are you referring to? St?fan From tsyu80 at gmail.com Tue May 15 16:05:49 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 15 May 2012 16:05:49 -0400 Subject: Remarks for transform.warp function In-Reply-To: References: Message-ID: On Tue, May 15, 2012 at 2:28 PM, Nadav Horesh wrote: > def shift(xy): > return xy+10 > > from skimage.transform import warp > from skimage.transform import warp > > camera = samples.camera() > warp(camera, shift, output_shape=camera.shape) > > --------------------------------------------------------------------------- > ValueError Traceback (most recent call > last)/home/nadav/pyscripts/ in () > ----> 1 warp(camera, shift, output_shape=camera.shape) > /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py > in warp(image, reverse_map, map_args, output_shape, order, mode, cval) > 92 > 93 # Place the y-coordinate mapping > > ---> 94 _stackcopy(coords[1, ...], tf_coords[0, ...]) > 95 > 96 # Place the x-coordinate mapping > > /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py > in _stackcopy(a, b) > 23 > 24 """ > ---> 25 a[:] = b[:, :, np.newaxis] > 26 > 27 def warp(image, reverse_map, map_args={}, > ValueError: output operand requires a reduction, but reduction is not > enabled > > > Nadav > Hi Nadav, Could you check to see if the fix in my fix-stack-copy solves your issues (it should fix the example you gave above, but it sounds like you might have other uses). You can either make changesto your local copy, or you can create a new branch based off of mine. I think you mentioned that you're new to git so... Add my repo as a remote: $ git remote add tonysyu git at github.com:tonysyu/scikits-image.git Fetch my branches: $ git fetch tonysyu Create and checkout a new branch based off of my branch: $ git checkout -b fix-stack-copy tonysyu/fix-stack-copy (Let me know if you have issues with the above---I'm working from memory, so it may be flawed) Best, -Tony > > > > > 2012/5/15 St?fan van der Walt > >> Hi Nadav >> >> On Tue, May 15, 2012 at 7:24 AM, Nadav Horesh >> wrote: >> > Remarks for today's skimage snaphot: >> > >> > The documentation state that the input image is a 2D array. In practice >> it >> > can be a colour image. >> > I got failures whenever I used the output_shape parameter >> >> What code are you referring to? >> >> St?fan >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nadavh.horesh at gmail.com Tue May 15 10:24:38 2012 From: nadavh.horesh at gmail.com (Nadav Horesh) Date: Tue, 15 May 2012 17:24:38 +0300 Subject: Remarks for transform.warp function Message-ID: Remarks for today's skimage snaphot: 1. The documentation state that the input image is a 2D array. In practice it can be a colour image. 2. I got failures whenever I used the output_shape parameter Nadav. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nadavh.horesh at gmail.com Tue May 15 14:28:32 2012 From: nadavh.horesh at gmail.com (Nadav Horesh) Date: Tue, 15 May 2012 21:28:32 +0300 Subject: Remarks for transform.warp function In-Reply-To: References: Message-ID: def shift(xy): return xy+10 from skimage.transform import warp from skimage.transform import warp camera = samples.camera() warp(camera, shift, output_shape=camera.shape) --------------------------------------------------------------------------- ValueError Traceback (most recent call last)/home/nadav/pyscripts/ in () ----> 1 warp(camera, shift, output_shape=camera.shape) /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py in warp(image, reverse_map, map_args, output_shape, order, mode, cval) 92 93 # Place the y-coordinate mapping ---> 94 _stackcopy(coords[1, ...], tf_coords[0, ...]) 95 96 # Place the x-coordinate mapping /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py in _stackcopy(a, b) 23 24 """ ---> 25 a[:] = b[:, :, np.newaxis] 26 27 def warp(image, reverse_map, map_args={}, ValueError: output operand requires a reduction, but reduction is not enabled Nadav 2012/5/15 St?fan van der Walt > Hi Nadav > > On Tue, May 15, 2012 at 7:24 AM, Nadav Horesh > wrote: > > Remarks for today's skimage snaphot: > > > > The documentation state that the input image is a 2D array. In practice > it > > can be a colour image. > > I got failures whenever I used the output_shape parameter > > What code are you referring to? > > St?fan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Tue May 15 23:15:06 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 15 May 2012 23:15:06 -0400 Subject: Rewrite of extension to generate examples in documentation Message-ID: So, I've been thinking that it would be great to have more tutorial-like examples in the documentation. Currently though, that's a bit difficult to do: code has to be tested separately from the rst file, plots have to be saved and linked, etc. The Sphinx extension we currently use to generate the examples is great for what it is, but the placement of text, plots, and code is rigidly defined (i.e. it must appear in that order). To that end, I've spent some time rewriting the `gen_rst` code (originally adapted from scikits-learn) so that code and text can be interweaved and the active plot can be linked with a simple tag. (I've been developing it in a separate package, which you can check out if you want to see the commit history. Also here's a quick overview of the concept .) The rewritten extension---`plot2rst`---provides a more-or-less drop-in replacement for `gen_rst`. In PR 190, I replace `gen_rst` with `plot2rst` and convert an example to a tutorial-style example. The rest of this email (not including the numerous post-scripts :) just explain the PR. The first commit of the PR simply replaces use of `gen_rst` with `plot2rst`. This change requires only a few configuration changes (see first commit: other than the addition of the extension itself, the changes are minor). This change results in only a few cosmetic differences in the output: * The download link is moved to the bottom of the page * The gallery page no longer has the heading "Examples". (I thought it'd be better to remove this automatic templating from extension; if desired the heading can be added to `README.txt` in the examples directory.) In the second commit, I convert the current segmentation exampleinto a tutorial-style example, with plots, code, and text interweaved. I've saved the output on github pages to demonstrate the output. Note that the file to generate this output is just a simple python file . In the third commit, I make some tweaks to the rc parameters passed to the plots. And the last commit just removes `gen_rst`. (Let me know if any of the links in this email don't go where you'd expect them to. I almost certainly screwed a few of those up) Cheers, -Tony P.S. I only recently learned of an IPython project to provide similar functionality . I'm not sure if there are any lasting advantages to using `plot2rst` (compared to the IPython notebook; one disadvantage is that `plot2rst` doesn't capture terminal output), but the immediate advantage is that it's a drop-in replacement for `gen_rst`. P.P.S. I noticed that we include the `plot_directive` extension, but I don't believe it's used. I can remove this as part of the PR if someone confirms. P.P.P.S. This PR should probably wait until after releasing 0.6, since it's a pretty big change. Plus, it's just documentation so it will be up-to-date on the website; it's less important that it's up-to-date in a user's install. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nadavh.horesh at gmail.com Wed May 16 01:45:52 2012 From: nadavh.horesh at gmail.com (Nadav Horesh) Date: Wed, 16 May 2012 08:45:52 +0300 Subject: Remarks for transform.warp function In-Reply-To: References: Message-ID: It solves the problem. What do you think about letting enabling output_shape=(m,n) even for a colour image, implicitly assuming that the 3rd dimension is copied from the original image. Nadav 2012/5/15 Tony Yu > > > On Tue, May 15, 2012 at 2:28 PM, Nadav Horesh wrote: > >> def shift(xy): >> return xy+10 >> >> from skimage.transform import warp >> from skimage.transform import warp >> >> camera = samples.camera() >> warp(camera, shift, output_shape=camera.shape) >> >> >> --------------------------------------------------------------------------- >> ValueError Traceback (most recent call >> last)/home/nadav/pyscripts/ in () >> ----> 1 warp(camera, shift, output_shape=camera.shape) >> /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py >> in warp(image, reverse_map, map_args, output_shape, order, mode, cval) >> 92 >> 93 # Place the y-coordinate mapping >> >> ---> 94 _stackcopy(coords[1, ...], tf_coords[0, ...]) >> 95 >> 96 # Place the x-coordinate mapping >> >> /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py >> in _stackcopy(a, b) >> 23 >> 24 """ >> ---> 25 a[:] = b[:, :, np.newaxis] >> 26 >> 27 def warp(image, reverse_map, map_args={}, >> ValueError: output operand requires a reduction, but reduction is not >> enabled >> >> >> Nadav >> > > > Hi Nadav, > > Could you check to see if the fix in my fix-stack-copy solves your issues > (it should fix the example you gave above, but it sounds like you might > have other uses). You can either make changesto your local copy, or you can create a new branch based off of mine. I > think you mentioned that you're new to git so... > > Add my repo as a remote: > $ git remote add tonysyu git at github.com:tonysyu/scikits-image.git > Fetch my branches: > $ git fetch tonysyu > Create and checkout a new branch based off of my branch: > $ git checkout -b fix-stack-copy tonysyu/fix-stack-copy > > (Let me know if you have issues with the above---I'm working from memory, > so it may be flawed) > > Best, > -Tony > > >> >> >> >> >> 2012/5/15 St?fan van der Walt >> >>> Hi Nadav >>> >>> On Tue, May 15, 2012 at 7:24 AM, Nadav Horesh >>> wrote: >>> > Remarks for today's skimage snaphot: >>> > >>> > The documentation state that the input image is a 2D array. In >>> practice it >>> > can be a colour image. >>> > I got failures whenever I used the output_shape parameter >>> >>> What code are you referring to? >>> >>> St?fan >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Wed May 16 10:10:43 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Wed, 16 May 2012 10:10:43 -0400 Subject: Remarks for transform.warp function In-Reply-To: References: Message-ID: On Wed, May 16, 2012 at 1:45 AM, Nadav Horesh wrote: > It solves the problem. > What do you think about letting enabling output_shape=(m,n) even for a > colour image, implicitly assuming that the 3rd dimension is copied from the > original image. > > Nadav > Currently, color images work fine when no `output_shape` is specified. I'm not sure what you mean by "implicitly assuming that the 3rd dimension is copied from the original image". Are you suggesting that for color images setting `output_shape=(m, n)` should actually return a shape of `(m, n, 3)`? If that's the case, I strongly disagree because it seems magical---i.e. it's contradicting the user's command. Actually, I don't understand the use case for `output_shape`, so I could be missing something... -Tony Nadav: could you bottom-post or interleave posts to the list---it helps when following long conversations. > > 2012/5/15 Tony Yu > >> >> >> On Tue, May 15, 2012 at 2:28 PM, Nadav Horesh wrote: >> >>> def shift(xy): >>> return xy+10 >>> >>> from skimage.transform import warp >>> from skimage.transform import warp >>> >>> camera = samples.camera() >>> warp(camera, shift, output_shape=camera.shape) >>> >>> >>> --------------------------------------------------------------------------- >>> ValueError Traceback (most recent call >>> last)/home/nadav/pyscripts/ in () >>> ----> 1 warp(camera, shift, output_shape=camera.shape) >>> /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py >>> in warp(image, reverse_map, map_args, output_shape, order, mode, cval) >>> 92 >>> 93 # Place the y-coordinate mapping >>> >>> ---> 94 _stackcopy(coords[1, ...], tf_coords[0, ...]) >>> 95 >>> 96 # Place the x-coordinate mapping >>> >>> /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py >>> in _stackcopy(a, b) >>> 23 >>> 24 """ >>> ---> 25 a[:] = b[:, :, np.newaxis] >>> 26 >>> 27 def warp(image, reverse_map, map_args={}, >>> ValueError: output operand requires a reduction, but reduction is not >>> enabled >>> >>> >>> Nadav >>> >> >> >> Hi Nadav, >> >> Could you check to see if the fix in my fix-stack-copy solves your issues >> (it should fix the example you gave above, but it sounds like you might >> have other uses). You can either make changesto your local copy, or you can create a new branch based off of mine. I >> think you mentioned that you're new to git so... >> >> Add my repo as a remote: >> $ git remote add tonysyu git at github.com:tonysyu/scikits-image.git >> Fetch my branches: >> $ git fetch tonysyu >> Create and checkout a new branch based off of my branch: >> $ git checkout -b fix-stack-copy tonysyu/fix-stack-copy >> >> (Let me know if you have issues with the above---I'm working from memory, >> so it may be flawed) >> >> Best, >> -Tony >> >> >>> >>> >>> >>> >>> 2012/5/15 St?fan van der Walt >>> >>>> Hi Nadav >>>> >>>> On Tue, May 15, 2012 at 7:24 AM, Nadav Horesh >>>> wrote: >>>> > Remarks for today's skimage snaphot: >>>> > >>>> > The documentation state that the input image is a 2D array. In >>>> practice it >>>> > can be a colour image. >>>> > I got failures whenever I used the output_shape parameter >>>> >>>> What code are you referring to? >>>> >>>> St?fan >>>> >>> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Wed May 16 16:59:12 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Wed, 16 May 2012 13:59:12 -0700 Subject: Rewrite of extension to generate examples in documentation In-Reply-To: References: Message-ID: Hi Tony On Tue, May 15, 2012 at 8:15 PM, Tony Yu wrote: > P.S. I only recently learned of an IPython project to provide similar > functionality. I'm not sure if there are any lasting advantages to using > `plot2rst` (compared to the IPython notebook; one disadvantage is that > `plot2rst` doesn't capture terminal output), but the immediate advantage is > that it's a drop-in replacement for `gen_rst`. I'm glad you mentioned this; I've been using nbconvert (https://github.com/ipython/nbconvert), and I think that would be a good way forward: not only can it produce good looking PDFs, but it can also do the HTML, and allows us to edit examples easily. However, someone has to do the work to integrate this, so I'm not sure it's the best solution *right now* (unless you are feeling particularly productive :-). > P.P.S. I noticed that we include the `plot_directive` extension, but I don't > believe it's used. I can remove this as part of the PR if someone confirms. I thought this was for when matplotlib (sphinx?) didn't ship it, but since we rely on matplotlib 1 and sphinx anyway, you can go ahead. > P.P.P.S. This PR should probably wait until after releasing 0.6, since it's > a pretty big change. Plus, it's just documentation so it will be up-to-date > on the website; it's less important that it's up-to-date in a user's > install. That's probably sensible; and for now I'd also like to explore how much effort it would be to integrate notebooks in this pipeline, so waiting until 0.7 should give us time. Thanks! St?fan From nadavh.horesh at gmail.com Wed May 16 13:10:51 2012 From: nadavh.horesh at gmail.com (Nadav Horesh) Date: Wed, 16 May 2012 20:10:51 +0300 Subject: Remarks for transform.warp function In-Reply-To: References: Message-ID: 2012/5/16 Tony Yu > > > On Wed, May 16, 2012 at 1:45 AM, Nadav Horesh wrote: > >> It solves the problem. >> What do you think about letting enabling output_shape=(m,n) even for a >> colour image, implicitly assuming that the 3rd dimension is copied from the >> original image. >> >> Nadav >> > > Currently, color images work fine when no `output_shape` is specified. I'm > not sure what you mean by "implicitly assuming that the 3rd dimension is > copied from the original image". Are you suggesting that for color images > setting `output_shape=(m, n)` should actually return a shape of `(m, n, > 3)`? If that's the case, I strongly disagree because it seems > magical---i.e. it's contradicting the user's command. > > Actually, I don't understand the use case for `output_shape`, so I could > be missing something... > > -Tony > > Nadav: could you bottom-post or interleave posts to > the list---it helps when following long conversations. > > >> >> 2012/5/15 Tony Yu >> >>> >>> >>> On Tue, May 15, 2012 at 2:28 PM, Nadav Horesh wrote: >>> >>>> def shift(xy): >>>> return xy+10 >>>> >>>> from skimage.transform import warp >>>> from skimage.transform import warp >>>> >>>> camera = samples.camera() >>>> warp(camera, shift, output_shape=camera.shape) >>>> >>>> >>>> --------------------------------------------------------------------------- >>>> ValueError Traceback (most recent call >>>> last)/home/nadav/pyscripts/ in () >>>> ----> 1 warp(camera, shift, output_shape=camera.shape) >>>> /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py >>>> in warp(image, reverse_map, map_args, output_shape, order, mode, cval) >>>> 92 >>>> 93 # Place the y-coordinate mapping >>>> >>>> ---> 94 _stackcopy(coords[1, ...], tf_coords[0, ...]) >>>> 95 >>>> 96 # Place the x-coordinate mapping >>>> >>>> /usr/lib64/python3.2/site-packages/scikits_image-0.6dev-py3.2-linux-x86_64.egg/skimage/transform/_warp.py >>>> in _stackcopy(a, b) >>>> 23 >>>> 24 """ >>>> ---> 25 a[:] = b[:, :, np.newaxis] >>>> 26 >>>> 27 def warp(image, reverse_map, map_args={}, >>>> ValueError: output operand requires a reduction, but reduction is not >>>> enabled >>>> >>>> >>>> Nadav >>>> >>> >>> >>> Hi Nadav, >>> >>> Could you check to see if the fix in my fix-stack-copy solves your >>> issues (it should fix the example you gave above, but it sounds like you >>> might have other uses). You can either make changesto your local copy, or you can create a new branch based off of mine. I >>> think you mentioned that you're new to git so... >>> >>> Add my repo as a remote: >>> $ git remote add tonysyu git at github.com:tonysyu/scikits-image.git >>> Fetch my branches: >>> $ git fetch tonysyu >>> Create and checkout a new branch based off of my branch: >>> $ git checkout -b fix-stack-copy tonysyu/fix-stack-copy >>> >>> (Let me know if you have issues with the above---I'm working from >>> memory, so it may be flawed) >>> >>> Best, >>> -Tony >>> >>> >>>> >>>> >>>> >>>> >>>> 2012/5/15 St?fan van der Walt >>>> >>>>> Hi Nadav >>>>> >>>>> On Tue, May 15, 2012 at 7:24 AM, Nadav Horesh >>>>> wrote: >>>>> > Remarks for today's skimage snaphot: >>>>> > >>>>> > The documentation state that the input image is a 2D array. In >>>>> practice it >>>>> > can be a colour image. >>>>> > I got failures whenever I used the output_shape parameter >>>>> >>>>> What code are you referring to? >>>>> >>>>> St?fan >>>>> >>>> >>> > The warp mapping usually define an image of a different size than the original. The common case is that the distortion corrected image is cliped to the original image size, this is why that this is the default. However, one may want to see the full details of the original image, and thus specify output_shape > image.shape. You got me right about the implicit dimension. The logic: The image size is the number of pixels, disregarding the colour depth. You are right if you consider the image as an array of values, but if you consider it as an image, the image shape is just the first 2 dimensions. Anyway it is not that important. Thank you, Nadav. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Thu May 17 00:46:46 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 17 May 2012 00:46:46 -0400 Subject: Rewrite of extension to generate examples in documentation In-Reply-To: References: Message-ID: On Wed, May 16, 2012 at 4:59 PM, St?fan van der Walt wrote: > Hi Tony > > On Tue, May 15, 2012 at 8:15 PM, Tony Yu wrote: > > P.S. I only recently learned of an IPython project to provide similar > > functionality. I'm not sure if there are any lasting advantages to using > > `plot2rst` (compared to the IPython notebook; one disadvantage is that > > `plot2rst` doesn't capture terminal output), but the immediate advantage > is > > that it's a drop-in replacement for `gen_rst`. > > I'm glad you mentioned this; I've been using nbconvert > (https://github.com/ipython/nbconvert), and I think that would be a > good way forward: not only can it produce good looking PDFs, but it > can also do the HTML, and allows us to edit examples easily. > > However, someone has to do the work to integrate this, so I'm not sure > it's the best solution *right now* (unless you are feeling > particularly productive :-). > ... sorry, can't jump at that opportunity right now ;) > P.P.S. I noticed that we include the `plot_directive` extension, but I > don't > > believe it's used. I can remove this as part of the PR if someone > confirms. > > I thought this was for when matplotlib (sphinx?) didn't ship it, but > since we rely on matplotlib 1 and sphinx anyway, you can go ahead. > Actually, I wasn't wondering whether or not we should ship it; I was wondering if I should strip out all references to it (e.g. the sphinx extension itself, listing it as an extension, setting config parameters for the extension). A quick search suggests that we don't use the plot directive at all. > > > P.P.P.S. This PR should probably wait until after releasing 0.6, since > it's > > a pretty big change. Plus, it's just documentation so it will be > up-to-date > > on the website; it's less important that it's up-to-date in a user's > > install. > > That's probably sensible; and for now I'd also like to explore how > much effort it would be to integrate notebooks in this pipeline, so > waiting until 0.7 should give us time. > > Thanks! > St?fan > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Thu May 17 00:57:11 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 17 May 2012 00:57:11 -0400 Subject: Remarks for transform.warp function In-Reply-To: References: Message-ID: On Wed, May 16, 2012 at 1:10 PM, Nadav Horesh wrote: > > > 2012/5/16 Tony Yu > >> >> >> On Wed, May 16, 2012 at 1:45 AM, Nadav Horesh wrote: >> >>> It solves the problem. >>> What do you think about letting enabling output_shape=(m,n) even for a >>> colour image, implicitly assuming that the 3rd dimension is copied from the >>> original image. >>> >>> Nadav >>> >> >> Currently, color images work fine when no `output_shape` is >> specified. I'm not sure what you mean by "implicitly assuming that the 3rd >> dimension is copied from the original image". Are you suggesting that for >> color images setting `output_shape=(m, n)` should actually return a shape >> of `(m, n, 3)`? If that's the case, I strongly disagree because it seems >> magical---i.e. it's contradicting the user's command. >> >> Actually, I don't understand the use case for `output_shape`, so I could >> be missing something... >> >> -Tony >> >> > The warp mapping usually define an image of a different size than the > original. The common case is that the distortion corrected image is cliped > to the original image size, this is why that this is the default. However, > one may want to see the full details of the original image, and thus > specify output_shape > image.shape. > > You got me right about the implicit dimension. The logic: The image size > is the number of pixels, disregarding the colour depth. You are right if > you consider the image as an array of values, but if you consider it as an > image, the image shape is just the first 2 dimensions. Anyway it is not > that important. > > Thank you, > > Nadav. > Oh, I guess the `output_shape` parameter would be helpful for image stretching when you want to include all of the original image. Thanks, for the explanation. Hmm, your logic on the implicit dimension is somewhat convincing. I would temper my previous "strong objection" to a "moderate objection" (since it still seems magical). Maybe a compromise would allow custom warping functions to set `output_shape=(m, n, -1)`; the -1 being a special flag that adapts to grayscale and color images. Note this isn't unprecedented: you can pass -1 as a dimension to `np.reshape` and it'll figure out the dimension size that fits the data. (I suggest this as an idea for someone else to contribute :) -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From almar.klein at gmail.com Fri May 18 07:08:37 2012 From: almar.klein at gmail.com (Almar Klein) Date: Fri, 18 May 2012 04:08:37 -0700 (PDT) Subject: Standalone package for FreeImage plugin: imageio Message-ID: Hi, I really like Zach's code that wraps the FreeImage library and that's now a plugin of scikits-image. With more and more projects transitioning to Py3k I think there is an increased need for a *proper* replacement for PIL. I've discussed with Zach, and we believe that the code should be in a stand-alone package. Therefore we started a new project. We've called it imageio and its main page is at http://imageio.readthedocs.org. I invite all who's interested to join us in coding/testing/discussing. One particular topic of interest is how to ship the libraries to the users on Windows and Mac (which I think has also been discussed in this group). I forked from the code in freeimage_plugin.py. Here are two patches that might be of interest to your plugin: https://bitbucket.org/almarklein/imageio/changeset/78eef0776ca2 - py3k compatibility https://bitbucket.org/almarklein/imageio/changeset/8c6f499aea62 - encoding/decoding However, I hope that on the long term we can work together on the stand-alone library and have the plugin as a wrapper or fallback. Regards, Almar Klein Science Applied v.o.f. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at sun.ac.za Sun May 20 15:24:59 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Sun, 20 May 2012 12:24:59 -0700 Subject: skimage now in Debian Message-ID: Hi everyone, I'm happy to announce that the package "python-skimage" is now included in Debian! A special word of thanks to Yaroslav Halchenko who worked so hard to make this happen. If we can release 0.6 this week, then that should be the version included Debian, if I understand correctly. So, if you have any time to review, document, test, please do so ASAP! St?fan From stefan at sun.ac.za Mon May 21 21:16:09 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Mon, 21 May 2012 18:16:09 -0700 Subject: Standalone package for FreeImage plugin: imageio In-Reply-To: References: Message-ID: Hi Almar On Fri, May 18, 2012 at 4:08 AM, Almar Klein wrote: > I've discussed with Zach, and we believe that the code should be in a > stand-alone package. Therefore we started a new project. We've called it > imageio and its main page is at http://imageio.readthedocs.org.?I invite all > who's interested to join us in coding/testing/discussing. One particular > topic of interest is how to ship the libraries to the users on Windows and > Mac?(which I think has also been discussed in this group). I'm not convinced that fragmenting the limited resources we have available is a good idea; we've already solved the packaging and distribution problem for skimage, so why do it all over again? I guess you you're aiming for a more lightweight solution? > I forked from the code in freeimage_plugin.py. Here are two patches that > might be of interest to your plugin: > https://bitbucket.org/almarklein/imageio/changeset/78eef0776ca2?- py3k > compatibility > https://bitbucket.org/almarklein/imageio/changeset/8c6f499aea62?- > encoding/decoding Thank you for the patches; much appreciated. > However, I hope that on the long term we can work together on the > stand-alone library and have the plugin as a wrapper or fallback. We support any effort to provide easier image reading and writing. Of course, we do not want to introduce dependencies unless absolutely necessary (makes it hard to package for Debian, etc.). So maybe we can include, rather than depend on, your solution? Regards St?fan From damian.eads at gmail.com Tue May 22 02:55:55 2012 From: damian.eads at gmail.com (Damian Eads) Date: Mon, 21 May 2012 23:55:55 -0700 Subject: skimage now in Debian In-Reply-To: References: Message-ID: Congrats! This is excellent news. On Sun, May 20, 2012 at 12:24 PM, St?fan van der Walt wrote: > Hi everyone, > > I'm happy to announce that the package "python-skimage" is now > included in Debian! ?A special word of thanks to Yaroslav Halchenko > who worked so hard to make this happen. > > If we can release 0.6 this week, then that should be the version > included Debian, if I understand correctly. ?So, if you have any time > to review, document, test, please do so ASAP! > > St?fan From emmanuelle.gouillart at nsup.org Tue May 22 02:49:12 2012 From: emmanuelle.gouillart at nsup.org (Emmanuelle Gouillart) Date: Tue, 22 May 2012 08:49:12 +0200 Subject: skimage now in Debian In-Reply-To: References: Message-ID: <20120522064912.GB30099@phare.normalesup.org> Wow, great news!! Thanks a lot, Yaroslav!! Emmanuelle On Sun, May 20, 2012 at 12:24:59PM -0700, St??????fan van der Walt wrote: > Hi everyone, > I'm happy to announce that the package "python-skimage" is now > included in Debian! A special word of thanks to Yaroslav Halchenko > who worked so hard to make this happen. > If we can release 0.6 this week, then that should be the version > included Debian, if I understand correctly. So, if you have any time > to review, document, test, please do so ASAP! > St??????fan From jturner at gemini.edu Mon May 28 21:00:34 2012 From: jturner at gemini.edu (James Turner) Date: Mon, 28 May 2012 21:00:34 -0400 Subject: Fwd: [scikits-image] FITS plugin test failures on OS X Lion (#173) In-Reply-To: References: Message-ID: <4FC41FB2.4060408@gemini.edu> This few-line change should fix the following PyFITS problem: https://github.com/scikits-image/scikits-image/pull/194 Cheers, James. On 18/04/12 21:39, St??????fan van der Walt wrote: > Hi James > > Do you know why hdu.size is an int on OSX? Or is this a version > specific problem? > > St??????fan > > > ---------- Forwarded message ---------- > From: Christoph Deil > > Date: Fri, Apr 13, 2012 at 5:46 AM > Subject: [scikits-image] FITS plugin test failures on OS X Lion (#173) > To: Stefan van der Walt > > > I installed skimage cdb61f82ff2285b26be9eb1decb8fc5657fecf50 on Mac OS > X 10.7 with pyfits 3.1-0.0.dev846 . > > There are two test FITS-related test failures: > http://dl.dropbox.com/u/4923986/bug_reports/skimage-test.log > > Also there's lots of WARNINGs when building the docs: > http://dl.dropbox.com/u/4923986/bug_reports/skimage-docs.log > > --- > Reply to this email directly or view it on GitHub: > https://github.com/scikits-image/scikits-image/issues/173 From stefan at sun.ac.za Tue May 29 12:03:05 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 29 May 2012 09:03:05 -0700 Subject: Valgrind please? Message-ID: Hi, Does anyone have time to run the current version of scikits-image through Valgrind? We're getting a segfault on the SPARC platform (via the Debian builders), and I wanted to make sure there are no strange allocations going on that we're missing. Thanks St?fan From stefan at sun.ac.za Tue May 29 21:40:52 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 29 May 2012 18:40:52 -0700 Subject: Test error with tifffile plugin In-Reply-To: References: Message-ID: On Tue, May 29, 2012 at 5:51 PM, Tony Yu wrote: > Are there any other plugins that should explicitly state that they provide > 'imread_collection'? I can run `skimage.io.ImageCollection` but not > `skimage.io.imread_collection` so presumably some other plugin(s) can read > image collections. Would it help to modify the test plugin to handle image collections? I'm not sure if that is loaded by default in the test suite. The idea was to eventually have the tiff loader handle multiple layers as an ImageCollection as well (and the video loading routines, too). St?fan From tsyu80 at gmail.com Tue May 29 20:51:00 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 29 May 2012 20:51:00 -0400 Subject: Test error with tifffile plugin Message-ID: I'm getting an error for one of the tifffile plugin tests. Basically, the teardown functionof the test is trying to reset all the io functions to their defaults. But, it turns out that the default for 'imread_collection' is empty on my system. I'm not sure if 'imread_collection' should be empty (the fits plugin seems to be the only one that explicitly states that it reads collections and I don't have pyfits installed), but the teardown function should be able to handle that case. I've fixed the test error in PR 195 . Are there any other plugins that should explicitly state that they provide 'imread_collection'? I can run `skimage.io.ImageCollection` but not `skimage.io.imread_collection` so presumably some other plugin(s) can read image collections. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Tue May 29 21:04:40 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 29 May 2012 21:04:40 -0400 Subject: Valgrind please? In-Reply-To: References: Message-ID: On Tue, May 29, 2012 at 12:03 PM, St?fan van der Walt wrote: > Hi, > > Does anyone have time to run the current version of scikits-image > through Valgrind? We're getting a segfault on the SPARC platform (via > the Debian builders), and I wanted to make sure there are no strange > allocations going on that we're missing. > > Thanks > St?fan > I ran all of the scikits-image examples through valgrind (following instructions from the scikits-learn website) and didn't see any leaks. Not all Cython functions are tested in the examples, though (for example functions in morphology and io) so this isn't a thorough test. -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From jturner at gemini.edu Tue May 29 21:13:10 2012 From: jturner at gemini.edu (James Turner) Date: Tue, 29 May 2012 21:13:10 -0400 Subject: Valgrind please? In-Reply-To: References: Message-ID: <4FC57426.8000303@gemini.edu> > Does anyone have time to run the current version of scikits-image > through Valgrind? We're getting a segfault on the SPARC platform (via > the Debian builders), and I wanted to make sure there are no strange > allocations going on that we're missing. > > Thanks > St??????fan > > > I ran all of the scikits-image examples through valgrind (following instructions > from the scikits-learn website > ) and didn't see any > leaks. Not all Cython functions are tested in the examples, though (for example > functions in morphology and io) so this isn't a thorough test. > > -Tony Isn't a segfault likely to be in SciPy (especially if it's calling something like ATLAS)? That's where I've seen most problems in the past, though I'm not really familiar with the extensions in scikits.image itself. Just an idea. Cheers, James. From stefan at sun.ac.za Wed May 30 01:25:18 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 29 May 2012 22:25:18 -0700 Subject: Test error with tifffile plugin In-Reply-To: References: Message-ID: On Tue, May 29, 2012 at 8:18 PM, Tony Yu wrote: > Hmm, I don't think so. It looks like `skimage.io._plugins.plugin.call` looks > in `skimage.io.plugin_store`. But `plugin_store` is populated by the first > installed plugin in a list of preferred plugins. Whatever matches, takes > over all io operations (more or less). If that plugin doesn't provide > `imread_collection`, then that entry in `plugin_store` remains empty. (In > other words,?after accepting a plugin,?there's no additional check > afterwards to fill in the functions not provided by that plugin.) That's not the way it should behave; we should fix it to transparently fall back to whatever is available. > Is there any reason why there's no default `imread_collection` which just > passes arguments to `ImageCollection`? No, that would probably make sense. And I think ImageCollection uses the plugin version of imread. St?fan From stefan at sun.ac.za Wed May 30 01:26:16 2012 From: stefan at sun.ac.za (=?ISO-8859-1?Q?St=E9fan_van_der_Walt?=) Date: Tue, 29 May 2012 22:26:16 -0700 Subject: Valgrind please? In-Reply-To: References: Message-ID: On Tue, May 29, 2012 at 6:04 PM, Tony Yu wrote: > I ran all of the scikits-image examples through valgrind (following > instructions from the scikits-learn website) and didn't see any leaks. Not > all Cython functions are tested in the examples, though (for example > functions in morphology and io) so this isn't a thorough test. Thanks a lot, Tony--that's very helpful. St?fan From tsyu80 at gmail.com Tue May 29 23:18:56 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Tue, 29 May 2012 23:18:56 -0400 Subject: Test error with tifffile plugin In-Reply-To: References: Message-ID: On Tue, May 29, 2012 at 9:40 PM, St?fan van der Walt wrote: > On Tue, May 29, 2012 at 5:51 PM, Tony Yu wrote: > > Are there any other plugins that should explicitly state that they > provide > > 'imread_collection'? I can run `skimage.io.ImageCollection` but not > > `skimage.io.imread_collection` so presumably some other plugin(s) can > read > > image collections. > > Would it help to modify the test plugin to handle image collections? > I'm not sure if that is loaded by default in the test suite. The idea > was to eventually have the tiff loader handle multiple layers as an > ImageCollection as well (and the video loading routines, too). > > St?fan Hmm, I don't think so. It looks like `skimage.io._plugins.plugin.call` looks in `skimage.io.plugin_store`. But `plugin_store` is populated by the first installed plugin in a list of preferred plugins. Whatever matches, takes over all io operations (more or less). If that plugin doesn't provide `imread_collection`, then that entry in `plugin_store` remains empty. (In other words, after accepting a plugin, there's no additional check afterwards to fill in the functions not provided by that plugin.) Is there any reason why there's no default `imread_collection` which just passes arguments to `ImageCollection`? -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsyu80 at gmail.com Thu May 31 00:42:14 2012 From: tsyu80 at gmail.com (Tony Yu) Date: Thu, 31 May 2012 00:42:14 -0400 Subject: Test error with tifffile plugin In-Reply-To: References: Message-ID: On Wed, May 30, 2012 at 1:25 AM, St?fan van der Walt wrote: > On Tue, May 29, 2012 at 8:18 PM, Tony Yu wrote: > > Hmm, I don't think so. It looks like `skimage.io._plugins.plugin.call` > looks > > in `skimage.io.plugin_store`. But `plugin_store` is populated by the > first > > installed plugin in a list of preferred plugins. Whatever matches, takes > > over all io operations (more or less). If that plugin doesn't provide > > `imread_collection`, then that entry in `plugin_store` remains empty. (In > > other words, after accepting a plugin, there's no additional check > > afterwards to fill in the functions not provided by that plugin.) > > That's not the way it should behave; we should fix it to transparently > fall back to whatever is available. > I've addressed this specific issue in PR 196. Note: It still doesn't fix the original test error (but if the tifffile plugin gained an `imread_collection` function, then that would fix it). > > > Is there any reason why there's no default `imread_collection` which just > > passes arguments to `ImageCollection`? > > No, that would probably make sense. And I think ImageCollection uses > the plugin version of imread. > Yup: any plugin that provides `imread` should be able to provide an `imread_collection`. I can take care of this at a later date. (It'd be great if someone beat me to it, though ;) -Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: