gpilab / core-nodes

The core nodes are a collection of basic data manipulation and visualization algorithms.
http://docs.gpilab.com/en/develop/NodeDev/devguide.html
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

Image Analysis Node #21

Open borupdaniel opened 4 years ago

borupdaniel commented 4 years ago

The existing ImageDisplay allows the creation of ROIs but doesn't give anything beyond their corner points. I'm working on a new node, ImageAnalyze, that uses the pyqtgraph library. So far I've been able to allow for the user to:

So far this is very much a work in progress and it may make more sense in the end to combine it with ImageDisplay. I'd initially started with the pyqtgraph ImageViewer widget, but wasn't able to change the ROI shape without crashing it.

@aganders3 it would be great if you get a chance to give this a quick test, or just help brainstorm any thoughts on what else might be useful here. If you want to test it, you'll have to set up a conda env with pyqtgraph installed. One question I'm thinking of already is how best to handle cases where someone wants a multi-point ROI and doesn't know the number of points a priori.

There are also some menu options that pyqtgraph has accessed by a right click that are being stepped on by gpi's in port / out port prompt — is there any way we can bypass that for a particular widget?

aganders3 commented 4 years ago

Thanks @borupdaniel - this is cool and something that has been needed for a long time. I'll try to look at it ASAP. @schudds may also have feedback because I think he has built some things like this and/or worked on the ImageDisplay node before.

Off the top of my head for brainstorming:

  1. It might be too much work but you will probably eventually want 3D ROIs on 4D datasets. I can't really envision wanting 4D ROIs though, so you probably don't need to generalize beyond that.
  2. You also may want multiple ROIs (though multiple nodes would probably suffice in that case).
  3. I would make a selector to choose how the ROI values are processed (mean, median, stdev, etc.) and the option to output all values in the ROI in an array (without a summarizing function).