I’ve got a set of very long macros done in ImageJ that I need to move over to python instead. These macros operate on dicom phantom images (2D only, typically int32 data) to do various analysis steps.
I’ve already put together a registration module for this using simpleITK, and now are looking to get the actual “analysis” part done.
So what I’m looking for advice on is what python libraries would be the “best” (ie easy to code, fast, robust) for a couple of typical ImageJ operations. I could code it all by hand, but I’m guessing there are already modules to do it - but I’m not sure which as I’m new to the whole python scene. So what I’d love is people’s thoughts on what’s good to use.
- “Region” definition, measurement and display - equivalent to the ImageJ region definition tools and “measure”
I need to be able to arbitrarily define “regions” in an image, and the a) take simple measurements over that region (mean value, std dev etc) and b) have that region be easily displayable as an overlay (coloured, vector based if possible, sub-pixel size/location) in an output copy of the image.
By “region” here I need rectangle, ellipse and arbitrary polygon (rectangle/ellipse are not only orthogonal to the axis, but can have rotation).
- “Wand” region definition, with region “characterisation”
I would like to be able to create a region in an image with a “wand” type IJ tool that takes a point and then grows a region outwards from that based on thresholded pixel values. The region can then be “characterised” in terms of a) it’s centre, it’s centre of mass (weighted centre), is bounding box size and it’s circularity (fitted ellipse, with main/minor lengths and angles) (So IJ measure on a selection)