Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Scipion Java

Airen Zaldivar Peraza edited this page Dec 18, 2015 · 84 revisions

As you may know ShowJ is our default viewer for most of Scipion objects and Particle Picker allows us to visualize coordinates or pick particles either manually or automatically . Scipion source packages related to ShowJ and Particle Picking include:

  • xmipp.ij.commmons : ShowJ uses ImageJ to display and process images. This package contains ImageJ related classes, such as XmippImageCanvas, XmippImageWindow and ImagePlusLoader.

  • xmipp.jni : Contains Java bindings with Xmipp C++ code

  • xmipp.viewer.models : Contains the different table models used to display data in ShowJ

  • xmipp.viewer.windows : Contains ShowJ main frame and associated dialogs: Columns Editor, Plotter, CTFProfile, etc.

  • xmipp.viewer.scipion : Contains Scipion extensions of Metadata, GalleryData and GalleryJFrame classes

  • xmipp.viewer.particlepicker: Contains base classes for particle picking: frame, canvas, micrograph, particles dialog, etc.

  • xmipp.viewer.particlepicker.training: Contains supervised picker implementation

  • xmipp.viewer.particlepicker.tiltpair: Contains tilt pair picker implementation

xmipp.jni package contains java versions of Xmipp core classes for image processing, such as MetaData or ImageGeneric. A Metadata represents an star file and it is used to read and store information in Xmipp. ImageGeneric represents an image in memory. It is used to load and write image files, such as .stk, .mrc, .vol, etc.

xmipp.viewer.particlepicker.training and xmipp.viewer.particlepicker.tiltpair packages in turn contain model and gui packages with data model and windows respectively

In the following class diagram we display ShowJ main classes and its relations:

ShowJ Class Diagram

GalleryJFrame and table models are used for data visualization while GalleryData it is in charge of the data manipulation and business logic. To visualize most of data objects in Scipion DataViews are used. DataViews can display data in desktop and web using ShowJ or ShowJ Web. These classes are defined in pyworkflow/em/viewer.py. The developer can specify columns visibility, order, type of viewer (gallery or table), etc. In turn this configuration it is given as input to ShowJ from the command line.

In the following class diagram we display particle picker main classes and its relations:

Picker Class Diagram

Base classes ParticlePicker, ParticlePickerJFrame, ParticlePickerCanvas, etc, are extended to implement supervised and tilt pair picker. Images are loaded using ImagePlusLoader and displayed using XmippImageWindow, as in ShowJ. While ParticlePickerJFrame and ParticlePickerCanvas are used to visualize and edit coordinates ParticlePicker contains all the business logic related to the picking process.

ShowJ and Particle Picker use sockets to communicate with Scipion. The port used for communication it is specified as an input param to java. There are a number of operations that require this functionality:

  • creating subsets: We can create subsets of classes, of particles from classes, of representatives, of images, of volumes, etc. All of them are implemented in the protocol_batch module.

  • registering coordinates: This socket is implemented in pyworkflow/em/showj.py to register picker coordinates

  • executing object commands: This socket and the corresponding actions are implemented in pyworkflow/gui/project/project.py

Clone this wiki locally