Remove part from MRI


i have mri image of the head, and there is some parts at top of it, i want to remove this part and save the image again in nifti format

any help regards this

Hi @fati3li,

Welcome to the forum.

Unfortunately, while Fiji can read Nifti files, it can not write them at the moment.
In the past, I’ve had success using mipav and 3d slicer for writing nii files - I recommend giving those a try if you need to output as Nifti.

Cheers, and good luck,

1 Like

thanks a lot john;

i will check them … but the thing is that i was able to save the file as .nii but without the cleaning i made using the 3d viewer

That’s interesting. What did you do exactly (in ImageJ) to save the file?

1 Like

there is a plug-in you can download it and use it from imagej website

This one?

1 Like

yes this is it !

i tried to use the 3d slicer but i didnt know how to remove the pat without affecting the others

That’s a neat plugin, though for the first image I tried, it threw away some of the header information, specifically Right-Left / Inferior-Superior / etc. So do be careful.

Back to your original question:
It sounds like you just want to crop the image. Try Plugins > Stacks > Crop3D.
There’s documentation here.

1 Like

Thanks a lot . Is there anyway to segment it the same way?

I’m not sure what you mean, exactly.[quote=“fati3li, post:9, topic:6164”]
Is there anyway to segment it the same way?
The same way as what?

Consider posting an example image - that usually is helpful when explaining what you’d like to do.

Hello @bogovicj and @fati3li,

Regarding the saving of Nifti files, I normally use NRRD format, which is commonly readable as well by all MRI software.

thanks a lot both for your help

this is the image in 3d and I have selected the area that I don’t want

If you don’t mind doing it manually, you can use the 3D viewer for that:

  1. Select the volume:

  2. Draw a selection on it:

  3. Right click on top of it and then click on “Fill selection”:

The original stack also gets cleaned up:

1 Like

This is what I did at the beginning but when I save it it does not save the changes

Are you sure you did it right? I just tried and the brain image was saved with the hole on it.

yes it shows a message saying " object must be loaded with resampling factor1"

what does this mean

I don’t get that message. Can you explain the steps you took? What I do is, after filling the section, select the window with the input image (t1-head.tif in my example) and then in Fiji I click on File > Save as > Tiff… (or whichever format you want).

I did the exact same too, but I’m not sure which window? you mean the 3d view window? or the stack window? I tried both and now I’m having dought that i’m selecting it in a wrong way!

thanks a lot iarganda

Once you have removed (filled with black) the part that you selected in the 3D viewer, it will appear also black in the original image stack. Then you just need to select that image and save it.

yea it is not updated in the stack, thats the thing! anyway when i tried to make it slice by slice i get something like a hole in th eskull! how can i fix this … either with 3dslice or with imagej … i just wanted to remove these annoying metals so it doesnot affect my segmentation later on