Command AimsFileInfo

Questions about BrainVisa usage and installation

Moderators: denghien, riviere

Post Reply
quere
Posts: 54
Joined: Mon Mar 28, 2005 10:50 pm

Command AimsFileInfo

Post by quere »

Hello,
I would like to be able to recover the output of the system command context.system(' AimsFileInfo' - v...) in a file .txt under Windows. Do you know how to do?

Thanks
Aurelie :lol:
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 Aurélie,

Curently, context.system() doesn't allow to retreive commands outputs. For this you have to use one of the os.popen*() functions.

Denis
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

You can also directly use the aimsFileInfo function that does what you want to do and returns a dictionary:

Code: Select all

import shfjGlobals

info = shfjGlobals.aimsFileInfo( '/data/image.ima' )
print info[ 'volume_dimension' ]
Post Reply