Trouble separating bone from soft tissue in uCT counterstained image stack

Hi Team,

First post here! I’ve searched around and can’t find anything on this so here goes.

About the dataset:
-Micro CT analysis images of mouse hind limb counterstained with a staining agent to image soft and hard tissue
-80 image stacks of 445 images per stack.
-Attached are 4 example images from a stack with the first (153) and last (597) images from the stack and two images in the middle. (First is attached, the rest is on dropbox via link (may take a bit to upload if you’re quick on the response): https://www.dropbox.com/sh/rj0q15lqsm1dqgc/AACKVvs8Ce-8YxpYMNFvFexka?dl=0)

About the analysis:
We wish to measure the amount/volume of soft tissue in the image stack, and hopefully (due to the stain having 100% penetrance) derive some information about muscle quality from stain intensity. We then wish to analyse the bone, likely using BoneJ or analyzepro

About the problem:
The counterstain has worked too well! Upon attempt of analysis, I can’t find a reliable way (aside from roi selection of every image by hand which is not feasible… 80*445) to seperate out soft from bone tissue. I have tried thresholding on a number of programs inc. AnalyzePro and Fiji but to know avail. Tech support from Analyze pro say it can’t be done via thresholding.

Questions
Is there a way to select an ROI by hand say every 50 slices and have ImageJ/FIJI automatically join up the ROI’s?
If so, does BoneJ allow this method for analysis within its parameters?
If not, any ideas? :thinking::confounded:

Thank you in advance to anyone that is willing to assist!

V112M1__IR_rec00000153.bmp (5.7 MB)
<a class=“attachment”

Hello jsorensen,
Being very energy conscience (lazy), I’ll describe a rather simple way do possibly do what you require.
First go to Image > Adjust > Brightness/Contrast using Auto.
Apply a LUT to the images, I suggest either Spectrum, Physics or Royal all are good for this technique. Then Plugins > Utilities > Capture Image. This will give you RGB images in return, then go to Image > Color > Split Channels and choose which works for you.
Hope this helps, if not ask some more. We’re always open,
Bob

Hi Bob, Thank you for your response and I echo you’re energy conscientiousness! Unfortunately and regardless of which LUT I applied to the images, I failed to be able to threshold a difference between the hard and soft tissue. There were some LUT’s than enabled a slight threshold difference between the compact bone and the soft tissue though this was a very small difference and only around 10% of the pixels of the bone.

Any other ideas? I appreciate the help!

Well Hello again jsorensen,
In the interest of Energy Conservation I am attaching a mask which fits your reference images. Using Process > Image Calculator subtract this mask from your image stacks. This will eliminate the radial lines around the images, which may cause some of the LUT confusion.
mask

I have brains I haven’t even used yet (ever), so here we go, After you clean a stack of images with the mask make a complete copy of the stack. Then use Edit > Invert on the copied stack, then back to Process > Image Calculator. With the original images in Image 1 and the Inverted images in Image 2 use the operation ‘Difference’. This will give you a image stack with effectively twice the dynamic range of the originals, again try the LUT trick again.
Now I am not a Biologist so I do not know what is bone and what is soft tissue, so if you still cannot accomplish what you wish just send an image with reference markings and we will try something else. What you want to do is not impossible, we just have to determine the best way to accomplish it, without wasting any undo Energy.
Bob

Hi Bob,

Thanks again for your time! I really appreciate it. I’ve gone through and done what you suggested. The inverse and difference step worked well (attached fig 1), there is a difference between theborder of the bone and the muscle now though the LUT’s ontop of that did not help (fig 2,3). I’ve added an annotated version so you (and others) can see what I’m aiming for. Do you think the difference between the bone and muscle in the step (fig 1) would be enough to measure the difference in volume between the bone, muscle and fat?

Oh, yes! We haven’t even attempted smoothing or applying math yet.
I’ll get back to you soon with several more suggestions. How many of these images do you have to process, if I may ask?
Bob

I love that, sounds exciting! (Getting my geek on).

I have stacks of 445 images, with approx 80 stacks. (80 animals, 445 image slices in region of interest of each animal leg).

jsorensen,
The following procedure worked well for reference image #2,
The values I determined were Air @ 41.5, Body of bone @ 162, outer air @ 70, bone border @ 33-255 & range 222, Fat @ 89.2-0 =range
Therefore the procedure I used were: Subtract Air with Process> Math> Subtract 41.5 followed by Process> Filter> Gaussian blur @ 3 then Image> Adjust> Brightness/Contrast with Auto setting and finally with LUT> Physics (or whichever you prefer)



That was for the Image view itself. In order to get the Data you want you could use the ‘Magic Wand’ tool set for a range of 62 for meat and bone and range of 22 for fat. You will have to make adjustments for each separate image, but the procedure will be the same. Use Analyze> Measure to get the data. And you could also again use the splitting of the color channels to make the use of the ‘Wand’ tool easier. That should all give you the data, visualization you want and keep you busy for awhile. Hope it helps, now I will try to determine the best way to make the process into a macro. It sounds as though you will need it.
Bob

Bob, you are a wizard! Thank you, this is amazing :slight_smile:

I’ve given it a go and it works a majority of the time which is excellent. You’ve really helped me out! This will definitely keep me busy for a while. I’ll get cracking, though if you do feel a macro would be within your reach, I would be forever grateful! Further, these data will be used in publications in the future, if I send you my email (and you wanted to) it’d be good to have your name to appropriately acknowledge you in future publications and presentations. Although I’m sure smith_robertj (aka. bob) would look fine on a top tier journal.

Also, my apologies for the delay in response, phd by night and md by day makes time quite limited. But my delay in response has no relation to the level of how appreciative I am for your help.

Hello jsorensen,
I’ll go ahead on the macro, you stay up with your studies and don’t get hooked on coffee.
You won’t need to acknowledge me in any paper. I do this for fun.
Bob

1 Like

Hi Bob,

Thank you! And you’re right, I should probably remove the permanent coffee IV line I have in my arm :expressionless:

Thanks again!

Hello again,
I apologize for taking so long, but these images are not lending themselves well to macros. I will continue working on it but don’t let this slow you down either, just watch the coffee.
Bob

Hi Bob,

Thanks for the update! I’ve started to process the images manually but good to know that there may still be a chance for a macro! I really appreciate your work regardless of the outcome

James