scijava / scijava-ui-swing

SciJava UI components for Java Swing.
BSD 2-Clause "Simplified" License
7 stars 11 forks source link

Add PlotService to SciJava #43

Closed maarzt closed 2 years ago

maarzt commented 5 years ago

I split the PlotService as discussed with @ctrueden recently. It now consist of three parts:

I might have overused converters a bit, what do you think? There are the following converters

  1. XYPlot -> JFreeChart (part of scijava-ui-swing)
  2. CategoryChart -> JFreeChart (part of scijava-ui-swing)
  3. Plot -> java.awt.image.BufferedImage (based on converters 1 and 2, part of scijava-ui-swing)
  4. Plot -> ImagePlus (based converter 3, part of imagej-legacy)
  5. Plot -> Img (based on converter 4, part of imagej-legacy) The converters 1 and 2 are used to display the plot using ChartPanel of JFreeChart. The converters 4 and 5 are there because they do what users want: Convert a plot into a datatype that they know like ImagePlus or Img. The converter 3 exists to make imagej-legacy independent of JFreeChart.

This is what I think needs to be done to get plot service released:

ctrueden commented 5 years ago

I am hoping to work on a new ImageJ+Fiji release after January 22, that includes these features. There is also synergy here with the PlotService maybe being usable from Jupyter notebook. Looking forward to trying it out.

imagejan commented 5 years ago

What's the status of this PR? Can maarzt/scijava-plot be moved to the scijava org as a start?

I would love to have PlotService available in a normal Fiji installation some time soon πŸ™‚

ctrueden commented 5 years ago

@imagejan Been endlessly too busy, sorry. 😞

Even after all this time, I fear I haven't really studied the PlotService design deeply. Perhaps we could push to get it finalized and merged during the upcoming December hackathon in Dresden. But there always seems to be some higher priority...

I'd also like to think very carefully about plotting, to minimize the chance of needing to deprecate this API in future. Some concerns I have include:

frauzufall commented 4 years ago

Hi @maarzt, I'd like to help move this forward if I am able to, maybe we can chat about it if you have time? I can't find the scijava-plot repo without dependencies, did you maybe not push your latest version to https://github.com/maarzt/scijava-plot or am I misunderstanding something?

maarzt commented 4 years ago

@frauzufall Thank you for looking at this. You were right, I forgot to push my changes to scijava-plot/master. Now it's up to date, dependencies are removed :)

imagejan commented 2 years ago

As far as I can tell, the commits of this PR were merged with https://github.com/scijava/scijava-ui-swing/commit/1bf54bd0864f23555bf525ebdb525dcc9df63515, and this can be closed.

ctrueden commented 2 years ago

@imagejan I think you are right.

https://github.com/imagej/imagej-legacy/pull/208 is still pending, though.