Skip to content

Commit b3fe1b7

Browse files
author
Bobafotz
committed
2 parents 29c201c + 76d0825 commit b3fe1b7

24 files changed

+930
-37
lines changed

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
<parent>
99
<groupId>net.haesleinhuepf</groupId>
1010
<artifactId>clij-parent-pom</artifactId>
11-
<version>2.1.4.0</version>
11+
<version>2.1.4.10</version>
1212
<relativePath />
1313
</parent>
1414

1515
<groupId>net.haesleinhuepf</groupId>
1616
<artifactId>clijx_</artifactId>
17-
<version>0.29.4.7</version>
17+
<version>0.29.4.10</version>
1818

1919
<name>clijx_</name>
2020
<description>clijx</description>

src/main/java/net/haesleinhuepf/clijx/jython/CLIJxAutoComplete.java

+21-12
Large diffs are not rendered by default.

src/main/java/net/haesleinhuepf/clijx/jython/ScriptingAutoCompleteProvider.java

+13-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
import ij.IJ;
44
import ij.ImagePlus;
5+
import ij.ImageStack;
56
import ij.gui.Overlay;
7+
import ij.gui.PolygonRoi;
68
import ij.gui.Roi;
9+
import ij.gui.TextRoi;
710
import ij.macro.Interpreter;
811
import ij.measure.ResultsTable;
912
import ij.plugin.frame.RoiManager;
@@ -87,19 +90,24 @@ private ScriptingAutoCompleteProvider() {
8790
addCompletion(basicCompletion);
8891
}
8992

90-
addClassToAutoCompletion(CLIJOps.class, "clij.op().");
91-
addClassToAutoCompletion(CLIJ.class, "clij.");
93+
//addClassToAutoCompletion(CLIJOps.class, "clij.op().");
94+
//addClassToAutoCompletion(CLIJ.class, "clij.");
9295
addClassToAutoCompletion(ClearCLBuffer.class, "buffer.");
9396

9497
addClassToAutoCompletion(ImagePlus.class, "imp.");
98+
addClassToAutoCompletion(ImageStack.class, "is.");
9599
addClassToAutoCompletion(ImageProcessor.class, "ip.");
96100
addClassToAutoCompletion(IJ.class, "IJ.");
97101
addClassToAutoCompletion(Roi.class, "roi.");
102+
addClassToAutoCompletion(TextRoi.class, "textroi.");
103+
addClassToAutoCompletion(PolygonRoi.class, "polygonroi.");
104+
98105
addClassToAutoCompletion(RoiManager.class, "rm.");
99106
addClassToAutoCompletion(Color.class, "Color.");
100107
addClassToAutoCompletion(Overlay.class, "overlay.");
101108
addClassToAutoCompletion(ResultsTable.class, "table.");
102109

110+
addClassToAutoCompletion(List.class, "list.");
103111

104112
addClassToAutoCompletion(ArrayImgs.class, "ArrayImgs.");
105113
addClassToAutoCompletion(Cursor.class, "cursor.");
@@ -109,6 +117,9 @@ private ScriptingAutoCompleteProvider() {
109117
addClassToAutoCompletion(Views.class, "Views.");
110118
addClassToAutoCompletion(Regions.class, "Regions.");
111119
addClassToAutoCompletion(ImageJFunctions.class, "ImageJFunctions.");
120+
121+
122+
112123
}
113124

114125
private void addClassToAutoCompletion(Class c, String prefix) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package net.haesleinhuepf.clijx.legacy;
2+
3+
public class FallBackCLIJMacroPluginService extends net.haesleinhuepf.clij2.legacy.FallBackCLIJMacroPluginService {
4+
5+
public FallBackCLIJMacroPluginService() {
6+
FallBackCLIJMacroPluginServiceInitializer.initialize(this);
7+
}
8+
}

src/main/java/net/haesleinhuepf/clijx/legacy/FallBackCLIJMacroPluginServiceInitializer.java

+651
Large diffs are not rendered by default.

src/main/java/net/haesleinhuepf/clijx/plugins/AbsoluteInplace.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Author: @haesleinhuepf
1414
* November 2019
1515
*/
16-
16+
@Deprecated
1717
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_absoluteInplace")
1818
public class AbsoluteInplace extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
1919

@@ -22,6 +22,7 @@ public boolean executeCL() {
2222
return absoluteInplace(getCLIJx(), (ClearCLBuffer) args[0]);
2323
}
2424

