These are chat archives for fiji/fiji

16th
Jan 2017
Yaser Afshar
@yafshar
Jan 16 2017 12:56
Hi, I have an old question. How can I use multi-point to mark points on a 3D stack?
Currently, I have tried two different approaches:
setSlice(z);
setKeyDown("shift");
makePoint(x, y);
This way I can mark several points, but they are visible through all the stacks, which I do not want!
Also using
makeSelection("point", xpoints, ypoints);
only marks the points on one stack
Would someone tell me, how I should mark the points using multi-point or anything else on a 3D stack?
Robert Haase
@haesleinhuepf
Jan 16 2017 13:00
Hi @yafshar click on the menu Options > Point tool. There is a “show all” checkbox allowing you to not see all points… Does that work?
Edit > Options > Point Tool... ;-)
Yaser Afshar
@yafshar
Jan 16 2017 13:07
Thanks, but I need the macro
I have the list of points which I am reading from a file
it is more than 2000 points
Robert Haase
@haesleinhuepf
Jan 16 2017 13:14

Ah, then you need the ROImanager, I guess. E.g. like that:

newImage("Untitled", "8-bit black", 100, 100, 100);
setTool("point");
run("Point Tool...", "type=Hybrid color=Red size=Small label show counter=0");
if (roiManager("count") > 0) {
roiManager("Delete");
}
if (nResults() > 0) {
run("Clear Results");
}

setSlice(2);
makePoint(16, 16);
roiManager("Add");

setSlice(5);
makePoint(24, 22);
roiManager("Add");

setSlice(27);
makePoint(28, 25);
roiManager("Add");

setSlice(53);
makePoint(67, 45);
roiManager("Add");

// ...

roiManager("Measure");

If you want, you can come down to my office 106 (s) and we can discuss if that fits you needs ;-)
Yaser Afshar
@yafshar
Jan 16 2017 13:15
tnx!
odinsbane
@odinsbane
Jan 16 2017 16:25
I have a plugin that disables a menu item, then re-enables it. The re-enabled menu stays disabled unless I switch to a different app then back to fiji, any suggestions?
willisaliou
@willisaliou
Jan 16 2017 16:27
May I try it, thanks.
odinsbane
@odinsbane
Jan 16 2017 17:38
Odd, it appears to be some wierd osx bug.
Florian Jug
@fjug
Jan 16 2017 19:05
@/all Brain picking: I would like to call the Weka Trainable Segmentation plugin from Matlab. Greatful for any ideas and pointers! (I know Matlab, I know Fiji/ImageJ, but I’ve never tried to use them together…)
Florian Jug
@fjug
Jan 16 2017 21:38
Ok, I started using ImageJ-MATLAB and Miji. I guess that is how things start, right. Now I guess I can use Miji’s MIJ.run(…) to start the Weka Segmenter. Is there another way, or are there other pointers you think I should know about?
Florian Jug
@fjug
Jan 16 2017 22:57
Ok, the problem with MIJ.run(…) is, that I need to use call(…) methods to configure the Weka Segmenter properly. MIJ does not come with something like MIJ.call(…). Therefore I started writing a macro I called ‘WekaThis’ which I can call via MIJ.run(‘WekaThis’).
This now all works kind of ok. The one last remaining problem might be simple: how can I know in Matlab if the execution of MIJ.run(…) terminated? I would just like to know when I can issue IJM.getDatasetAs('probmaps’) in order to receive the output of WekaThis.
@hinerm you might be the person who could help me with the above… ;)
Florian Jug
@fjug
Jan 16 2017 23:15
Would be great to have something like macroRunning() which I would use within a macro...
Florian Jug
@fjug
Jan 16 2017 23:55

The ‘solution’ I found for now:

numImages = length(MIJ.getListImages());
MIJ.run('WekaThis');
while (length(MIJ.getListImages()) == numImages)
end
IJM.getDatasetAs('probmaps');

Note: WekaThis creates one new image window as output...