Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

FLIMLib: a package for exponential curve fitting of fluorescence lifetime image data

License

NotificationsYou must be signed in to change notification settings

flimlib/flimlib

Repository files navigation

FLIMLib is a curve fitting library used for Fluorescent Lifetime Imaging orFLIM. It is developed by Paul Barber (UCL and KCL, London) and the Advanced Technology Group at theOxford Institute for Radiation Oncology,University of Oxford, as well as theLaboratory for Optical and ComputationalInstrumentation at the University ofWisconsin-Madison. FLIMLib is used for FLIM functionality in theTime ResolvedImaging (TRI2) software, as wellas in theFLIMJ plugin for ImageJ.

For exponential lifetime fitting there are three core algorithms within FLIMLib:

  1. A triple integral method that does a very fast estimate of a singleexponential lifetime component.
  2. A Levenberg-Marquardt algorithm or LMA that uses an iterative,least-squares-minimization approach to generate a fit. This works withsingle, double and triple exponential models, as well as stretchedexponential.
  3. A Bayesian algorithm that combines evidence from each single photon toestimate lifetimes etc. It offers better performance with low photon counts.

There is also code to perform 'global' analysis over a number of signalssimultaneously (e.g. over an image), where the lifetimes can be consideredconstant across the data set, but the amplitudes are allowed to vary for eachsignal. There is also a completely generic global analysis function. A thirdalgorithm is available to perform phasor analysis.

In addition there is a non-negative linear least squares algorithm that isuseful for spectral unmixing in combined spectral-lifetime imaging (SLIM).

The FLIMLib library code is written in C89 compatible C and is thread-safe forfitting multiple pixels concurrently. A Java interface (generated bySWIG is privided to call the library from Javacode:FLIMLib.java provide a subset of function calls used by the FLIMJplugin for ImageJ.

Additionally, there is wrapper code inFLIMLib.i to wrap the externalfunctions inflimlib.def. This code generates swig wrapper files which enableyou to call these functions from Java.

See also

Directory contents

DirectoryContents
src/main/cThe source files for the FLIMLib library
src/main/cppThe C++ include file for a FLIMLib class for use in C++ projects
target/generated-sources/mainThe Java API and C++ wrapper generated by SWIG
src/main/javaThe rest of the Java API source files
src/main/pythonThe Python API source files (ctypes-based)
src/main/swigThe SWIG sources that directs Java API generation
src/flimlib-cmd/cThe source files for the standalone executable wrapper for the library
src/flimlib-cmd/cppThe source files for the standalone executable written in C++
src/matlabWrapper and example code for use of the library with Matlab
test_files.dat and.ini settings file for testing
target/nativesCompiled library binary

Building the source (C++/Java)

You need JDK, Maven, CMake, SWIG, and C and C++ toolchains (GCC on Linux,Command Line Tools or Xcode on macOS, Visual Studio (with C++ DesktopDevelopment) on Windows) to be installed.

To build the library and standalone program using maven:

mvn clean install

Running the standalone executable

  1. Copy the executable to thetest_files folder for convenience

    cp target/build/bin/flimlib-cmd ./test_files
  2. Run the program with the test files

    cd ./test_files./flimlib-cmd test.ini transient.dat

Using from a Java project

To depend on FLIMLib from Maven, simply copy the following to appropriate places in yourpom.xml:

<properties>  <flimlib.version>2.1.0</flimlib.version></properties><!-- FLIMLib Java interface--><dependency>  <groupId>flimlib</groupId>  <artifactId>flimlib</artifactId>  <version>${flimlib.version}</version></dependency><!-- FLIMLib native binary--><dependency>  <groupId>flimlib</groupId>  <artifactId>flimlib</artifactId>  <version>${flimlib.version}</version>  <classifier>${scijava.natives.classifier}</classifier><!-- Or one of the following if you would like to manually specify the binary platform--><!-- <classifier>native-linux_64</classifier>--><!-- <classifier>native-windows_64</classifier>--><!-- <classifier>native-osx_64</classifier>--></dependency>

Note that the native binary is platform-dependent. So you may want to make sure that the<classifier> attribute is either automatically detected by the parentscijava pom (${scijava.natives.classifier}) or manually filled in to match your platform.

Using from Python

The Python API is a ctypes-based wrapper around a few of the library functions.

pip install flimlib
importflimlib

To get started, see the help (docstrings) for these functions:

  • flimlib.GCI_marquardt_fitting_engine() (Levenberg-Marquardt)
  • flimlib.GCI_triple_integral_fitting_engine() (RLD: rapid lifetimedetermination)
  • flimlib.GCI_Phasor() (phasor analysis)

About

FLIMLib: a package for exponential curve fitting of fluorescence lifetime image data

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp