3D Viewer Threshold

Hello there,

i am struggeling with the usage of the 3D Viewer Plugin. I have greyscale Images where the darkest regions display regions of high intensity. Now i would like to get an 3D Image via the 3D-Viewer-Plugin displaying those regions on white background. It works for me when i first invert all images so that i have white objects on black background (Picture A). Then the black background is transparent in the viewer but its not working vor white background for me (Picture B). Also when i try to use the threshold function of the 3D Viewer it does not change anything no matter what number im typing in.

Second question would be if it is possible to get an coordinate system in the viewer so that i know on which coordinates my objects are.

And before i open the next topic here is my third question: is it possible to interpolate between two pictures? The thing is that those pictures from which i want to construct the 3D Object are made by XRT and in reality there is 10 µm space between the pictures. One pixel has a size of 5.4 µm so i need the space between the voxels of two pictures with an interpolated voxel.

I’m thinking very hard about this the whole week but i cannot find an answer.

I really would apreciate help!

Best regards,

Johannes

A:


B:

Hi Johannes,

White background:
Once you have loaded your image in the 3D Viewer, select it by clicking on it (should have a red frame then), to to >Edit>Transfer function. Choose ‘Alpha’ from the drop-down list and draw the line in the other direction, i.e. from top left to bottom right. This will make the white in your image transparent. To also change the viewer’s background to white, go to >View>Change background color.

Threshold:
Did you have your volume selected (see above, by clicking on it, should show a red frame). I just checked it here and I could see the 3D view changing while I was dragging.

Interpolating:
I’m not sure about the issue here: If the volume appears squeezed in z, your pixel calibration is wrong, you can change that (before loading it in the 3D Viewer) in ImageJ under >Image>Properties. However, if you see artifacts because of the anisotropic spacing, you could re-slice it (again before loading it in the 3D Viewer) in ImageJ using >Image>Stacks>ResliceZ

Coordinate system:
Not sure what you need here, is the frame you get when checking >Edit>Show bounding box enough?

Let me know if that helps.

Best wishes,
Bene

2 Likes

Hi Bene,

first of all: Thank your for your reply!

With your advices i managed to solve the problem with the white background. After changing the transfer function it became also possible to change the threshold.

In terms of the interpolation i asked myself if there exists a plugin which can calculate a picture whose grey values are between those of the first an the second one. So that i can take this artifical picture and put it between the real ones getting a higher resolution 3D Image.
At the moment i go your way: i first set the voxels hight and width to 5.4 µm and the depth to 10 µm (because like i said, in reality the pictures have 10 µm space between). Subsequently i reslice it ( because for my application there are some advantages going through the stack from top to bottom - original stacks goes from right to left). Finally i open it in 3D Viewer.

This is not perfect but it works and would be ok.

If i am using the coordinate system the right way, its unfortunately not enough. I need to locate the coordinates and dimensions of some objects, for that the coordinate system is too rough.

I tried to use 3D Roi manager and segmentation manager to get the exact coordinates of certain objects in the 3D-Space. I tried the following things:

Using a macro:
setAutoThreshold(“Default no-reset”);
//run(“Threshold…”);
call(“ij.plugin.frame.ThresholdAdjuster.setMode”, “Over/Under”);
setThreshold(190, 255);
run(“Create Selection”);
run(“Make Inverse”);
run(“Set…”, “value=0”);

then open the processed stack. Afterwards i open the 3D-ROI-Manager > add Images > 3D Viewer. But the 3D-Object i get is by far worse then that of the direct 3D-Viewer Plugin.

I also tried the segementation editor instead of using a threshold but there i would have to choose everything by hand which would take too much time.

Thank you for your Help!

Best regards

Johannes