silx icon indicating copy to clipboard operation
silx copied to clipboard

silx.gui: support imageaggregate in _plot2d

Open EdgarGF93 opened this issue 1 year ago • 4 comments

Checklist:


This PR enables:

  • [x] ImageAggregate filters on _plot2dview
  • [x] ImageAggregate filters on Nexusimageview
  • [ ] ImageAggregate filters on ComplexView
  • [x] ImageAggregate filters on StackView

EdgarGF93 avatar Sep 19 '24 17:09 EdgarGF93

Not sure if the slot _aggregationModeChanged and setAggregatedImage are well placed into into the class Plot2View

EdgarGF93 avatar Sep 19 '24 17:09 EdgarGF93

how about this approach? If yes, I will use it for the rest of the classes

EdgarGF93 avatar Sep 26 '24 11:09 EdgarGF93

About the _ComplexImageView class, the setData method updates the array and also the Complex mode, so I'm not sure how to implement the filter without changing the ImageComplexView class

EdgarGF93 avatar Oct 06 '24 10:10 EdgarGF93

Do you mean adding the Aggregation items in the class where the self._plot is? (StackView and ArrayImagePlot as you said) In the case of _Plot2dView the plot is what is called widget, but yes, _Plot2dView is the class creating the plot anyway

Check it if I understood correctly

EdgarGF93 avatar Oct 27 '24 17:10 EdgarGF93

Do you mean adding the Aggregation items in the class where the self._plot is? (StackView and ArrayImagePlot as you said)

Yes, StackView and ArrayImagePlot which are the widgets that create and add/remove the ImageAggregatedItem to the plot (there is not necessarily a self._plot in there). Doing so will make those widgets self-consistent.

t20100 avatar Nov 04 '24 12:11 t20100

I made a PR on your branch with a few updates/fixes: https://github.com/EdgarGF93/silx/pull/3 I let you review it and merge if you agree with it, else let's discuss it.

Apart from that, this looks good to me! Thanks for the work and your patience !

t20100 avatar Nov 18 '24 16:11 t20100

Looks good to me, thanks Thomas!

EdgarGF93 avatar Nov 26 '24 15:11 EdgarGF93