Texture exportation: values range lost

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Texture exportation: values range lost

Post by NicolasW »

When I load an exported texture file (*.tex), the values are not in the original range anymore.
Do you know what is going on and how to prevent this automatic rescaling?

Thank you very much,
Nicolas.
User avatar
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:

Post by Olivier Coulon »

Hi Nicolas,
a texture generated by Anatomist (I supposed you fusioned a volume with a mesh or something like that) is rescaled between 0 and 1 (I think) because of the OpenGL mechanism used to create the texture. I don't think there is anything you can do about it, Denis can correct me if I'm wrong...
Two observations though :
- you can write a program that does the rescaling if you know the original range...
- are you trying to map functional data on a surface ? If yes, there is somebody working on that particular asect of things here, so hopefully there will be something available within a few months (which is probably too long to wait for in your situation).
Good luck,

Olivier
Olivier Coulon
Institut de Neurosciences de La Timone,
Aix-Marseille Université,
Marseille, france
https://meca-brain.org
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Hi Olivier,

thank you for your answer.

Actually, the final texture is not rescaled between 0 and 1:
For instance, I start from 3D data between [-3.2;+3.14] and the saved texture values are between 20.29 and 26.61, so there is at least a strange translation (and apparently not here but perhaps sometimes also a scaling) of the original values. Besides, this translation is not constant across the different textures.
I can indeed write a small program to correct this, but:
- it would imply to find a trick to estimate this varying translation and possible scaling parameters (for instance being sure to have a 0 value in node 1 of the mesh and a 1 in node 2), which prevents a more global use of the program.
- I wonder the origin of this problem

For your second point, you are right, a few months should (hopefully!) be too long for me.

Thanks,
Nicolas.
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Hi,
The exported texture range used to be rescaled between 0 and 1 in previous anatomist versions, but this has changed, and in anatomist 3 the range should be preserved. If it's not what you get, then it's perhaps a bug, but it seems to work for me. What kind of texture have you exported ? A 3D fusion (volume+mesh) ?
Denis
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Hi Denis,
yes, it is a 3D fusion texture done with anatomist 3.0.0, implying a mesh at the format *.tri and an analyze format 3D image. I tried with another SPM T-map and this rescaling happened again, with another translation value.
I can send you the mesh and a T-map if you want to try with my data?
Nicolas.
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

OK you're right, there is definitely a bug there: I have made other tests, and I also get wrong scalings when the initial range has negative values. I will look at it.
Denis
User avatar
riviere
Site Admin
Posts: 1361
Joined: Tue Jan 06, 2004 12:21 pm
Location: CEA NeuroSpin, Saint Aubin, France
Contact:

Post by riviere »

Hi,
The bug is fixed now, it will be in the next stable release update.
Denis
NicolasW
Posts: 29
Joined: Fri Mar 05, 2004 11:45 am
Location: INRIA Sophia Antipolis, France
Contact:

Post by NicolasW »

Ok, thank you Denis.
Nicolas.
Post Reply