Jul-29-2019, 04:30 PM
Hi all,
Please excuse my newbie’ness - I’m new to both python and image/data processing in python (I’m not a new dev though!).
I’d like to ask for advice on how and which modules to use for some algorithm steps. I know I could spend a few days googling, but this and similar questions are probably very common to people just coming into python and/or image/data processing in it - so I thought I’d post
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. (If you don’t know python, think matlab as a somewhat equivalent).
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.
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).
I would like to be able to create a region in an image with a “wand” type tool (ImageJ term) 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)
Please excuse my newbie’ness - I’m new to both python and image/data processing in python (I’m not a new dev though!).
I’d like to ask for advice on how and which modules to use for some algorithm steps. I know I could spend a few days googling, but this and similar questions are probably very common to people just coming into python and/or image/data processing in it - so I thought I’d post
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. (If you don’t know python, think matlab as a somewhat equivalent).
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
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 tool (ImageJ term) 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)