Commit 648388f6 authored by gonciarz's avatar gonciarz

Merge branch 'develop'

parents 169cf7d4 cb890eac
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
/target/
.idea/
.settings/
.project
.pydevproject
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="MosaicSuite" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MosaicSuite</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
</pydev_project>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=enabled
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.8
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
======================
Background Subtraction
======================
To process images acquired using light microscopy systems, it is often useful to correct
for inconstant background illumination and artifacts from autofluorescence.
This software removes nonlinear background. The implemented algorithm is based on the
assumption that, compared to the background region, object (foreground) regions are small.
The plugin builds local histograms and assumes the most occuring intensity to be part of
the background. The plugin is is an alternative to deletion of low frequencies in
Fourier space or the rolling ball algorithm (ImageJ standard implementation) proposed
by S.Steinberg (1983).
.. figure:: resources/backgroundSubtraction/bg.png
:scale: 75 %
:align: center
Background Subtraction in action
Algorithm Description
=====================
For better algorithm understanding please refer to `Histogram-based background subtractor forImageJ <http://mosaic.mpi-cbg.de/Downloads/BGS_manual.pdf>`_ document.
================
Changelog
================
* 1.0.19
- Discrete region sampling (DRS) is finally available in official release
* 1.0.18
- not supported anymore package ``javaml`` is not used in MosaicSuite anymore
* 1.0.17
- Results table in Region Competition is shown only in GUI or Macro mode (hidden in batch mode)
- Not mavenized external jars are now embedded in MosaicSuite repository
.. important::
For information about previous developments not listed here please refere to `old MosaicSuite site <http://mosaic.mpi-cbg.de/?q=downloads/imageJ>`_.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'MosaicSuite'
copyright = '2020, MOSAIC Group, Sbalzarini Lab, mosaic.mpi-cbg.de'
author = 'MOSAIC Group, Sbalzarini Lab'
# The full version, including alpha/beta/rc tags
release = '1.0.19'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['recommonmark',
'sphinx_rtd_theme']
source_suffix = ['.rst', '.md']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
#html_theme = 'alabaster'
html_theme = "sphinx_rtd_theme"
html_theme_options = {
'navigation_depth': 6
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# s
# Change the order of searching img files
# Thanks to that html will prefere (animated) gifs over png that are used
# in latexpdf target (without that change png was on the first place).
from sphinx.builders.html import StandaloneHTMLBuilder
StandaloneHTMLBuilder. supported_image_types = [
'image/svg+xml',
'image/gif',
'image/png',
'image/jpeg'
]
# It will change alignemnt so images and text are always in order as it is in source
# doc files. Without it sometimes figures are moved to next page if not fitting in current.
latex_elements = {
#Figure placement within LaTeX paper
'figure_align': 'H'
}
================================
Convolve with 2D Bessel function
================================
This ImageJ plugin convolves 2D images or movies (image stacks) with a 2D Bessel
point spread function (PSF).
Algorithm Description and Manual
================================
For better algorithm understanding please refer to `PDF <https://mosaic.mpi-cbg.de/Downloads/BesselPSFConvolver_manual.pdf>`__.
.. _mosaicsuite-development:
=======================
Development
=======================
Source code
===========
MosaicSuite code can be found on public `MOSAIC git server <https://git.mpi-cbg.de/mosaic/MosaicSuite/tree/master>`__.
Code can be downloaded by following git command:
.. code:: bash
git clone https://git.mpi-cbg.de/mosaic/MosaicSuite.git
If you'd like to contribute bug fixes or new functions to any of the plugins, or are interested in using the source code in your own projects, please make sure to first download the latest version. The code is constantly evolving. If you think your additions could be useful also for other users, please send them to us and we will include them in future releases. Your contributions are highly appreciated!
How to build
============
To build MosaicSuite package you need Java in version at least 1.8 and maven.
To start build run in root directory of your cloned MosaicSuite following command:
.. code:: bash
mvn package -Dmaven.test.skip=true
After successful build in ``target`` directory there will be two jars:
- MosaicSuite-1.0.19.jar
- MosaicSuite-1.0.19_Full.jar
The second one is a MosaicSuite bundled with all needed dependencies. Version of MosaicSuite is set
accoriding to number in main ``pom.xml`` of a project.
How to install
==============
To use MosaicSuite in Fiji/Imagej application it is enough to copy built ``MosaicSuite<version>_Full.jar`` to ``plugins``
directory in root installation directory of your Fiji/ImageJ.
Sometimes in development it would be convenient to copy output jar file automatically. It might be achieved by
setting environment variable with path to ``plugins`` directory of your Fiji/ImageJ application:
.. code:: bash
export FIJI_MOSAIC_PLUGIN_PATH=/full/path/to/your/Fiji.app/plugins/Mosaic_ToolSuite
and then uncommenting following part of main ``pom.xml``:
.. code:: java
<!-- <plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${env.FIJI_MOSAIC_PLUGIN_PATH}</outputDirectory>
<resources>
<resource>
<directory>target</directory>
<includes>
<include>${project.artifactId}-${project.version}_Full.jar</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin> -->
With these modifications every time when ``mvn package`` command is executed, output jar is automatically copied to Fiji/Imagej app.
How to test
===========
One of the best way to develop and test code is to use IDE (like Eclipse, IntelliJ,...). Please refer to documentation
of IDE of your choice to find out how to import maven project and run tests.
Nevertheless very often one might need to run test(s) using command line only and for that information please refer to next chapters of documentation.
Running all tests
-----------------
To run all tests in MosaicSuite run:
.. code:: bash
mvn test
.. note ::
| Some of the test require special infrastructure (tests that verify "run on cluster" functionality).
| If you do not have such access run all tests and ignore errors coming from test*Cluster, SshTest tests.
Running single test suite
-------------------------
Running single test suite:
.. code:: bash
mvn test -Dtest=MatrixTest
Running single test within test suite
-------------------------------------
Running single test within a given test suite:
.. code:: bash
mvn test -Dtest=CSVTest#testWriteAppend
\ No newline at end of file
==============================
Discrete Region Sampling (DRS)
==============================
Discrete Region Sampling is a sampling version of well known Region Competition algorithm. It can be found in menu ``Segmentation > Discrete Region Sampling``.
.. figure:: resources/discreteRegionSampling/drs.png
:scale: 75 %
:align: center
Discrete Region Sampling (DRS) in action
Tutorial
========
Options shared with Region Competition
--------------------------------------
Most of parameters regarding initialization, geometric constrains (fussion, fission, handles) and energies are same as in Region Competition plugin. For their
description please refere to :ref:`regionCompetition-energy-parameters`.
Options specific for DRS
------------------------
- **Number of iterations**
Number of iteration (sampling steps) to be performed. Test run of algorithm can be done with quite
small number of steps few hundred/thousand but for final run depending on size of a image it should be set to hundred thousands or even millions.
- **burn-in factor**
Fraction of all iterations called **burn-in** phase during which off-boundary probability helps to explore state space.
After **burn-in** phase off-boundary probability reduce to 0.
- off-boundary probability**
sets the off-boundary sampling probability
- **pair proposal**
enable mode in which each move corresponds to neighboring pair of particles
- **biased proposal**
enables biased-proposal mode in which in order to propose smoothed shapes
For detail explanation of these parameters please refere to `PHD thesis <http://mosaic.mpi-cbg.de/docs/Cardinale2013.pdf>`__ desribing theory behind DRS.
Developer Resources
===================
Source code and helpful information about MosaicSuite development can be found in :ref:`mosaicsuite-development` section.
Citation
========
.. admonition:: Citation
| *J. Cardinale*
| Unsupervised Segmentation and Shape Posterior Estimation under Bayesian Image Models. PhD thesis, Diss. ETH No. 21026, MOSAIC Group, ETH Zurich, 2013.
| `PDF <http://mosaic.mpi-cbg.de/docs/Cardinale2013.pdf>`__
*In order to ensure financial support for our project and allow further development of
this software, please cite above publications in all your documents and manuscripts that
made use of this software. Thanks a lot!*
.. MosaicSuite documentation master file
MosaicSuite documentation
=========================
.. note ::
| This documentation is under development. Some parts might be not valid or incomplete.
| In a mean time please refere to `old MosaicSuite documentation <http://mosaic.mpi-cbg.de/MosaicToolboxSuite/MosaicToolsuiteTutorials.html>`__.
**MosaicSuite** is a plugin for popular image processing software *ImageJ2* and *Fiji*.
It provides image-processing algorithms developed at the `MOSAIC group <https://mosaic.mpi-cbg.de>`_.
The first plugin which is now part of MosaicSuite was a popular 2D/3D single-particle tracking tool which can be used to track bright spots in 2D/3D movies over time. As more plugins have been added, we decided to provide them in a single, coherent package, which will also group them under a common menu point ``Plugins->Mosaic`` in ImageJ2 and Fiji.