Hi,
I am trying to do some rendering using MarsAtlas and when I open the volume, on the "line" between two parcels, the color is interpolated as shown on this image:
I have unchecked the option "interpolation on volumes" in anatomist, settings, preferences, volumes but doesn't change anything.
Is there an option to remove this interpolation somewhere?
and I have another question,
If I want a "red line" to delimitate MarsAtlas parcels (or any other parcelation) is there an option for that or not ?
I guess not.
anatomist texture rendering no interpolation
- Olivier Coulon
- Posts: 176
- Joined: Fri Feb 27, 2004 11:48 am
- Location: MeCA research group, Institut de Neurosciences de La Timone, Marseille, France
- Contact:
Re: anatomist texture rendering no interpolation
Hello,
I m sorry but I don't see the problem with the interpolation ? It is displayed as it should to me... Nevertheless, the MarsAtlas viewer is setup to display like this. You're only option to change the texture interpolation is, in the main Anatomist window, to right click on the mesh+texture fusion, select 'color -> texturing' in the contextual menu, and unclick 'RGB space interpolation'.
About the red lines between parcels there is nothing like that in BrainVisa, sorry...
Olivier
I m sorry but I don't see the problem with the interpolation ? It is displayed as it should to me... Nevertheless, the MarsAtlas viewer is setup to display like this. You're only option to change the texture interpolation is, in the main Anatomist window, to right click on the mesh+texture fusion, select 'color -> texturing' in the contextual menu, and unclick 'RGB space interpolation'.
About the red lines between parcels there is nothing like that in BrainVisa, sorry...
Olivier
Olivier Coulon
Institut de Neurosciences de La Timone,
Aix-Marseille Université,
Marseille, france
https://meca-brain.org
Institut de Neurosciences de La Timone,
Aix-Marseille Université,
Marseille, france
https://meca-brain.org
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: anatomist texture rendering no interpolation
Hi,
As Olivier said, the best simple option is to use RGB interpolation on label textures, but I think this is already done in your snapshot. OpenGL always performs interpolation, so using sharp edges to regions would require to duplicate mesh vertices at regions boundaries, and a texture with additional values for these duplicated vertices. So it would end up with a different mesh, requiring different textures. It would be feasible but thus would involve some complications for the user to manipulate them.
For your second question: is it possible to have a red line making regions boundaries, yes it is possible, but it's not directly integrated in Anatomist (yet). It can be done in a little python script, which will generate a wireframe mesh corresponding to the boundaries.
The python script would look like this:
To run the script, use the python within the BrainVisa distribution:
Running this script will write a "marsatlas_boundaries.mesh" file, that you can load in Anatomist and display in a 3D view, which can be the one displaying the textured mesh.
We could think of including this functionality in Anatomist for label textures, to avoid the need to running a little script...
Denis
As Olivier said, the best simple option is to use RGB interpolation on label textures, but I think this is already done in your snapshot. OpenGL always performs interpolation, so using sharp edges to regions would require to duplicate mesh vertices at regions boundaries, and a texture with additional values for these duplicated vertices. So it would end up with a different mesh, requiring different textures. It would be feasible but thus would involve some complications for the user to manipulate them.
For your second question: is it possible to have a red line making regions boundaries, yes it is possible, but it's not directly integrated in Anatomist (yet). It can be done in a little python script, which will generate a wireframe mesh corresponding to the boundaries.
The python script would look like this:
Code: Select all
from soma import aims
mesh_filename = 'brain_mesh.gii'
regions_texture_filename = 'marsatlas_regions.gii'
boundaries_filename = 'marsatlas_boundaries.mesh'
mesh = aims.read(mesh_filename)
regions_texture = aims.read(regions_texture_filename)
boundaries = aims.SurfaceManip.meshTextureBoundary(
mesh.surface(), regions_texture, -1)
boundaries.header()['material'] = {
'diffuse': [1., 0., 0., 1.],
'line_width': 3,
}
aims.write(boundaries, boundaries_filename)
Code: Select all
<brainvisa_dir>/bin/bv_env python the_above_script.py
We could think of including this functionality in Anatomist for label textures, to avoid the need to running a little script...
Denis
Re: anatomist texture rendering no interpolation
thanks.
for the boundaries, the code make an error:
"*** AttributeError: 'AimsTimeSurface_3_VOID' object has no attribute 'surface'"
but it works fine if I do: (without the .surface())
for the boundaries, the code make an error:
"*** AttributeError: 'AimsTimeSurface_3_VOID' object has no attribute 'surface'"
but it works fine if I do:
Code: Select all
boundaries = aims.SurfaceManip.meshTextureBoundary(mesh, regions_texture, -1)
Re: anatomist texture rendering no interpolation
it worked fine on the Lwhite Lwhite_marsatlas.
but it doesn't work on the inflatedLwhite Lwhite_maratlas.
I don't get it ...- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: anatomist texture rendering no interpolation
It should work exactly the same way. Are you sure you have used the script using compatible mesh and ROI texture ?
(anyway the inflated mesh should have the same structure as the non-inflated one, so it should work using the same marsatlas texture)
Denis
(anyway the inflated mesh should have the same structure as the non-inflated one, so it should work using the same marsatlas texture)
Denis
Re: anatomist texture rendering no interpolation
i know it should work exactly the same 
yes mesh and roi texture are compatible as you can see on the second picture, the left side, the fusion between the inflated mesh and mars atlas texture worked well. I am using the same marsatlas texture for the inflated one and the non inflated one. for the fusion it works perfectly. but not for the boundaries generation.

yes mesh and roi texture are compatible as you can see on the second picture, the left side, the fusion between the inflated mesh and mars atlas texture worked well. I am using the same marsatlas texture for the inflated one and the non inflated one. for the fusion it works perfectly. but not for the boundaries generation.
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
Re: anatomist texture rendering no interpolation
Could you send me the mesh and texture so that I can look at it?
Re: anatomist texture rendering no interpolation
so solved, as you find, another process modified the .gii and I didn't notice it ... sorry