Hi everyone, My colleague Evelyn and I have been using scikit image's draw utilities to generate test data for modeling particle distributions on optical fibers (ie the SEM images I sent a few weeks ago). We are doing this to test some new models for nanoparticle cluster fitting that we've developed. In working on this, we believe we've come up with a general framework for drawing 2D particle ensembles in skimage. One could envision using it to do something like: Step 0: Generate a blank canvas of resolution 1024 x 768 Step 1: Add circles of average radius 5 pixels until 30% of the image is covered. - Arrange these randomly vs. equally spaced on a grid etc... Step 2: Add an "cluster" of particles to this image. Paint only the clusters red. Step 3: Run an optimization that maximizes the inter-particle spacing. Step 4: Make all the particles smaller than a certain area green. Step 5: Try watershedding etc... By generating the sample images in skimage, we wouldn't have to break out of the python workflow to make our test data. We believe that we've come up with some abstractions that would allow for such an toolset. This includes defining a abstract class for different particle shapes, and then wrapping skimage.draw() functions as a class method. Before we get invested in this, I had a few questions: 1. Is this something that, if executed well, would be of interest to incorporate into scikit image? If so, I will start working on it as a branch; otherwise, we'll just use skimage as a dependency. I'd image it would either be a submodule of skimage.draw(), something like skimage.draw.ensemble() or draw.psuedodata()... 2. Is anyone aware of a pre-existing tooset/library (preferrably in Python) that's built for this? And if so, is that library compatible to skimage? 3. When a user runs skimage.draw.circle(), it returns *rr* and *cc*, what are these? Is cc the "chain code"? One caveat: our design plan is object oriented. We thought that the best way to have an image with several particles would require a *Particle*class to add enough metadata to the returns of scikit.draw() so that particles could indivually be tracked, isolated and manipulated. The ensemble would be created on a *Canvas* class (better name? *TestImage*?), which is responsible for storing an ensemble of Particles, as well as all the drawing and organization of the ensemble. For example, a circle would have attributes X, Y, R, which are then passed to a draw() method that called skimage.circle(). In this way, one could track particle positions, manipulate and redraw(). Would something like this clash with skimage's basic design paradigms? If so we, maybe it would best to keep this toolkit out of skimage. PS, is anyone else working on this, or interested? Thanks
participants (1)
-
Adam Hughes