Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PlotService to SciJava #43

Closed
wants to merge 6 commits into from
Closed

Conversation

maarzt
Copy link
Contributor

@maarzt maarzt commented Dec 19, 2018

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

  • A maven artifact org.scijava;scijava-plot which has no additional dependencies
  • Viewer in scijava-ui-swing that depends on JFreeChart (This PR)
  • Converters in imagej-legacy for converting a plot to ImagePlus or Img.

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:

  • Release scijava-plot
    • Review https://github.com/maarzt/scijava-plot
    • Make sure pom.xml contains the right entries
    • Move the repository to github.com/scijava
    • Update the travis configuration because groupId and artifactId changed, maybe reset the version
    • Make the first release of scijava-plot
  • Rebase this PR to remove the WIP commit and change the dependency to the released version of scijava-plot
  • Merge this PR
  • Merge the PR in imagej-legacy

They depend on converters Plot -> JFreeChart, and the ChartPanel
which is part of the JFreeChart library.
This allows to store a plot as SVG with the SciJava IOService.
The converter is based on converters Plot -> JFreeChart
@ctrueden
Copy link
Member

ctrueden commented Jan 7, 2019

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
Copy link
Member

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
Copy link
Member

ctrueden commented Nov 1, 2019

@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:

  • Will this API work well from a Jupyter notebook? Ideally calls should be identical and produce objects that render nicely.
  • Does/can it handle plotting of Histogram1d objects?
  • Are there ways it makes sense to integrate with ImageJ1 via the ImageJ Legacy layer?

@frauzufall
Copy link
Member

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
Copy link
Contributor Author

maarzt commented May 14, 2020

@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
Copy link
Member

As far as I can tell, the commits of this PR were merged with 1bf54bd, and this can be closed.

@ctrueden
Copy link
Member

@imagejan I think you are right.

imagej/imagej-legacy#208 is still pending, though.

@ctrueden ctrueden closed this Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants