I decided to use a Slicer in order to make a brain atlas conversion.
I exported a brain atlas which includes different brain areas with Neurolucida as .obj + .mtl file.
I need to convert that atlas into nifti (.nii) format in order to read it with an MRI imaging called NORA.
Could you please help me how to do it?
What I tried is:
importing .obj as a model
importing .mtl as a volume
Problem: I do not see different brain areas, the whole brain is gray
Problem: I do not see a .nii format when I click the export button.
Hope somebody could navigate me through the exporting process.
Wish you all the best,
Lara
Is each brain area stored with a different material? Can you share a sample data set?
Currently, a single obj file is always loaded as a single segment, so you would need to split it into separate mesh files before you export it or write a short Python script in Slicer that splits the mesh based on material ID.
Thank you for the answer! I saved the whole model as a single .obj accompanied with a single material. I will follow your advice on saving each segment separately! Thanks for the explanation.
The most robust way to convert a mesh to an image is to import it into segmentation and export it to a labelmap image. You can find these conversion options in data module if you right-click the data node.
I exported each segment as separated nifti, however I lost parameters of orientation and size in the nifti header.
I believe I lost the parameters while importing the .obj into Slicer. Obj file is accompanied with .mtl, but I could not import the .mtl into as a scalar overlay.
Could you please help me to re-define the size and orientation?
Physical size and orientation of the labelmaps are correct. Probably you only checked the voxel coordinates. If you want the labelmap in a specific physical geometry (origin, spacing, axis directions, extents) then export using Segmentations module and specify a reference volume.
I found where the problem was - the exported property of Image Spacing was defined in wrong units thus it was read as 2.4 instead of 0.024 in a slicer (Model was exported with Neurolucida in case other user finds the same obstacle).
Finally my histology image (image I worked with in Slicer) was the same size as the MRI image.
Now I ran into another trouble - my histology image has more z slices than the MRI so I cannot superimpose them. Is there a way to down-sample the z direction of the nii image in Slicer?
Superimposing histology and MRI in Slicer should be no problem, regardless of the size or resolution of the images, as both images are displayed in the physical coordinate system. Do you mean that you would like to superimpose the images in some third-party software that ignores physical coordinate system information?
Thank you for your help again!
Yes, I used a third party software for alignment after exporting the model from Slicer. The problem is in the third-party software I used. I tried the same in slicer and it worked perfectly. Thank you for leading me through the process. I am very grateful.