Expand meshes keeping the center of gravity, ImageJ

Hi experts
I have searched for a while for a way to expand 3D objects, keeping the shape and center of gravity and finally kind of gave up/realized my lack of ingenuity and posted it here. I need to create an expanded 3D mask from one channel to measure the amount of signal in another. I tried normal dilations but these deform completely the shapes in 3D making everything round. There is an option to keep the shape when expanding, but this only works in 2D. I thought of getting the meshes for the 3D masks with the centers of gravity for each object and although I don’t know how to do this, I beforehand have realized that it exceeds my current skills. Asked around but got no great solutions. Anyone? (Thanks in advance!)

@tbraunstein,

Happy first forum post!

It sounds like what you want is to apply a spatial transformation to your mask (not to apply a pixel-wise operation to it).

Example, scale this funny shape by a factor of 1.5 about its center,
left is original, right is scaled:

image

Here’s a script that will compute the center of mass of your mask, and scale it about its center:

Save it to your computer, open with fiji, and hit run. Learn more about scripting here

Let me know if you have any questions,
John

1 Like

Wow! Thanks - it looks exactly as the solution I looked for! I’ll try it and let you know if I have problems.

Best, Thomas

1 Like