Interactive 3D Surface Plot macro problem

Dear all,

We had this macro that created a 3D surface plot using the 3D Surface Plot plugin following the code instructions provided here:

https://imagej.nih.gov/ij/plugins/surface-plot-3d.html

We cannot make it work any more, it gives us the error attached when running our macro or the macro example provided.

I will try with the simpler ImageJ and installing the plugin just in case, but it would be great to be able to use it in Fiji again.

Thanks a lot in advance!

Verónica

Hi Veronica,
The following macro from the website works for me in Fiji.
Did you put the jar from the plugin in Fiji.app > plugins and restarted Fiji?
Also maybe put the command

run("Interactive 3D Surface Plot", "plotType=3 smooth=11 colorType=3 snapshot=1 rotationZ="+angleZ);`

on a single line like below, instead of having it span 2 lines
Otherwise try on a freshly downloaded Fiji.

run("Blobs (25K)");
run("Invert");
img1 = getImageID;
stack = 0;
setBatchMode(true);
n = 10;
for (i=0; i<n; i++) {
showProgress(i, n);
selectImage(img1);
angleZ = -i * 4 + 60;
run("Interactive 3D Surface Plot", "plotType=3 smooth=11 colorType=3 snapshot=1 rotationZ="+angleZ);
run("Copy");
w = getWidth; h = getHeight;
close();  
if (stack==0) {
 newImage("Plots", "RGB", w, h, 1);
 stack = getImageID;
} else {
 selectImage(stack);
 run("Add Slice");
}
run("Paste");
}
setSlice(1);
run("Select None");
setBatchMode(false);

I see, you are totally right! I thought the tool available in Fiji in Analyze>3D Surface Plot was the same as the plugin. Thank you for your fast reply and sorry for the silly question!

1 Like

There is no silly question, other people might come across the same situation, so thanks for making the point !

And sorry for the confusing 3D viewers situation, I like the interactive 3D plotter too, It would be great if it would be available via a dedicated Fiji update site rather than manually installing it.
Let’s see what the original author (@barthel) thinks about it :blush:

2 Likes

The plugin Analyze>3D Surface Plot is the same plugin and it is included in Fiji.
If you change the mocro line:
run(“Interactive 3D Surface Plot”, “plotType=3 smooth=11 colorType=3 snapshot=1 rotationZ=”+angleZ);
to
run(“3D Surface Plot”, “plotType=3 smooth=11 colorType=3 snapshot=1 rotationZ=”+angleZ);
it will work.

Thanks a lot for the info!