Frame Projector

This plugin projects the images in the frame direction into a lower dimension using different methods.

Author

Fred Damen

Features

When run as a plugin from the gui the correct image is used; identified on top line. A subset of the slices and frames can be used as the source data; see syntax for Make Substacks…. The following summary methods as provided:

Sum Arithmetic Sum
Mean Arithmetic Mean (μ)
StdDev Standard Deviation (σ) - computed using the slow method for numerical accuracy
ZScore Z Score (μ/σ) - akin to Signal to Noise (SNR)
CV Coefficient of Variation (σ/μ)
Minimum Minimum
Maximum Maximum
Median Median
Center Weighted arithmetic mean around the median - resilient to outliers
Product Product (nΠsi/n)
GeoMean Geometric Mean - prescaled product
LinReg Linear least squares regression - frames returned m, b, r2
TheilSen Theil Sen Regression with Center estimator - frames m, b
Fit CurveFitter fitting - frames are model parameters, r2, Ψ2
Deviation Appends a frame with the appropriate deviation from an appropriate selected summary.
If the first slice of every frame has a Short Label that can be split by the regex ” = |=| ”, e.g., var = fval, and the list has unique elements, the float fval values will be used in the fittings instead of the frame number.

There are also static methods provided, with the same names, albeit, all lower case, with two syntaxis: method(ImagePlus,slices,frames), method(ImagePlus); save fit(…, int), fit(…, String).

Nota bene: Works even when there is only one slice in the Z direction.

Uses

ASL - MRI

ImagePlus aslAcquired = . . .
ImagePlus tag = F_Project.mean(aslAcquired,”all”,”1-100-2”);
ImagePlus ctl = F_Project.mean(aslAcquired,”all”,”2-100-2”);
ImagePlus asl = ctl.duplicate();
(new ImageCaculator()).run(“Subtract 32-bit stack”, asl, tag);
(new ImageCaculator()).run(“Divide 32-bit stack”, asl, ctl);

ADC - MRI

/* Assuming many b-values (slicelabels = “b=%f”) */
ImagePlus dwiAcquired = . . .
ImagePlus dwi = dwiAcquired.duplicate();
ImagePlus dwib0 = SubHyperstackMaker.makeSubhyperstack(dwi,”1-”+dwi.getNSlices(),”1”,dwiAcquired);
for(int f=0; f<dwiAcquired.getNFrames(); f++)
(new ImageCalculator()).run(“Divide 32-bit stack”, dwi, dwib0);

ImagePlus adc_etal = F_Project.fit(dwi,”Exponential”);

OR with more resilience to outliers . . .

IJ.run(dwi, “Log”, ””);
ImagePlus adc_etal = F_Project.theilsen(dwi);

Install

Place the file F_Project.java in your plugins directory, then compile&run; or just place the class file in your prugins directory and refresh the menus / restart ImageJ.

License

GPL distribution licence.

ChangeLog

  • 1 April 2018 - Initial Version.
plugin/stacks/frame_projector/start.txt · Last modified: 2018/07/04 21:03 by fred
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0