-
Notifications
You must be signed in to change notification settings - Fork 48
Scipion Java
As you may know ShowJ is our default viewer for most of Scipion objects and Particle Picker allows us to pick particles either manually or automatically, or visualize coordinates . Scipion source packages related to ShowJ and Particle Picking include:
-
xmipp.jni : Contains Java bindings with 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.
-
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.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:
To visualize most of data objects in Scipion DataViews are used. DataViews can display data in desktop and web. These classes are defined in pyworkflow/em/viewer.py. The developer can specify columns visibility, order, type of viewer (gallery or table). 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:
In Scipion 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 Particle Picker contains all the business logic related to the picking process.
ShowJ and Particle Picker use sockets to communicate with Scipion. There are a number of operations that require this functionality: creating subsets, registering coordinates, executing object commands, etc. The port used for communication it is specified as an input param to java. In Scipion, these sockets are implemented in pyworkflow/em/showj.py and pyworkflow/gui/project/project.py. In java all the operations that involve sockets use runCommand method from XmippWindowUtil class. 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.