<protocol VERSION="4">
<blocks>
<block CommandLineID="" ID="8596055" blockType="plugins.adufour.blocks.tools.input.Sequence" className="plugins.adufour.blocks.tools.input.Sequence" collapsed="false" definedName="Sequence" height="61" keepsResults="true" width="162" xLocation="17" yLocation="20">
<variables>
<input>
<variable ID="input sequence" name="sequence" runtime="false" value="Active Sequence" visible="false"/>
</input>
<output/>
</variables>
</block>
<block ID="718833676" blockType="plugins.fab.waveletspotdetectorblock.WaveletSpotDetectorBlock" className="plugins.fab.waveletspotdetectorblock.WaveletSpotDetectorBlock" collapsed="false" definedName="Wavelet Spot Detector Block" height="434" keepsResults="true" width="366" xLocation="201" yLocation="3">
<variables>
<input>
<variable ID="input Sequence" name="input Sequence" runtime="false" visible="false"/>
<variable ID="Spot to detect" name="Spot to detect" runtime="false" value="BRIGHT_SPOT" visible="false"/>
<variable ID="input Sequence ROIs" name="ROIs from sequence for WAT" runtime="false" value="No Sequence" visible="false"/>
<variable ID="Compute WAT considering ROI" name="Compute WAT considering ROI" runtime="false" value="false" visible="false"/>
<variable ID="ROIs for detection mask" name="ROIs for detection mask" runtime="false" value="No ROI" visible="true"/>
<variable ID="Scale 1" name="Scale 1" runtime="false" value="false" visible="false"/>
<variable ID="Scale 2" name="Scale 2" runtime="false" value="true" visible="false"/>
<variable ID="Scale 3" name="Scale 3" runtime="false" value="true" visible="false"/>
<variable ID="Scale 4" name="Scale 4" runtime="false" value="false" visible="false"/>
<variable ID="Scale 5" name="Scale 5" runtime="false" value="false" visible="false"/>
<variable ID="Th. scale 1:" name="Th. scale 1:" runtime="false" value="100" visible="false"/>
<variable ID="Th. scale 2:" name="Th. scale 2:" runtime="false" value="20" visible="false"/>
<variable ID="Th. scale 3:" name="Th. scale 3:" runtime="false" value="50" visible="false"/>
<variable ID="Th. scale 4:" name="Th. scale 4:" runtime="false" value="100" visible="false"/>
<variable ID="Th. scale 5:" name="Th. scale 5:" runtime="false" value="100" visible="false"/>
<variable ID="Force 2D Wavelets" name="Force 2D Wavelets" runtime="false" value="false" visible="true"/>
</input>
<output>
<variable ID="binary Spot Sequence" name="binary Spot Sequence" runtime="false" visible="false"/>
<variable ID="detection as ROIs" name="detection as ROIs" runtime="false" visible="true"/>
</output>
</variables>
</block>
<block CommandLineID="" ID="1180058056" blockType="plugins.adufour.blocks.tools.input.Decimal" className="plugins.adufour.blocks.tools.input.Decimal" collapsed="false" definedName="Z crop (px)" height="64" keepsResults="true" width="185" xLocation="10" yLocation="567">
<variables>
<input>
<variable ID="decimal" name="decimal" runtime="false" value="50.0" visible="true"/>
</input>
<output/>
</variables>
</block>
<block CommandLineID="" ID="2000600680" blockType="plugins.adufour.blocks.tools.input.Decimal" className="plugins.adufour.blocks.tools.input.Decimal" collapsed="false" definedName="X/Y crop (px)" height="65" keepsResults="true" width="184" xLocation="8" yLocation="460">
<variables>
<input>
<variable ID="decimal" name="decimal" runtime="false" value="20.0" visible="true"/>
</input>
<output/>
</variables>
</block>
<block ID="113209655" blockType="plugins.adufour.metrolospim.GetROIMassCenter" className="plugins.adufour.metrolospim.GetROIMassCenter" collapsed="false" definedName="Get ROI mass center" height="127" keepsResults="true" width="229" xLocation="601" yLocation="59">
<variables>
<input>
<variable ID="inputROI" name="List of ROI" runtime="false" visible="false"/>
</input>
<output>
<variable ID="center (X)" name="Centers (X)" runtime="false" visible="false"/>
<variable ID="center (Y)" name="Centers (Y)" runtime="false" visible="false"/>
<variable ID="center (Z)" name="Centers (Z)" runtime="false" visible="false"/>
</output>
</variables>
</block>
<block ID="755270273" blockType="plugins.ylemontag.mathoperations.MathOperationExpressionBlock" className="plugins.ylemontag.mathoperations.MathOperationPlugin" collapsed="false" definedName="Math operation expression" height="107" keepsResults="true" width="251" xLocation="229" yLocation="436">
<variables>
<input>
<variable ID="Operation" name="" runtime="false" value="a/2" visible="true"/>
<variable ID="dyn-a" name="a" runtime="true" type="double" visible="true"/>
</input>
<output>
<variable ID="Out" name="result" runtime="false" type="java.lang.Double" visible="true"/>
</output>
</variables>
</block>
<block ID="987771557" blockType="plugins.ylemontag.mathoperations.MathOperationExpressionBlock" className="plugins.ylemontag.mathoperations.MathOperationPlugin" collapsed="false" definedName="Math operation expression" height="107" keepsResults="true" width="251" xLocation="230" yLocation="543">
<variables>
<input>
<variable ID="Operation" name="" runtime="false" value="a/2" visible="true"/>
<variable ID="dyn-a" name="a" runtime="true" type="double" visible="true"/>
</input>
<output>
<variable ID="Out" name="result" runtime="false" type="java.lang.Double" visible="true"/>
</output>
</variables>
</block>
<block ID="575285617" blockType="plugins.adufour.metrolospim.Create3DRectangleROI" className="plugins.adufour.metrolospim.Create3DRectangleROI" collapsed="false" definedName="Create3 D rectangle ROI" height="211" keepsResults="true" width="258" xLocation="999" yLocation="75">
<variables>
<input>
<variable ID="center (X)" name="Centers (X)" runtime="false" visible="false"/>
<variable ID="center (Y)" name="Centers (Y)" runtime="false" visible="false"/>
<variable ID="center (Z)" name="Centers (Z)" runtime="false" visible="false"/>
<variable ID="sizes (X)" name="Width(s)" runtime="false" visible="false"/>
<variable ID="sizes (Y)" name="Height(s)" runtime="false" visible="false"/>
<variable ID="sizes (Z)" name="Depth(s)" runtime="false" visible="false"/>
</input>
<output>
<variable ID="List of ROI" name="List of ROI" runtime="false" visible="false"/>
</output>
</variables>
</block>
<block ID="373914139" blockType="plugins.adufour.blocks.tools.roi.CropSequenceToROI" className="plugins.adufour.blocks.tools.roi.CropSequenceToROI" collapsed="false" definedName="Crop sequence to ROI" height="105" keepsResults="true" width="247" xLocation="1130" yLocation="305">
<variables>
<input>
<variable ID="sequence to crop" name="Sequence to crop" runtime="false" visible="false"/>
<variable ID="list of ROI" name="List of ROI" runtime="false" visible="false"/>
</input>
<output>
<variable ID="list of crops" name="List of crops" runtime="false" visible="false"/>
</output>
</variables>
</block>
<block ID="2146738933" blockType="plugins.adufour.blocks.tools.roi.AddROIToSequence" className="plugins.adufour.blocks.tools.roi.AddROIToSequence" collapsed="false" definedName="Add ROI to sequence" height="107" keepsResults="true" width="233" xLocation="1436" yLocation="307">
<variables>
<input>
<variable ID="target sequence" name="Source" runtime="false" visible="false"/>
<variable ID="input rois" name="ROI to add" runtime="false" visible="false"/>
<variable ID="replace existing" name="Overwrite" runtime="false" value="true" visible="false"/>
</input>
<output/>
</variables>
</block>
<block CommandLineID="" ID="31910767" blockType="plugins.adufour.blocks.tools.input.File" className="plugins.adufour.blocks.tools.input.File" collapsed="false" definedName="File" height="61" keepsResults="true" width="185" xLocation="11" yLocation="774">
<variables>
<input>
<variable ID="file" name="file" runtime="false" value="C:\Users\Marion\Documents\Meetings\2020-06-03_Meeting_add_protocols_to_website\Results\P3_modified_results\test" visible="false"/>
</input>
<output/>
</variables>
</block>
<block CommandLineID="" ID="1970073602" blockType="plugins.adufour.blocks.tools.input.Decimal" className="plugins.adufour.blocks.tools.input.Decimal" collapsed="false" definedName="X/Y res. (um)" height="64" keepsResults="true" width="184" xLocation="9" yLocation="639">
<variables>
<input>
<variable ID="decimal" name="decimal" runtime="false" value="0.26" visible="true"/>
</input>
<output/>
</variables>
</block>
<block CommandLineID="" ID="687153073" blockType="plugins.adufour.blocks.tools.input.Decimal" className="plugins.adufour.blocks.tools.input.Decimal" collapsed="false" definedName="Z res. (um)" height="64" keepsResults="true" width="185" xLocation="8" yLocation="706">
<variables>
<input>
<variable ID="decimal" name="decimal" runtime="false" value="1.0" visible="true"/>
</input>
<output/>
</variables>
</block>
<workflow ID="534381353" blockType="plugins.adufour.blocks.lang.ArrayLoop" className="plugins.adufour.blocks.lang.ArrayLoop" collapsed="false" definedName="Array loop" height="857" keepsResults="true" width="1062" xLocation="922" yLocation="537">
<blocks>
<block ID="701897922" blockType="plugins.adufour.metrolospim.OrthogonalRotation" className="plugins.adufour.metrolospim.OrthogonalRotation" collapsed="true" definedName="Rotate (Z to X)" height="105" keepsResults="true" width="232" xLocation="653" yLocation="0">
<variables>
<input>
<variable ID="input sequence" name="Sequence" runtime="false" visible="false"/>
<variable ID="orientation" name="Orienation" runtime="false" value="Z_becomes_X" visible="false"/>
</input>
<output>
<variable ID="output sequence" name="Rotated sequence" runtime="false" visible="false"/>
</output>
</variables>
</block>
<block ID="1776038459" blockType="plugins.tprovoost.sequenceblocks.extract.ExtractSlice" className="plugins.tprovoost.sequenceblocks.SequenceBlocks" collapsed="true" definedName="Extract equator" height="108" keepsResults="true" width="225" xLocation="354" yLocation="36">
<variables>
<input>
<variable ID="sequence" name="Sequence" runtime="false" visible="false"/>
<variable ID="Z pos" name="Z" runtime="false" visible="false"/>
</input>
<output>
<variable ID="extracted" name="Extracted" runtime="false" visible="false"/>
</output>
</variables>
</block>
<block ID="910557679" blockType="plugins.tprovoost.sequenceblocks.extract.ExtractSlice" className="plugins.tprovoost.sequenceblocks.SequenceBlocks" collapsed="true" definedName="Extract equator" height="108" keepsResults="true" width="225" xLocation="654" yLocation="51">
<variables>
<input>
<variable ID="sequence" name="Sequence" runtime="false" visible="false"/>
<variable ID="Z pos" name="Z" runtime="false" visible="false"/>
</input>
<output>
<variable ID="extracted" name="Extracted" runtime="false" visible="false"/>
</output>
</variables>
</block>
<block ID="1110903668" blockType="plugins.tprovoost.sequenceblocks.infos.SetName" className="plugins.tprovoost.sequenceblocks.SequenceBlocks" collapsed="true" definedName="Set name (z-y)" height="86" keepsResults="true" width="225" xLocation="655" yLocation="91">
<variables>
<input>
<variable ID="sequence" name="Sequence" runtime="false" visible="false"/>
<variable ID="name" name="Name" runtime="false" value="z-y" visible="false"/>
</input>
<output/>
</variables>
</block>
<block ID="1562769134" blockType="plugins.tprovoost.sequenceblocks.infos.SetName" className="plugins.tprovoost.sequenceblocks.SequenceBlocks" collapsed="true" definedName="Set name (x-y)" height="86" keepsResults="true" width="225" xLocation="356" yLocation="77">
<variables>
<input>
<variable ID="sequence" name="Sequence" runtime="false" visible="false"/>
<variable ID="name" name="Name" runtime="false" value="x-y" visible="false"/>
</input>
<output/>
</variables>
</block>
<block CommandLineID="" ID="270453463" blockType="plugins.adufour.blocks.tools.input.Decimal" className="plugins.adufour.blocks.tools.input.Decimal" collapsed="false" definedName="X/Y res. (um)" height="64" keepsResults="true" width="184" xLocation="72" yLocation="99">
<variables>
<input>
<variable ID="decimal" name="decimal" runtime="false" visible="true"/>
</input>
<output/>
</variables>
</block>
<block CommandLineID="" ID="2036907554" blockType="plugins.adufour.blocks.tools.input.Decimal" className="plugins.adufour.blocks.tools.input.Decimal" collapsed="false" definedName="Z res. (um)" height="64" keepsResults="true" width="184" xLocation="71" yLocation="202">
<variables>
<input>
<variable ID="decimal" name="decimal" runtime="false" visible="true"/>
</input>
<output/>
</variables>
</block>
<block ID="1323167894" blockType="plugins.tprovoost.sequenceblocks.infos.SetResolution" className="plugins.tprovoost.sequenceblocks.SequenceBlocks" collapsed="false" definedName="Set resolution" height="161" keepsResults="true" width="250" xLocation="357" yLocation="131">
<variables>
<input>
<variable ID="sequence" name="Sequence" runtime="false" visible="false"/>
<variable ID="PxSize X (µm)" name="Pixel Size X (µm)" runtime="false" visible="false"/>
<variable ID="PxSize Y (µm)" name="Pixel Size Y (µm)" runtime="false" visible="false"/>
<variable ID="PxSize Z (µm)" name="Pixel Size Z (µm)" runtime="false" visible="false"/>
<variable ID="Time interval T (s)" name="Time interval T (s)" runtime="false" value="100.0" visible="false"/>
</input>
<output/>
</variables>
</block>
<block ID="1300221236" blockType="plugins.tprovoost.sequenceblocks.infos.SetResolution" className="plugins.tprovoost.sequenceblocks.SequenceBlocks" collapsed="false" definedName="Set resolution" height="161" keepsResults="true" width="250" xLocation="655" yLocation="131">
<variables>
<input>
<variable ID="sequence" name="Sequence" runtime="false" visible="false"/>
<variable ID="PxSize X (µm)" name="Pixel Size X (µm)" runtime="false" visible="false"/>
<variable ID="PxSize Y (µm)" name="Pixel Size Y (µm)" runtime="false" visible="false"/>
<variable ID="PxSize Z (µm)" name="Pixel Size Z (µm)" runtime="false" visible="false"/>
<variable ID="Time interval T (s)" name="Time interval T (s)" runtime="false" value="100.0" visible="false"/>
</input>
<output/>
</variables>
</block>
<block ID="1012185493" blockType="plugins.adufour.blocks.tools.Indexer" className="plugins.adufour.blocks.tools.Indexer" collapsed="false" definedName="X center (px)" height="108" keepsResults="true" width="183" xLocation="135" yLocation="366">
<variables>
<input>
<variable ID="array" name="array" runtime="false" type="[D" visible="false"/>
<variable ID="index" name="index" runtime="false" visible="false"/>
</input>
<output>
<variable ID="element" name="element" runtime="false" type="double" visible="false"/>
</output>
</variables>
</block>
<block ID="98775575" blockType="plugins.adufour.blocks.tools.Indexer" className="plugins.adufour.blocks.tools.Indexer" collapsed="false" definedName="Y center (px)" height="108" keepsResults="true" width="180" xLocation="124" yLocation="490">
<variables>
<input>
<variable ID="array" name="array" runtime="false" type="[D" visible="false"/>
<variable ID="index" name="index" runtime="false" visible="false"/>
</input>
<output>
<variable ID="element" name="element" runtime="false" type="double" visible="false"/>
</output>
</variables>
</block>
<block ID="789883692" blockType="plugins.adufour.blocks.tools.Indexer" className="plugins.adufour.blocks.tools.Indexer" collapsed="false" definedName="Z center (px)" height="108" keepsResults="true" width="180" xLocation="111" yLocation="605">
<variables>
<input>
<variable ID="array" name="array" runtime="false" type="[D" visible="false"/>
<variable ID="index" name="index" runtime="false" visible="false"/>
</input>
<output>
<variable ID="element" name="element" runtime="false" type="double" visible="false"/>
</output>
</variables>
</block>
<block ID="1230719918" blockType="plugins.tprovoost.scripteditor.scriptblock.Javascript" className="plugins.tprovoost.scripteditor.scriptblock.Javascript" collapsed="false" definedName="Javascript" height="493" keepsResults="true" width="586" xLocation="414" yLocation="309">
<variables>
<input>
<variable ID="Script" name="" runtime="false" value="importClass(Packages.icy.type.collection.array.Array1DUtil)&#10;importClass(Packages.plugins.adufour.metrolospim.ROI2DLineProfile)&#10;importClass(Packages.java.awt.geom.Point2D)&#10;importClass(Packages.ij.measure.CurveFitter)&#10;importClass(Packages.java.io.FileWriter)&#10;&#10;// input0 must be the &quot;XY&quot; sequence&#10;// input1 must be the &quot;ZY&quot; sequence&#10;&#9;fw= FileWriter(input2, true)&#10;&#9;//function to get the FWHM of the 2 l lides x-y and z-y of a &#10;&#9;//3D psf of a system the size od the window should be about 4 times&#10;&#9;//the theoretical size of the psf in each direction&#10;&#9;RodbardEquation = &quot;y = a + (b-a)*exp(-(x-c)*(x-c)/(2*d*d))&quot;; //fit Eq&#10;&#9;result=[]&#10;     &#9;pw = input0.getPixelSizeX()&#10;     &#9;ph = input0.getPixelSizeY()&#10;&#9;width = input0.getWidth()&#10;&#9;height = input0.getHeight()&#10;&#10;&#9;b = input0.getData(0, 0, 0, height/2, width/2) //get the max value in the center of the window&#10;&#9;a = input0.getData(0, 0, 0, 0, 0) //suppose this as minimum or close to for init values&#10;&#10;&#9;//X dimension&#10;     &#10;&#9;//plot profile of the center of the image where the max is&#10; &#9;p1 = new Point2D.Double(0, height/2)&#10;&#9;p2 = new Point2D.Double(width, height/2)&#10;&#9;yVal = ROI2DLineProfile.getSegmentProfile(p1, p2, input0.getImage(0, 0))[0]&#10;&#9;xVal = []&#10;&#9;//xVal = new double[profile.length]&#10;&#9;for(i=0;i&lt;yVal.length;i++) xVal[i] = i&#10;&#10;     //init fitting values: &#10;     //offset a = min; maximum b = max; center c = center of the image or x/2;  &#10;     //size = d 0.39894 * (xMax-xMin) * (yMean-yMin)/(yMax-yMin+1e-100)    &#10;  &#9;res_lat = 0.39894 * (width) * 0.5&#10;  &#9;initialGuesses = [a, b, width/2, res_lat]&#10;&#9;cv = new CurveFitter(xVal, yVal)&#10;&#9;cv.doCustomFit(RodbardEquation, initialGuesses, false) //fit x&#10;&#9;p = cv.getParams()&#10;     &#9;d = Math.abs(p[3])&#10;     &#9;result[0] = d * 2 * Math.sqrt(2 * Math.log(2)) * pw //determine the FWHM form original units&#10;     &#10;     //Y dimension (same procedure as before)&#10;     &#10;&#9;//plot profile of the center of the image where the max is&#10; &#9;p1 = new Point2D.Double(width/2, 0)&#10;&#9;p2 = new Point2D.Double(width/2, height)&#10;&#9;yVal = ROI2DLineProfile.getSegmentProfile(p1, p2, input0.getImage(0, 0))[0]&#10;&#9;xVal = []&#10;&#9;for(i=0;i&lt;yVal.length;i++) xVal[i] = i&#10;&#10;     &#9;res_lat=0.39894 * (height) * 0.5;&#10;     &#9;initialGuesses = [a, b , height/2 , res_lat]&#10;&#9;cv = new CurveFitter(xVal, yVal)&#10;&#9;cv.doCustomFit(RodbardEquation, initialGuesses, false) //fit y&#10;&#9;p = cv.getParams()&#10;     &#9;d = Math.abs(p[3])&#10;     &#9;result[1]= d * 2 * Math.sqrt(2 * Math.log(2)) * ph&#10;&#10;     //Z dimension&#10;&#10;&#9;pd = input1.getPixelSizeX()&#10;     &#9;ph = input1.getPixelSizeY()&#10;&#9;slices = input1.getWidth()&#10;&#9;width = input1.getHeight()&#10;&#10;&#9;//plot profile of the center of the image where the max is&#10; &#9;p1 = new Point2D.Double(0, width/2)&#10;&#9;p2 = new Point2D.Double(slices, width/2)&#10;&#9;yVal = ROI2DLineProfile.getSegmentProfile(p1, p2, input1.getImage(0, 0))[0]&#10;&#9;xVal = []&#10;&#9;for(i=0;i&lt;yVal.length;i++) xVal[i] = i&#10;&#9;&#10;&#9;b = input1.getData(0, 0, 0, width/2, slices/2 ) //get the max value in the center of the window&#10;&#9;a = input1.getData(0, 0, 0, 0, 0) //suppose this as minimum or close to for init values&#10;   &#10;     &#10;&#9;res_lat=0.39894 * (slices) * 0.5&#10;&#9;initialGuesses = [a, b, slices/2, res_lat]&#10;&#9;cv = new CurveFitter(xVal, yVal)&#10;&#9;cv.doCustomFit(RodbardEquation, initialGuesses, false) //fit z&#10;&#9;p = cv.getParams()&#10;     &#9;d = Math.abs(p[3])&#10;&#9;result[2] = d * 2 * Math.sqrt(2 * Math.log(2)) * pd&#10;&#10;&#9;fw.write(input3+ &quot;\t&quot;+input4+ &quot;\t&quot;+input5+ &quot;\t&quot;+result[0] + &quot;\t&quot; + result[1] + &quot;\t&quot; + result[2] + &quot;\n&quot;)&#10;&#9;fw.close()&#10;     &#9;output0 = result" visible="false"/>
<variable ID="Add Input" name="Add Input" runtime="false" value="5" visible="false"/>
<variable ID="Add output" name="Add Output" runtime="false" value="2" visible="false"/>
<variable ID="input0" name="input0" runtime="false" type="icy.sequence.Sequence" visible="false"/>
<variable ID="1273378821" name="input1" runtime="true" type="icy.sequence.Sequence" visible="false"/>
<variable ID="1789302932" name="input2" runtime="true" type="java.io.File" visible="false"/>
<variable ID="1497485173" name="input3" runtime="true" type="double" visible="false"/>
<variable ID="1255342396" name="input4" runtime="true" type="double" visible="false"/>
<variable ID="2105341113" name="input5" runtime="true" type="double" visible="false"/>
</input>
<output>
<variable ID="output0" name="output0" runtime="false" type="[D" visible="false"/>
<variable ID="1456157377" name="output1" runtime="true" type="[D" visible="false"/>
<variable ID="761076249" name="output2" runtime="true" type="[D" visible="false"/>
</output>
</variables>
</block>
</blocks>
<links>
<link dstBlockID="701897922" dstVarID="input sequence" srcBlockID="534381353" srcVarID="element" srcVarType="icy.sequence.Sequence"/>
<link dstBlockID="1012185493" dstVarID="index" srcBlockID="534381353" srcVarID="iteration"/>
<link dstBlockID="1776038459" dstVarID="sequence" srcBlockID="534381353" srcVarID="element" srcVarType="icy.sequence.Sequence"/>
<link dstBlockID="910557679" dstVarID="sequence" srcBlockID="701897922" srcVarID="output sequence"/>
<link dstBlockID="1562769134" dstVarID="sequence" srcBlockID="1776038459" srcVarID="extracted"/>
<link dstBlockID="1110903668" dstVarID="sequence" srcBlockID="910557679" srcVarID="extracted"/>
<link dstBlockID="1300221236" dstVarID="sequence" srcBlockID="1110903668" srcVarID="sequence"/>
<link dstBlockID="1323167894" dstVarID="sequence" srcBlockID="1562769134" srcVarID="sequence"/>
<link dstBlockID="1323167894" dstVarID="PxSize X (µm)" srcBlockID="270453463" srcVarID="decimal"/>
<link dstBlockID="1323167894" dstVarID="PxSize Y (µm)" srcBlockID="270453463" srcVarID="decimal"/>
<link dstBlockID="1323167894" dstVarID="PxSize Z (µm)" srcBlockID="2036907554" srcVarID="decimal"/>
<link dstBlockID="1230719918" dstVarID="input0" srcBlockID="1323167894" srcVarID="sequence"/>
<link dstBlockID="1300221236" dstVarID="PxSize X (µm)" srcBlockID="1323167894" srcVarID="PxSize X (µm)"/>
<link dstBlockID="1300221236" dstVarID="PxSize Y (µm)" srcBlockID="1323167894" srcVarID="PxSize Y (µm)"/>
<link dstBlockID="1300221236" dstVarID="PxSize Z (µm)" srcBlockID="1323167894" srcVarID="PxSize Z (µm)"/>
<link dstBlockID="1230719918" dstVarID="1273378821" srcBlockID="1300221236" srcVarID="sequence"/>
<link dstBlockID="98775575" dstVarID="index" srcBlockID="1012185493" srcVarID="index"/>
<link dstBlockID="1230719918" dstVarID="1497485173" srcBlockID="1012185493" srcVarID="element" srcVarType="double"/>
<link dstBlockID="789883692" dstVarID="index" srcBlockID="98775575" srcVarID="index"/>
<link dstBlockID="1230719918" dstVarID="1255342396" srcBlockID="98775575" srcVarID="element" srcVarType="double"/>
<link dstBlockID="1230719918" dstVarID="2105341113" srcBlockID="789883692" srcVarID="element" srcVarType="double"/>
</links>
<variables>
<input>
<variable ID="array" blockID="534381353" value="" visible="false"/>
<variable ID="701897922:input sequence" blockID="701897922" value="No Sequence" visible="false"/>
<variable ID="701897922:orientation" blockID="701897922" value="Z_becomes_X" visible="false"/>
<variable ID="1776038459:sequence" blockID="1776038459" value="No Sequence" visible="false"/>
<variable ID="1776038459:Z pos" blockID="1776038459" value="0" visible="true"/>
<variable ID="910557679:sequence" blockID="910557679" value="C:/Users/Marion/Documents/Meetings/2020-06-03_Meeting_add_protocols_to_website/Dataset/MCTS_Beads.tif" visible="false"/>
<variable ID="910557679:Z pos" blockID="910557679" value="0" visible="true"/>
<variable ID="1110903668:sequence" blockID="1110903668" value="C:/Users/Marion/Documents/Meetings/2020-06-03_Meeting_add_protocols_to_website/Dataset/MCTS_Beads.tif" visible="false"/>
<variable ID="1110903668:name" blockID="1110903668" value="z-y" visible="false"/>
<variable ID="1562769134:sequence" blockID="1562769134" value="C:/Users/Marion/Documents/Meetings/2020-06-03_Meeting_add_protocols_to_website/Dataset/MCTS_Beads.tif" visible="false"/>
<variable ID="1562769134:name" blockID="1562769134" value="x-y" visible="false"/>
<variable ID="270453463:decimal" blockID="270453463" value="0.26" visible="true"/>
<variable ID="2036907554:decimal" blockID="2036907554" value="1.0" visible="true"/>
<variable ID="1323167894:sequence" blockID="1323167894" value="C:/Users/Marion/Documents/Meetings/2020-06-03_Meeting_add_protocols_to_website/Dataset/MCTS_Beads.tif" visible="false"/>
<variable ID="1323167894:PxSize X (µm)" blockID="1323167894" value="0.26" visible="false"/>
<variable ID="1323167894:PxSize Y (µm)" blockID="1323167894" value="0.26" visible="false"/>
<variable ID="1323167894:PxSize Z (µm)" blockID="1323167894" value="1.0" visible="false"/>
<variable ID="1323167894:Time interval T (s)" blockID="1323167894" value="100.0" visible="false"/>
<variable ID="1300221236:sequence" blockID="1300221236" value="C:/Users/Marion/Documents/Meetings/2020-06-03_Meeting_add_protocols_to_website/Dataset/MCTS_Beads.tif" visible="false"/>
<variable ID="1300221236:PxSize X (µm)" blockID="1300221236" value="0.26" visible="false"/>
<variable ID="1300221236:PxSize Y (µm)" blockID="1300221236" value="0.26" visible="false"/>
<variable ID="1300221236:PxSize Z (µm)" blockID="1300221236" value="1.0" visible="false"/>
<variable ID="1300221236:Time interval T (s)" blockID="1300221236" value="100.0" visible="false"/>
<variable ID="1012185493:array" blockID="1012185493" value="" visible="true"/>
<variable ID="1012185493:index" blockID="1012185493" value="0" visible="false"/>
<variable ID="98775575:array" blockID="98775575" value="" visible="true"/>
<variable ID="98775575:index" blockID="98775575" value="0" visible="false"/>
<variable ID="789883692:array" blockID="789883692" value="" visible="true"/>
<variable ID="789883692:index" blockID="789883692" value="0" visible="false"/>
<variable ID="1230719918:Script" blockID="1230719918" value="importClass(Packages.icy.type.collection.array.Array1DUtil)&#10;importClass(Packages.plugins.adufour.metrolospim.ROI2DLineProfile)&#10;importClass(Packages.java.awt.geom.Point2D)&#10;importClass(Packages.ij.measure.CurveFitter)&#10;importClass(Packages.java.io.FileWriter)&#10;&#10;// input0 must be the &quot;XY&quot; sequence&#10;// input1 must be the &quot;ZY&quot; sequence&#10;&#9;fw= FileWriter(input2, true)&#10;&#9;//function to get the FWHM of the 2 l lides x-y and z-y of a &#10;&#9;//3D psf of a system the size od the window should be about 4 times&#10;&#9;//the theoretical size of the psf in each direction&#10;&#9;RodbardEquation = &quot;y = a + (b-a)*exp(-(x-c)*(x-c)/(2*d*d))&quot;; //fit Eq&#10;&#9;result=[]&#10;     &#9;pw = input0.getPixelSizeX()&#10;     &#9;ph = input0.getPixelSizeY()&#10;&#9;width = input0.getWidth()&#10;&#9;height = input0.getHeight()&#10;&#10;&#9;b = input0.getData(0, 0, 0, height/2, width/2) //get the max value in the center of the window&#10;&#9;a = input0.getData(0, 0, 0, 0, 0) //suppose this as minimum or close to for init values&#10;&#10;&#9;//X dimension&#10;     &#10;&#9;//plot profile of the center of the image where the max is&#10; &#9;p1 = new Point2D.Double(0, height/2)&#10;&#9;p2 = new Point2D.Double(width, height/2)&#10;&#9;yVal = ROI2DLineProfile.getSegmentProfile(p1, p2, input0.getImage(0, 0))[0]&#10;&#9;xVal = []&#10;&#9;//xVal = new double[profile.length]&#10;&#9;for(i=0;i&lt;yVal.length;i++) xVal[i] = i&#10;&#10;     //init fitting values: &#10;     //offset a = min; maximum b = max; center c = center of the image or x/2;  &#10;     //size = d 0.39894 * (xMax-xMin) * (yMean-yMin)/(yMax-yMin+1e-100)    &#10;  &#9;res_lat = 0.39894 * (width) * 0.5&#10;  &#9;initialGuesses = [a, b, width/2, res_lat]&#10;&#9;cv = new CurveFitter(xVal, yVal)&#10;&#9;cv.doCustomFit(RodbardEquation, initialGuesses, false) //fit x&#10;&#9;p = cv.getParams()&#10;     &#9;d = Math.abs(p[3])&#10;     &#9;result[0] = d * 2 * Math.sqrt(2 * Math.log(2)) * pw //determine the FWHM form original units&#10;     &#10;     //Y dimension (same procedure as before)&#10;     &#10;&#9;//plot profile of the center of the image where the max is&#10; &#9;p1 = new Point2D.Double(width/2, 0)&#10;&#9;p2 = new Point2D.Double(width/2, height)&#10;&#9;yVal = ROI2DLineProfile.getSegmentProfile(p1, p2, input0.getImage(0, 0))[0]&#10;&#9;xVal = []&#10;&#9;for(i=0;i&lt;yVal.length;i++) xVal[i] = i&#10;&#10;     &#9;res_lat=0.39894 * (height) * 0.5;&#10;     &#9;initialGuesses = [a, b , height/2 , res_lat]&#10;&#9;cv = new CurveFitter(xVal, yVal)&#10;&#9;cv.doCustomFit(RodbardEquation, initialGuesses, false) //fit y&#10;&#9;p = cv.getParams()&#10;     &#9;d = Math.abs(p[3])&#10;     &#9;result[1]= d * 2 * Math.sqrt(2 * Math.log(2)) * ph&#10;&#10;     //Z dimension&#10;&#10;&#9;pd = input1.getPixelSizeX()&#10;     &#9;ph = input1.getPixelSizeY()&#10;&#9;slices = input1.getWidth()&#10;&#9;width = input1.getHeight()&#10;&#10;&#9;//plot profile of the center of the image where the max is&#10; &#9;p1 = new Point2D.Double(0, width/2)&#10;&#9;p2 = new Point2D.Double(slices, width/2)&#10;&#9;yVal = ROI2DLineProfile.getSegmentProfile(p1, p2, input1.getImage(0, 0))[0]&#10;&#9;xVal = []&#10;&#9;for(i=0;i&lt;yVal.length;i++) xVal[i] = i&#10;&#9;&#10;&#9;b = input1.getData(0, 0, 0, width/2, slices/2 ) //get the max value in the center of the window&#10;&#9;a = input1.getData(0, 0, 0, 0, 0) //suppose this as minimum or close to for init values&#10;   &#10;     &#10;&#9;res_lat=0.39894 * (slices) * 0.5&#10;&#9;initialGuesses = [a, b, slices/2, res_lat]&#10;&#9;cv = new CurveFitter(xVal, yVal)&#10;&#9;cv.doCustomFit(RodbardEquation, initialGuesses, false) //fit z&#10;&#9;p = cv.getParams()&#10;     &#9;d = Math.abs(p[3])&#10;&#9;result[2] = d * 2 * Math.sqrt(2 * Math.log(2)) * pd&#10;&#10;&#9;fw.write(input3+ &quot;\t&quot;+input4+ &quot;\t&quot;+input5+ &quot;\t&quot;+result[0] + &quot;\t&quot; + result[1] + &quot;\t&quot; + result[2] + &quot;\n&quot;)&#10;&#9;fw.close()&#10;     &#9;output0 = result" visible="false"/>
<variable ID="1230719918:Add Input" blockID="1230719918" value="5" visible="false"/>
<variable ID="1230719918:Add output" blockID="1230719918" value="2" visible="false"/>
<variable ID="1230719918:input0" blockID="1230719918" value="" visible="false"/>
<variable ID="1230719918:1273378821" blockID="1230719918" value="" visible="false"/>
<variable ID="1230719918:1789302932" blockID="1230719918" value="" visible="true"/>
<variable ID="1230719918:1497485173" blockID="1230719918" value="" visible="false"/>
<variable ID="1230719918:1255342396" blockID="1230719918" value="" visible="false"/>
<variable ID="1230719918:2105341113" blockID="1230719918" value="" visible="false"/>
</input>
<output>
<variable ID="iteration" blockID="534381353" visible="false"/>
<variable ID="element" blockID="534381353" visible="false"/>
<variable ID="701897922:output sequence" blockID="701897922" visible="false"/>
<variable ID="1776038459:extracted" blockID="1776038459" visible="false"/>
<variable ID="910557679:extracted" blockID="910557679" visible="false"/>
<variable ID="1012185493:element" blockID="1012185493" visible="false"/>
<variable ID="98775575:element" blockID="98775575" visible="false"/>
<variable ID="789883692:element" blockID="789883692" visible="false"/>
<variable ID="1230719918:output0" blockID="1230719918" visible="false"/>
<variable ID="1230719918:1456157377" blockID="1230719918" visible="false"/>
<variable ID="1230719918:761076249" blockID="1230719918" visible="false"/>
</output>
</variables>
</workflow>
</blocks>
<links>
<link dstBlockID="718833676" dstVarID="input Sequence" srcBlockID="8596055" srcVarID="input sequence"/>
<link dstBlockID="373914139" dstVarID="sequence to crop" srcBlockID="718833676" srcVarID="input Sequence"/>
<link dstBlockID="113209655" dstVarID="inputROI" srcBlockID="718833676" srcVarID="detection as ROIs"/>
<link dstBlockID="987771557" dstVarID="dyn-a" srcBlockID="1180058056" srcVarID="decimal"/>
<link dstBlockID="755270273" dstVarID="dyn-a" srcBlockID="2000600680" srcVarID="decimal"/>
<link dstBlockID="575285617" dstVarID="center (X)" srcBlockID="113209655" srcVarID="center (X)"/>
<link dstBlockID="575285617" dstVarID="center (Y)" srcBlockID="113209655" srcVarID="center (Y)"/>
<link dstBlockID="575285617" dstVarID="center (Z)" srcBlockID="113209655" srcVarID="center (Z)"/>
<link dstBlockID="534381353" dstVarID="1012185493:array" srcBlockID="113209655" srcVarID="center (X)"/>
<link dstBlockID="534381353" dstVarID="98775575:array" srcBlockID="113209655" srcVarID="center (Y)"/>
<link dstBlockID="534381353" dstVarID="789883692:array" srcBlockID="113209655" srcVarID="center (Z)"/>
<link dstBlockID="575285617" dstVarID="sizes (X)" srcBlockID="755270273" srcVarID="dyn-a" srcVarType="double"/>
<link dstBlockID="575285617" dstVarID="sizes (Y)" srcBlockID="755270273" srcVarID="dyn-a" srcVarType="double"/>
<link dstBlockID="534381353" dstVarID="910557679:Z pos" srcBlockID="755270273" srcVarID="Out" srcVarType="java.lang.Double"/>
<link dstBlockID="575285617" dstVarID="sizes (Z)" srcBlockID="987771557" srcVarID="dyn-a" srcVarType="double"/>
<link dstBlockID="534381353" dstVarID="1776038459:Z pos" srcBlockID="987771557" srcVarID="Out" srcVarType="java.lang.Double"/>
<link dstBlockID="373914139" dstVarID="list of ROI" srcBlockID="575285617" srcVarID="List of ROI"/>
<link dstBlockID="534381353" dstVarID="array" srcBlockID="373914139" srcVarID="list of crops"/>
<link dstBlockID="2146738933" dstVarID="target sequence" srcBlockID="373914139" srcVarID="sequence to crop"/>
<link dstBlockID="2146738933" dstVarID="input rois" srcBlockID="373914139" srcVarID="list of ROI"/>
<link dstBlockID="534381353" dstVarID="1230719918:1789302932" srcBlockID="31910767" srcVarID="file"/>
<link dstBlockID="534381353" dstVarID="270453463:decimal" srcBlockID="1970073602" srcVarID="decimal"/>
<link dstBlockID="534381353" dstVarID="2036907554:decimal" srcBlockID="687153073" srcVarID="decimal"/>
</links>
</protocol>
