# License: BSD, see the LICENSE.txt file coming with the script
# 2016-12-13 : version 1.2, correct measures of the background intensity and add measure of the bacground standard deviation, info are added to the script info
# 2017-02-28 : version 1.2, shift the window to create the mask 1 timestep earlier
# 2017-04-10 : version 1.2.1, remove nChannel parameter, (if necessary use bioformat to open the image correctly before starting the analysis)
fromijimportIJ
fromij.ioimportRoiDecoder
fromij.pluginimportZProjector
fromij.pluginimportDuplicator
fromij.pluginimportImageCalculator
fromij.plugin.frameimportRoiManager
fromij.guiimportOverlay
fromij.pluginimportHyperStackConverter
fromij.plugin.filterimportParticleAnalyzerasPA
fromij.guiimportWand
fromij.processimportFloodFiller
fromij.guiimportPolygonRoi
fromij.guiimportShapeRoi
fromij.guiimportRoi
fromijimportImagePlus
fromij.plugin.filterimportThresholdToSelection
fromij.processimportImageProcessor
fromjava.awtimportColor
# load illumination region roi: roi_illum (blue)
# create image that will be segmented: impToSeg
# create a cell mask: roi_Cells (cyan)
# create positive mask in cells: roi_postive (red)
# and negative mask in cells: can be detected from the other region
###############################################
# reshape the image sequence if necessary #####
imp0.hide()
dims=imp0.getDimensions()
ifdims[4]==1:#if only one time step exchange t and z
Copyright 2017 Max Planck Institute of Molecular Cell Biology and Genetics, Dresden, Germany
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1 -
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2 - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3 - Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.