Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Java library for writing a drawing program?

I need to write a simple Java GUI application that, basically, allows the user to mark regions in a CT lung image.

To make the marking process easier, it is important that the program provides some basic tools/functionalities similar to a drawing program like MS Paint, like, for example, undo/redo, marker (brush) width and region fill.

Is there any Java library that provides components to write a drawing program?

like image 416
Alceu Costa Avatar asked Mar 28 '11 15:03

Alceu Costa


1 Answers

I will suggest you to have a look at ImageJ. The big plus point is its root in medical domain and it is extensible through custom plug-in. The following parts taken from ImageJ Wikipedia entry.

ImageJ is a public domain, Java-based image processing program developed at the National Institutes of Health. ImageJ was designed with an open architecture that provides extensibility via Java plugins and recordable macros.

And if you don't find a functionality as per your needs than it allows you to write your own plug-in.

User-written plugins make it possible to solve many image processing and analysis problems, from three-dimensional live-cell imaging, to radiological image processing, multiple imaging system data comparisons to automated hematology systems.

The only problem that I can foresee is the amount of extra things that you have to ship along with the functionality you want to implement.

If you want to avoid the above problem then have a look at @Zack's answer. In addition to that have a look at these:

  1. Flood fill using a stack
  2. Add an undo/redo function to your Java apps with Swing
  3. Java 2D Samples - Java2s
like image 129
Favonius Avatar answered Oct 26 '22 19:10

Favonius