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
Number of time steps in texture
- 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
Centre MEG/EEG - LENA-UPR640 CNRS
Ph.: 33 (0)1 42 16 14 16
Ph.: 33 (0)1 42 16 14 16
- riviere
- Site Admin
- Posts: 1361
- Joined: Tue Jan 06, 2004 12:21 pm
- Location: CEA NeuroSpin, Saint Aubin, France
- Contact:
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
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
- Yann Cointepas
- Posts: 316
- Joined: Tue Jan 20, 2004 2:56 pm
- Location: Neurospin, Saint Aubin, France
- Contact:
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' )