25+
@Deprecated
2526
public static boolean absoluteInplace(CLIJx clijx, ClearCLBuffer input_output) {
2627
ClearCLBuffer buffer = clijx.create(input_output);
2728
clijx.copy(input_output, buffer);
@@ -38,7 +39,8 @@ public String getParameterHelpText() {
3839

3940
@Override
4041
public String getDescription() {
41-
return "Computes the absolute value of every individual pixel x in a given image.\n\n<pre>f(x) = |x| </pre>";
42+
return "Computes the absolute value of every individual pixel x in a given image.\n\n<pre>f(x) = |x| </pre>\n\n" +
43+
"Deprecated: Use absolute() instead.";
4244
}
4345

4446
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/AutomaticThresholdInplace.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* Author: @haesleinhuepf
1919
* November 2019
2020
*/
21+
@Deprecated
2122
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_automaticThresholdInplace")
2223
public class AutomaticThresholdInplace extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
2324

@@ -31,6 +32,7 @@ public boolean executeCL() {
3132
return true;
3233
}
3334

35+
@Deprecated
3436
public static boolean automaticThresholdInplace(CLIJx clijx, ClearCLBuffer src_dst, String userSelectedMethod) {
3537
ClearCLBuffer buffer = clijx.create(src_dst);
3638
clijx.copy(src_dst, buffer);
@@ -46,7 +48,8 @@ public String getDescription() {
4648
doc.append("The automatic thresholder utilizes the threshold methods from ImageJ on a histogram determined on \n" +
4749
"the GPU to create binary images as similar as possible to ImageJ 'Apply Threshold' method. Enter one \n" +
4850
"of these methods in the method text field:\n" +
49-
Arrays.toString(AutoThresholder.getMethods()) );
51+
Arrays.toString(AutoThresholder.getMethods()) + "\n\n" +
52+
"Deprecated: Use threshold* instead.");
5053
return doc.toString();
5154
}
5255

src/main/java/net/haesleinhuepf/clijx/plugins/Bilateral.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import java.util.HashMap;
1919

20+
@Deprecated
2021
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_bilateral")
2122
public class Bilateral extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation, HasAuthor, IsCategorized {
2223

@@ -31,6 +32,7 @@ public boolean executeCL() {
3132
return result;
3233
}
3334

35+
@Deprecated
3436
public static boolean bilateral(CLIJ2 clij2, ClearCLBuffer input, ClearCLBuffer output, Integer radiusX, Integer radiusY, Integer radiusZ, Float sigma_intensity, Float sigma_space) {
3537
HashMap<String, Object> parameters = new HashMap<>();
3638
parameters.put("input", input);
@@ -50,7 +52,8 @@ public static boolean bilateral(CLIJ2 clij2, ClearCLBuffer input, ClearCLBuffer
5052

5153
@Override
5254
public String getDescription() {
53-
return "Applies a bilateral filter using a box neighborhood with sigma weights for space and intensity to the input image.";
55+
return "Applies a bilateral filter using a box neighborhood with sigma weights for space and intensity to the input image.\n\n" +
56+
"Deprecated: Use SimpleITK bilateral() instead.";
5457
}
5558

5659
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/BlurBuffers3D.java

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* Author: @haesleinhuepf
1313
* 12 2018
1414
*/
15+
@Deprecated
1516
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_blurBuffers3D")
1617
public class BlurBuffers3D extends AbstractCLIJPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
1718

src/main/java/net/haesleinhuepf/clijx/plugins/BlurImages3D.java

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Author: @haesleinhuepf
1414
* 12 2018
1515
*/
16+
@Deprecated
1617
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_blurImages3D")
1718
public class BlurImages3D extends AbstractCLIJPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
1819

src/main/java/net/haesleinhuepf/clijx/plugins/BlurInplace3D.java

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* Author: @haesleinhuepf
1414
* 12 2018
1515
*/
16+
@Deprecated
1617
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_blurInplace3D")
1718
public class BlurInplace3D extends AbstractCLIJPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
1819

src/main/java/net/haesleinhuepf/clijx/plugins/ConnectedComponentsLabelingInplace.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* Author: @haesleinhuepf
2929
* 06 2019
3030
*/
31+
@Deprecated
3132
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_connectedComponentsLabelingInplace")
3233
public class ConnectedComponentsLabelingInplace extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
3334

@@ -41,6 +42,7 @@ public boolean executeCL() {
4142
return result;
4243
}
4344

45+
@Deprecated
4446
public static boolean connectedComponentsLabelingInplace(CLIJx clijx, ClearCLBuffer output) {
4547
ClearCLImage temp1 = clijx.create(output.getDimensions(), ImageChannelDataType.Float);
4648
ClearCLImage temp2 = clijx.create(output.getDimensions(), ImageChannelDataType.Float);
@@ -121,7 +123,8 @@ public String getParameterHelpText() {
121123

122124
@Override
123125
public String getDescription() {
124-
return "Performs connected components analysis to a binary image and generates a label map.";
126+
return "Performs connected components analysis to a binary image and generates a label map.\n\n" +
127+
"Deprecated: Use connectedComponentsLabelingBox() instead.";
125128
}
126129

127130
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/CustomBinaryOperation.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Author: @haesleinhuepf
1717
* March 2020
1818
*/
19-
19+
@Deprecated
2020
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_customBinaryOperation")
2121
public class CustomBinaryOperation extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
2222

@@ -25,6 +25,7 @@ public boolean executeCL() {
2525
return customBinaryOperation(getCLIJx(), (ClearCLBuffer) args[0], (ClearCLBuffer) args[1], (String)args[2]);
2626
}
2727

28+
@Deprecated
2829
private static boolean customBinaryOperation(CLIJx clijx, ClearCLImageInterface image1, ClearCLImageInterface image2, String openCLCode) {
2930
HashMap<String, Object> parameters = new HashMap<>();
3031
parameters.put("image1", image1);
@@ -52,7 +53,8 @@ public String getParameterHelpText() {
5253

5354
@Override
5455
public String getDescription() {
55-
return "Executes custom OpenCL code on a pair of images.";
56+
return "Executes custom OpenCL code on a pair of images.\n\n" +
57+
"Deprecated: Use customOperation() instead.";
5658
}
5759

5860
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/DifferenceOfGaussianInplace3D.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import net.haesleinhuepf.clij.macro.CLIJOpenCLProcessor;
99
import net.haesleinhuepf.clij.macro.documentation.OffersDocumentation;
1010
import org.scijava.plugin.Plugin;
11-
11+
@Deprecated
1212
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_differenceOfGaussianInplace3D")
1313
public class DifferenceOfGaussianInplace3D extends AbstractCLIJPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
1414

@@ -26,6 +26,7 @@ public boolean executeCL() {
2626
return result;
2727
}
2828

29+
@Deprecated
2930
public static boolean differenceOfGaussianInplace3D(CLIJ clij, ClearCLBuffer input_output, Float sigma1x, Float sigma1y, Float sigma1z, Float sigma2x, Float sigma2y, Float sigma2z) {
3031

3132
ClearCLBuffer temp1 = clij.create(input_output);
@@ -44,7 +45,8 @@ public static boolean differenceOfGaussianInplace3D(CLIJ clij, ClearCLBuffer inp
4445
@Override
4546
public String getDescription() {
4647
return "Applies Gaussian blur to the input image twice with different sigma values resulting in two images which are then subtracted from each other.\n\n" +
47-
"It is recommended to apply this operation to images of type Float (32 bit) as results might be negative.";
48+
"It is recommended to apply this operation to images of type Float (32 bit) as results might be negative.\n\n" +
49+
"Deprecated: Use differenceOfGaussian3D instead.";
4850
}
4951

5052
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/GaussJordan.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import java.util.HashMap;
1818

19-
19+
@Deprecated
2020
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_gaussJordan")
2121
public class GaussJordan extends AbstractCLIJPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation, HasAuthor, HasLicense, IsCategorized {
2222

src/main/java/net/haesleinhuepf/clijx/plugins/RigidTransform.java

+17-5
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ public boolean executeCL() {
3131

3232
public static boolean rigidTransform(CLIJ2 clij2, ClearCLBuffer pushed, ClearCLBuffer result, Float translation_x, Float translation_y, Float translation_z, Float rotation_x, Float rotation_y, Float rotation_z) {
3333

34-
String transform = getTransform(translation_x, translation_y, translation_z, rotation_x, rotation_y, rotation_z);
35-
36-
clij2.affineTransform3D(pushed, result, transform);
37-
34+
if (pushed.getDimension() == 2) {
35+
String transform = getTransform2D(translation_x, translation_y, translation_z, rotation_x, rotation_y, rotation_z);
36+
clij2.affineTransform2D(pushed, result, transform);
37+
} else {
38+
String transform = getTransform3D(translation_x, translation_y, translation_z, rotation_x, rotation_y, rotation_z);
39+
clij2.affineTransform3D(pushed, result, transform);
40+
}
3841
return true;
3942
}
4043

4144

42-
public static String getTransform(Float translation_x, Float translation_y, Float translation_z, Float rotation_x, Float rotation_y, Float rotation_z) {
45+
public static String getTransform3D(Float translation_x, Float translation_y, Float translation_z, Float rotation_x, Float rotation_y, Float rotation_z) {
4346
return
4447
"-center" +
4548
" translateX=" + translation_x +
@@ -51,6 +54,15 @@ public static String getTransform(Float translation_x, Float translation_y, Floa
5154
" center";
5255
}
5356

57+
public static String getTransform2D(Float translation_x, Float translation_y, Float translation_z, Float rotation_x, Float rotation_y, Float rotation_z) {
58+
return
59+
"-center" +
60+
" translateX=" + translation_x +
61+
" translateY=" + translation_y +
62+
" rotate=" + rotation_z +
63+
" center";
64+
}
65+
5466
@Override
5567
public String getDescription() {
5668
return "Applies a rigid transform using linear interpolation to an image stack.";

src/main/java/net/haesleinhuepf/clijx/plugins/Skeletonize.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* Author: @haesleinhuepf
2424
* March 2020
2525
*/
26+
@Deprecated
2627
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_skeletonize")
2728
public class Skeletonize extends AbstractCLIJ2Plugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation, HasAuthor, HasLicense, IsCategorized {
2829

@@ -31,6 +32,7 @@ public boolean executeCL() {
3132
return skeletonize(getCLIJ2(), (ClearCLBuffer)( args[0]), (ClearCLBuffer)(args[1]));
3233
}
3334

35+
@Deprecated
3436
public static boolean skeletonize(CLIJ2 clij2, ClearCLBuffer src, ClearCLBuffer dst) {
3537
assertDifferent(src, dst);
3638
if (!checkDimensions(src.getDimension(), src.getDimension(), dst.getDimension())) {
@@ -111,7 +113,8 @@ public String getParameterHelpText() {
111113

112114
@Override
113115
public String getDescription() {
114-
return "Erodes a binary image until just its skeleton is left. \n\nThe result is similar to Skeletonize3D in Fiji.";
116+
return "Erodes a binary image until just its skeleton is left. \n\nThe result is similar to Skeletonize3D in Fiji.\n\n" +
117+
"Deprecated: Use SimpleITK binaryThinning() instead.";
115118
}
116119

117120
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/SubtractBackground2D.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import net.haesleinhuepf.clijx.utilities.AbstractCLIJxPlugin;
1111
import org.scijava.plugin.Plugin;
1212

13+
@Deprecated
1314
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_subtractBackground2D")
1415
public class SubtractBackground2D extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
1516

@@ -44,7 +45,8 @@ public static boolean subtractBackground(CLIJx clijx, ClearCLImageInterface inpu
4445

4546
@Override
4647
public String getDescription() {
47-
return "Applies Gaussian blur to the input image and subtracts the result from the original image.";
48+
return "Applies Gaussian blur to the input image and subtracts the result from the original image.\n\n" +
49+
"Deprecated: Use topHat() or differenceOfGaussian() instead.";
4850
}
4951

5052
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/SubtractBackground3D.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import net.haesleinhuepf.clijx.utilities.AbstractCLIJxPlugin;
1111
import org.scijava.plugin.Plugin;
1212

13+
@Deprecated
1314
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_subtractBackground3D")
1415
public class SubtractBackground3D extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation {
1516

@@ -44,7 +45,8 @@ public static boolean subtractBackground(CLIJx clijx, ClearCLImageInterface inpu
4445

4546
@Override
4647
public String getDescription() {
47-
return "Applies Gaussian blur to the input image and subtracts the result from the original image.";
48+
return "Applies Gaussian blur to the input image and subtracts the result from the original image.\n\n" +
49+
"Deprecated: Use topHat() or differenceOfGaussian() instead.";
4850
}
4951

5052
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/SubtractGaussianBackground.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import net.haesleinhuepf.clijx.CLIJx;
1313
import org.scijava.plugin.Plugin;
1414

15+
@Deprecated
1516
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_subtractGaussianBackground")
1617
public class SubtractGaussianBackground extends AbstractCLIJ2Plugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation, IsCategorized {
1718
@Override
@@ -39,7 +40,8 @@ public static boolean subtractGaussianBackground(CLIJ2 clij2, ClearCLImageInterf
3940

4041
@Override
4142
public String getDescription() {
42-
return "Applies Gaussian blur to the input image and subtracts the result from the original image.";
43+
return "Applies Gaussian blur to the input image and subtracts the result from the original image.\n\n" +
44+
"Deprecated: Use differenceOfGaussian() instead.";
4345
}
4446

4547
@Override

src/main/java/net/haesleinhuepf/clijx/plugins/TopHatOctagon.java

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* Author: @haesleinhuepf
2222
* December 2019
2323
*/
24+
@Deprecated
2425
@Plugin(type = CLIJMacroPlugin.class, name = "CLIJx_topHatOctagon")
2526
public class TopHatOctagon extends AbstractCLIJxPlugin implements CLIJMacroPlugin, CLIJOpenCLProcessor, OffersDocumentation, IsCategorized {
2627

0 commit comments

Comments
 (0)