You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ops/doc/CallingOps.md
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,15 +72,31 @@ direct execution, since the parameters have not been concretely specified yet.
72
72
Using [wildcards](https://docs.oracle.com/javase/tutorial/extra/generics/wildcards.html), such as `Img<?> inImage`, can make Op reuse difficult. For example, the following code segment will not compile in a Java runtime:
var gaussOp = ops.op("filter.gauss").input(inImage, 2.0).output(outImage).computer();
77
77
gaussOp.compute(inImage, 2.0, outImage);
78
78
```
79
79
80
80
### Solution 1: Use `compute` instead of `computer`
81
81
82
-
If you don't need to save the Op to a variable, *just call it directly* as shown [here](#computing-with-compute). Generally speaking, op requests are **cached**, meaning repeated OpBuilder calls that directly execute Ops will **not** significantly increase performance.
82
+
If you don't need to save the Op to a variable, *just [call it directly](#computing-with-compute)*:
83
83
84
-
### Solution 2: Use Type Parameters on your functions
Generally speaking, op requests are **cached**, meaning repeated OpBuilder calls that directly execute Ops will **not** significantly decrease performance.
89
+
90
+
### Solution 2: Avoid using wildcards
91
+
92
+
If you *know* that your `Img` will always contain unsigned byte values, for example, define your variable as an `Img<UnsignedByteType>` rather than using `Img<?>`.
Copy file name to clipboardExpand all lines: docs/ops/doc/examples/flim_analysis.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ We use a sample of `FluoCells™ Prepared Slide #1`_, imaged by `Jenu Chacko`_ u
13
13
14
14
FluoCells™ Prepared Slide #1 contains bovine pulmonary artery endothelial cells (BPAEC). MitoTracker™ Red CMXRos was used to stain the mitochondria in the live cells, with accumulation dependent upon membrane potential. Following fixation and permeabilization, F-actin was stained with Alexa Fluor™ 488 phalloidin, and the nuclei were counterstained with the blue-fluorescent DNA stain DAPI.
15
15
16
-
The sample data can be downloaded `here <https://media.scijava.org/scijava-ops/1.0.0/flim_example_data.sdt>`_ and can be loaded into Fiji with `Bio-Formats`_ using ``File → Open``. When presented with the ``Bio-Formats Import Options`` screen, it may be helpful to select ``Metadata viewing → Display metadata`` to determine values necessary for analysis. Then, select ``OK``. The data may take a minute to load.
16
+
The sample data can be downloaded `here <https://media.scijava.org/scijava-ops/1.0.0/flim_example_data.sdt>`_ and can be loaded into Fiji with `SCIFIO`_ using ``File → Open...`` or ``File → Import → Image...``. The data may take a minute to load.
17
17
18
18
Within the script, the `Levenberg-Marquardt algorithm`_ fitting Op of SciJava Ops FLIM is used to fit the data.
19
19
@@ -78,7 +78,7 @@ The pseudocolored result shows a clear separation of fluorophores, which could b
78
78
#@ ROIService roiService
79
79
#@ Img input
80
80
#@ Float (description="The total time (ns) (timeBase in metadata)", label = "Time Base", value=12.5) timeBase
81
-
#@ Integer (description="The number of time bins (timeBins in metadata)", label = "Time Bins", value=512) timeBins
81
+
#@ Integer (description="The number of time bins (timeBins in metadata)", label = "Time Bins", value=256) timeBins
82
82
#@ Integer (description="The index of the lifetime axis (from metadata)", label = "Lifetime Axis", value=2) lifetimeAxis
83
83
#@ Float (description="The minimal pixel intensity (across all time bins) threshold for fitting", label = "Intensity Threshold", value = 18) iThresh
84
84
#@ Integer (description="The radius of the binning kernel", label = "Bin Kernel Radius", value=1, min=0) kernelRad
@@ -222,7 +222,7 @@ In the panels below, we show the results of executing both scripts with computat
0 commit comments