3D reconstruction form 2D slices

I’m trying to reconstruct a 3D volume from the 2D images provided in this study (image source ).
Post reconstruction, I’d like to filter only blood vessels that range from 1-10 micrometers. I hope the last part can be done in Fiji.

I could drag and drop the folder containing ~1900 images in Fiji. Next, I clicked on the 3D viewer in Plugin.
However, after this I get the following error

nFrames = 1
Exception in thread “Thread-7” java.lang.OutOfMemoryError: Java heap space
at vib.NaiveResampler.resample(NaiveResampler.java:211)
at vib.NaiveResampler.resample(NaiveResampler.java:155)
at vib.NaiveResampler.resample(NaiveResampler.java:159)
at voltex.VoltexGroup.(VoltexGroup.java:102)
at ij3d.ContentInstant.displayAs(ContentInstant.java:153)
at ij3d.ContentCreator.createContent(ContentCreator.java:106)
at ij3d.gui.ContentCreatorDialog.createContent(ContentCreatorDialog.java:200)
at ij3d.gui.ContentCreatorDialog.showDialog(ContentCreatorDialog.java:163)
at ij3d.Executer.addC(Executer.java:202)
at ij3d.Executer.access$000(Executer.java:97)
at ij3d.Executer$1.run(Executer.java:195)

3D volume is not generated though. I’ working on Windows 10, 8GB RAM , 64-bit.

Could someone suggest how to proceed from here?

1 Like

Hi @Deepa,

I would guess it’s related to a memory issue :

You could check the “Memory Option” , Edit > Options > Memory & Threads… , and increase the allowed memory
BUT I downloaded the images, and once opened a stack is in around 6Go (and you have a 8Go computer) , so I would recommend that you try to downsample your image (Image > Scale … , set 0.5 in x,y and z) and try again.

Best,

Romain

1 Like

Hi @romainGuiet,

I am working on the same problem (but in soil) and this is the image that I could make, So, I was wondering if you might know how it is possible to differentiate paths with different length in the 3D volume of soil (for example the path with length of 0-100mm, 100-200 mm, …) with different colors.
Also, is it possible to find the path with the least length from the surface (first image) to the bottom (last image) in the volume?

Thank you very much.

Esha

Thanks a lot for the response. Unfortunately, I ended up with the same error even after increasing the allowed memory to maximum of 8GB.

I have Fiji installed and working on a server. However, I could drag and drop all the .tiff files form the data folder to the Fiji interface that open after launching it (I was able to drag and drop the folder contents on my laptop).

From File -> Folder I could browse the folder with all images ( shown on left). However, I am not able to select more than one image.

Dear @Deepa,

What @romainGuiet means is that your PC cannot handle the size of your data, no matter what. Which is why it was recommended to downsample.

Regarding your new question on a server, try using File > Import > Image Sequence…
Select the first file in your folder and ImageJ should load them all.

1 Like

Once you solved your 3D display issue :smiley:, to filter 3d tubes, one way could be to use the local thickness plugin.

it will create a new image with the local thickness for each pixel, please find below a result in the 3Dviewer.

To threshold it, you can use a threshold from 1 to 10.

// Generates Local Thickness images
run("Local Thickness (complete process)", "threshold=1");

// Threshold it 
setThreshold(1.0, 10.0);
run("Convert to Mask", "method=Default background=Dark black");

Here is what I get after merging the original and the filtered images :

I will nevertheless raise a concern.
Your image has a voxel size of 1x1x1 micron, and you’re looking to keep vessels with a thickness of 1 to 10 microns, so 1 to 10 pixels.
This might introduce “artefacts” with the local thickness + thresholding , as some voxels might end up isolated. You will then have to clean them (median filtering ? morphology operation ? ). Moreover, trying to work on features that are less than 3 pixels in size can lead to errors, because this is considered undersampling.

I have to add that for the proof of principles, I downsampled your image by 4 , I have no idea how much time it will take on the original image.

Best,

Romain

1 Like

Hi @romainGuiet ,

I’m still trying to solve 3D display issue :confused: I changed the image scale to 0.5 on x,y,z. (When you say “downsampled by 4” does that mean image scale = 0.25?) Next, I clicked on 3D viewer in plugin. A little window pops up

untitled
Can I set the resampling factor to 2 ( default value)?

Many thanks,
Deepa

Hello,
Regarding the concern that you raised.

I’m relatively new to this field :no_mouth: and I am processing these files for performing fluid flow simulations. To address your concern, I read through the description given in the original article again.

I’m trying to follow the procedure outlined in the section on “Quantification of blood vessel network” in this reference. It is mentioned that the files were converted to 8-bit, median filtering was performed before importing to Imaris. ( Unfortunately, I don’t completely understand why this has to done.)

From what I understand, you are right, I must clean them to remove artefacts. However, I am not sure how this has to be done.

It’s exactly that!

I prefer to downsample the image before and use resampling factor = 1 within 3Dviewer.

me neither :sweat_smile:

Hi @Esha,

your question is similar yet a bit different. You might have a look to BoneJ.

Best,
R

Hi,
Instead of setting the scale to 0.25 after loading all the images (File -> Import -> ImageSequence),
can I use the Increment tab in Sequence Options window (please refer to the below image) that pops
up after selecting the first image in the input folder.


For instance, can Increment be set to 4 (load every fourth image)?

I’m not sure how the “Scale Images” functionality in this tab is different from Images -> Scale.

Thanks a lot for the support
Deepa

Hi Deepa,
This would rescale only in Z unfortunatetly.
Best,
R

I could Use the local thickness plugin and obtain the following

In the left-bottom tab presented in the above image, I’ve changed 128 to 1.

I used Image -> Adjust -> Threshold ( set 1 to 10) .
untitled
After clicking ‘Apply’ the following is set in the little window that pops up.

But this changes the colored slices ( created after running local thickness (complete process)) to white again. Am I missing any step?

Update: Also, the 3D that I obtain after the above step has broken fragments


Thanks,
Deepa

Could you please explain what the green and reg colored regions represent?

I used “Image>Color>Merge Channels”, using the original stack (as red) and the “local thicknes + threshold 1-10” (as green), the the “merge” is displayed in the 3D viewer.

Regarding your other question :

Indeed the thresholding on the local thickness produces a “binary image”(often call mask) and keep only pixels in the defined window (1-10) for exemple.
If you want to filter and “keep” you can re-use this mask image, and the “Image Calculator” (multiply the local thickness and mask, select 32 bit option )

Best,

Romain

I’m really sorry. I couldn’t understand how the 3D image presented below the above line was created.