Number of time steps in texture

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
User avatar
schwartz
Posts: 26
Joined: Mon Mar 08, 2004 9:12 am
Location: Pitié-Salpêtrière - Centre MEG/EEG
Contact:

Number of time steps in texture

Post by schwartz »

Hello all,

I need to get the number of time steps in a given texture in a BrainVisa process, I tried ma_texture.objectInfo() but the output contains everything except number of time steps ( :cry: ). I can use AimsFileInfo and parse the output to get nb_t_pos but do you have a "cleaner" way to that with Anatomist.py ?

Cheers,

Denis
Centre MEG/EEG - LENA-UPR640 CNRS
Ph.: 33 (0)1 42 16 14 16
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 Denis,

Well... BrainVisa has a bit too much focused on 3D/4D volumes at the moment...
objectInfo() is not what you want: it is a method of wrapped objects in Anatomist.
DiskItem.attributes() contains attributes coming from the database, and possibly from file headers information, but only for volumes at the moment. We must extend this system to meshes, textures and so on, but it's not done yet.
Anyway such information is read by BrainVisa by calling AimsFileInfo, so the result is the same as what you already get. But you're right: the parsing should be centralized in a single place, like what is done in aimsVolumeAttributes() (in shfjGlobals.py). In fact we should extend this function to other object types (and rename it, maybe to aimsObjectAttributes()).

Denis
User avatar
schwartz
Posts: 26
Joined: Mon Mar 08, 2004 9:12 am
Location: Pitié-Salpêtrière - Centre MEG/EEG
Contact:

Post by schwartz »

hi denis,

OK, I'll use the output of AimsInfo, the parsing is fairly simple to do anyway !

thanks,

Denis
Centre MEG/EEG - LENA-UPR640 CNRS
Ph.: 33 (0)1 42 16 14 16
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

I created a function to parse the result of AimsFileInfo and get a dictionary.

Code: Select all

import shfjGlobals

dict= shfjGlobals.aimsFileInfo( '/tmp/titi.ima' )
User avatar
schwartz
Posts: 26
Joined: Mon Mar 08, 2004 9:12 am
Location: Pitié-Salpêtrière - Centre MEG/EEG
Contact:

Post by schwartz »

Just tested it ! thank you very and Merry Christmas !

Denis :D
Centre MEG/EEG - LENA-UPR640 CNRS
Ph.: 33 (0)1 42 16 14 16
Post Reply