Final Evaluation
Google Summer of Code 2021 Project Final Report
This is the final report of the project undertaken by me during the Google Summer of Code 2021. This report contains relevant information pertaining to all the work that I experimented out during the GSoC timeline, from May 2021 to August 2021.
Student Name
Organization
National Resource for Network Biology
Project Title
Develop GUI for ImageJ groovy script calling VCell API
Mentors
Project Overview
We have to create a service for VCell users that allows Fiji/ImageJ scripting to directly access the VCell client and then expand this service into a series of user-friendly plugins for ImageJ that will automate processing and analyzing cell imaging simulation experiments. The task will include: Entering the appropriate images to create a geometry Setting initial conditions for the simulation Running multiple simulations with varying parameter sets and Visualizing and comparing simulation results to the original experimental image set
Past Synopsis of the Project
Earlier the ImageJ user had to write scripts in Groovy in an interface called Macros which automates all the commands. These commands were the information related to VCell User ID, simulation, variable, and other parameters according to the result required. There was no such package for ‘plugins’ that could eventually be a part of the menu-structure
Tasks Done During the Coding Period
The coding period was all about exploring and implementing various ideas for designing a menu structure that could bring out various working plugins. The project was based on GUI development hence it was not just based on coding but also for showing the creativity on GUI to make it more attractive and appealing.
To begin with, I started learning about the syntaxes involved in Groovy and then proceeded towards its conversion into Java. I experimented with the code for various situations to make the most appropriate keeping in mind the appearance and ease of accessibility.
The project was basically to design a menu structure that could give us options to choose from various ImageJ plugins calling VCell API. These plugins are basically Groovy files which when run in Macros produce the desired results. The workflow was such that on launching the ImageJ interface, we got many options to explore in the toolbar, the ‘plugins’ option is the one that suits our needs.
So in this menu structure, we have Plugins that have various options like VCell Plugins and VCell Help which in turn have a list of functionalities to offer.
Designing the menu structure
For designing the menu structure, I referred ClearRecent.java and the code is
Which signifies:
- The Header under which the plugin will be placed
- The icon image to clarify the purpose and make the plugin stand out
- The hierarchy or the serial order in which the plugin should appear
- The short-cut keys to access the plugin with keyboard
Taking the example of VCellPlugin.java The structure is designed as follows:
- label = "VCell Plugins" is the submenu of Plugins which has various other plugins with various functionality
- iconPath="search_icon.gif" is for assigning an icon image to the plugin
- weight = 4 assigns a priority to submenu VCell Plugins and seperates it from other available options with a line.
- mnemonic = 'V' helps the user to access VCell Plugins with keyboard by pressing the key 'v'. it is represented by an underline on 'V' Of VCell Plugins
- label = "VCell Model Search" is for accessing the the plugin named VCell Model Search inside the VCell Plugins Submenu
- weight = RecentFileService.MAX_FILES_SHOWN + 10 is for assigning the hierachy to the plugin inside the list of the submenu
- mnemonic = 'm' helps the user to access the plugin VCell Model Search with keyboard by pressing the key 'm'. it is represented by an underline on 'M' Of VCell Model Search
- accelerator = "^M" is another way to access the plugin VCell Model Search through keyboard by pressing a combination of Ctrl and M. This is indicated on the side of the Plugin name.
- label = "VCell Model Search " is for naming the GUI of the result obtained after simulation
VCell-Plugins
The VCell Plugins has a drop-down list of Plugins that are in communication with VCell:
Line Plot - The Groovy script chart.groovy is converted into a Java plugin which results in 2 plots
- Line Plot by Time
- Time Plot by Distance It takes up data like, ModelType, VCell User ID, VCell User Name, Application, Simulation, Variable, TimePont, Start and End Index.
VCell Model Search - The Groovy script is converted into a Java plugin. In addition to just the direct conversion, it has certain additional features like selecting the various variables and suitable times through sliders. By default, it takes up data such as ModelType, VCell User ID, VCell User Name, Application, and then accordingly loads the Simulation, Variable values
VCell-Help
I designed VCell Help with an objective that it could be resourceful to future users and developers. If someone wants to create plugins out of some Groovy scripts then they may refer to these as how elements are added to a GUI and make them functional.
VCell ImageJ-Help - This plugin opens into a GUI which retrieves information from your machine, like your Operating System, Architecture, and returns it. Informs about the prerequisites for running the VCell plugins and also gives online assistance by directing to the browser with a click
VCell ImageJ Groovy Scripts - This plugin opens into a GUI that gives information about running the various groovy scripts in Macros and also directs the user to various scripts on Github
VCell ImageJ Template - This plugin is not related to any functionality but is extremely useful as a reference for future developers which might help them in making their own plugins. It has various commands for text editing, adding buttons, browsing files, etc. Some of the features I had referred from WidgetDemo.java
VCell ImageJ Template Example - This plugin is another template that is functional and tells how we can implement various elements in a GUI which can run as a plugin.
For Future Reference
These java files are for future reference purposes. During the course of time I had tried out various permutations with the plugins and for that made many changes in the existing ones from making them easily understandable to creating a whole new file.
The 'Minimal' Files
A lot of time gets elapsed till the result gets loaded after clicking ‘OK’ on the information displayed on the GUI. So to make this elapsing time attractive, there is an addition of a code segment that shows the ‘percentage’ loaded.
To understand the overall functionality of code easily, we can get rid of these progress bars and even understand what segment of code they are affecting other than just showing the progress. This way we can easily understand the dependency of various segments.
ModelLoad_Minimal
This is a reduced version of ModelLoad. , whose sole purpose is to display the GUI and the resulting image. The segment showing the GUI loading time and the time elapsed in loading the result has been omitted. This way it's just a file performing a minimum number of tasks.
VCellPlugin_Minimal
This is a reduced version of VCellPlugin , whose sole purpose is to display the GUI and the resulting image. The segment showing the GUI loading time and the time elapsed in loading the result has been omitted. This way it's just a file performing a minimum number of tasks.
Other Files
LinePlot_Search
It was an attempt to combine VCellPlugin and ModelLoad to give an interface in which the user doesn't have to type in the information but just select the most appropriate one from a drop-down list.
ModelLoad_Analyse
This has a vivid description, explaining the workflow of ModelLoad
VCellPlugin_JComboBox
This is to understand how JComboBox is functioning inside VCellPlugin. The original file was having the JComboBox commands as comments so on uncommenting them we can see how those commands are responding.
Combinefig
This is the initiation of the plug-in development of groovy script combineFig.groovy
Testing of Plugin in Various Cases
Reference: VCellPlugin.java
Testing A:
- Did Not log in to my VCell Account
- Activated my Fiji ImageJ service
Which gave the resultant as
Testing B:
- Logged into my VCell Account
- Stopped the Fiji (ImageJ) service
Which gave the resultant as
Future Scope
The project still has wide scopes for future developers. There are many other Groovy scripts that could be converted into a plugin referring to the other build plugins. Currently, some of the Groovy scripts might be broken because of outdated libraries or user access but they can be easily fixed with some meetings with the project mentors.
Groovy scripts being more powerful and flexible can be taken into use instead of plugins In the menu structure of plugins, an interface that is Macros can be added for reading the Groovy commands for various models and simulation values and producing results accordingly.
Contribution Later
For contributions and improvements do refer to the README for the initial setup of VCell in your development environment and refer to vcell-imagej-helper for the plugin development.
Acknowledgment
It had been a great experience working with all my mentors who guided and supported me in all the thicks and thins of the project. They have always given me time to explore and analyze things from various perspectives. They have helped me tremendously to gather and analyze my data, as well as interpreting the results and communicating these results. They were instrumental to my work and I am lucky to have such welcoming mentors.
Conclusion
The coding period of 10 weeks had been amazing as it gave me exposure to real-life problems. All thanks to the open-source community and NRNB for providing an environment that helped me enhance my skills and be beyond that.
For any other information about the project, we can always get connected over at
Comments
Post a Comment