Giter Club home page Giter Club logo

psfj's Introduction

PSFj

Know your microscope fluorescence

PSFj analyzes a stack of images of fluorescent beads to calculate the resolution of your microscope across the fields of view. PSFj is written in JAVA and compatible with Windows, MacOS X and Linux.

Download and instructions

Please visit PSFj website http://www.knoplab.de/psfj/

Developer manual

Dependencies

All jar dependencies are located in the lib folder. You can use this Netbeans or Eclipse to edit the code.

Introduction to the data processing

The data processing occurs in several steps using divers configurations elements. PSFj loads images and detects beads located on the image stack. It then extracts the beads into substacks of images of the size dictated by the variable Frame size in order to calculate the x,y and z resolutions. It uses a 2D fitting of the bead image focal plane in order to calculate the x and y resultions, and a 1D fit for the z resolution. Once done, the software compiles the informations of each beads into tables and graphics. In the case, of multichannel analysis, a additional step tries to associate the signals coming from different channels to the same bead. In other words, for each bead detected in one channel, the software tries to find the corresponding bead of the other channel.

After that, the bead data is subject to several filtering that ensure that the displayed results come from fitting presenting a good signal to noise ratio.

The three most important classes

In order to manipulate at a code level, it's important to understand the role of the different classes involved in the processing.

BeadImageManager

This classes deals with data loading, processing and export in a high level. The BeadImageManager was created to allow easy management of the process.

Microscope

This classes simply holds the microscope configuration. This classes is widely used to convert pixel data into the metric system.

BeadImage

This classes takes care of loading the pixel data from a single stack, and defines diverse parameter of the stack like the focal plane, the segmentation threshold or the frame size.

In practice...

BeadImageManager manager = new BeadImageManager();

// an object representing the image is created, however, the image is not yet loaded
BeadImage image = new BeadImage("path/to/image");

image.setMicroscope(new Microscope(new IniFile("path/to/microscope_configuration.ini")));

// loads the image from the memory
image.workFromMemory();

// Calculates the focal plane automatically
image.autoFocus();

// set the bead frame to 20 times the thoretical x/y resolution
image.setBeadEnlargement(20);

manager.add(image);

// make sure all the parameters are set
manager.verifyBeadImageParameters();

// do the processing
manager.processFiles();

// will export a PDF sum up in the same folder as the image
manager.exportPDFSumUp(false);

A good example is to look at the PSFj.java file which more extensively the BeadImageManager and also deals with the multichannel cases.

Diving into the data model

... coming soon.

Licencing

PSFj is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

psfj's People

Contributors

cmongis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

psfj's Issues

Crash on Linux

Hey @cmongis. Your plugin is great and very useful. Congrats!

I can run it on Windows but not on Ubuntu because it crash during startup:

$ ./psfj
7552
jar:file:/home/hadim/PSFj/PSFj.jar!/knoplablogo.png
SwixML 2.3 (#230)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fa83fb18fc9, pid=1022, tid=0x00007fa83676f700
#
# JRE version: OpenJDK Runtime Environment (8.0_151-b12) (build 1.8.0_151-8u151-b12-0ubuntu0.17.10.2-b12)
# Java VM: OpenJDK 64-Bit Server VM (25.151-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libawt_xawt.so+0x40fc9]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/hadim/PSFj/hs_err_pid1022.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
./psfj: line 24:  1022 Aborted                 (core dumped) java -XX:+UseParallelGC -Xms1000M -Xmx${HEAPSIZE}M -jar "$APP_HOME/PSFj.jar"

Here is the dump :
hs_err_pid32212.log

I am running the last Ubuntu 17.10.

Cannot run PSFj on Windows

Hi, I am trying to run PSFj on windows 10 64-bit machine without success. I downloaded the psfj_2.5_build_245.zip file and extracted the psfj folder. I could launch the GUI using the psfj.exe but when I click on 'Add image stack' nothing happens. I tried dragging and dropping a test file but that's about how far I could get. I cannot click on Next as it is all greyed out.

I tried to install it in FIJI as per instructions in another issue and it runs without any issues as a FIJI plugin. I am at a loss now why the standalone tool does not work. Maybe something to do with java?

Any pointers will be highly appreciated! Thank you.

Trying to run PSFj from command line

Hello, I started running jar files from the command line recently so I'm wondering if I did something wrong here.
The parameters are provided in the .ini file. And example.tif is just a Z stack with 1 channel.
I would like to run it without the GUI if possible.

java -jar psfj.jar -i "example.tif" -c "example.ini" -d -o "results.csv"
-i
example.tif
-c
example.ini
-d
-o
results.csv
example.ini
Loading example.tif...
java.lang.NullPointerException
        at knop.psfj.BeadImage.setImageFolder(BeadImage.java:474)
        at knop.psfj.BeadImage.setFileAddress(BeadImage.java:801)
        at knop.psfj.BeadImage.<init>(BeadImage.java:346)
        at PSFj.main(PSFj.java:124)

I tried to follow the flags described in the --help command.

--help
usage: psfj
 -2c,--dual-channel <arg>          multichannel analysis with the
                                   specified file (INI file mandatory)
 -3d,--3-dimensional               use 3D Object detection algorithm for
                                   bead detection
 -a,--all                          exports all above
 -c,--calibration <arg>            calibration file .ini (optional) : if a
                                   file contains the same name as the
                                   image with the .ini extension, it will
                                   be loaded as the image calibration file
 -d,--csv                          exports data as csv
 -f,--fill-report <arg>            compile informations in a file in the
                                   export folder
 -g,--generate-calibration <arg>   generates a typical calibration file
 -h,--help                         displays help
 -i,--input <arg>                  input file
 -m,--heatmap                      exports heatmap
 -o,--output <arg>                 output directory (optional)  : if not
                                   specified,
 -r,--bead-report                  exports bead PSF Reports
 -s,--sum-up                       exports PDF Summary
 -v,--version                      displays PSFj version
 -w,--bead-frame <arg>             bead frame of with a size of N times
                                   the expected FWHM

Thank you

PSFj not loading Metamorph's tiff properly

I have an image stack taken in Molecular Device's Metamorph and the images are not being rendered properly and I suspect that it's leading to improper calculations.

When I drag and drop the tiff file to load it, two items appear on the list of stacks.
When I look through the stack to find the focus, the planes don't correspond at all.
Here's an example of a stack that has this issue, link

The image opens just fine in imageJ and metamorph.

I also tried saving the image from ImageJ and it still prodcued the same error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.