Page 1 of 1

visualize pictures

Posted: Fri Jun 30, 2006 2:38 pm
by richards
Hi,

Is there a Vip or Aims command that allows to directly visualize a GIS picture, for example an axial window, without running the software Anatomist ?

Posted: Fri Jun 30, 2006 6:13 pm
by riviere
Why would you need to visualize an image without anatomist ? To make a kind of batch which would run automatically ? Anatomist can do that: it can be remote-controlled via a pipe or a network socket connection. That's how BrainVisa uses it. Look at the (french) help pages, in "programming/commands".
Denis

Posted: Mon Jul 03, 2006 10:55 am
by richards
It's in order to visualize the picture from a script, without running directly Anatomist.

Posted: Mon Jul 03, 2006 11:17 am
by Yann Cointepas
Well, you cannot do that without running Anatomist but you can use Anatomist from a script. For example if you create the following text file (let's call it openAxial.ana) replacing <filename> by an image file name:

Code: Select all

*BEGIN TREE EXECUTE
*BEGIN TREE LoadObject
filename    <filename>
res_pointer 1
*END
*END

*BEGIN TREE EXECUTE
*BEGIN TREE CreateWindow
res_pointer 2
type        Axial
*END
*END


*BEGIN TREE EXECUTE
*BEGIN TREE AddObject
objects 1
windows 2
*END
*END
You can use the following command to display the image:

Code: Select all

anatomist openAxial.ana

Posted: Mon Jul 03, 2006 12:00 pm
by richards
ok i'll try it thant you !

Posted: Mon Jul 03, 2006 12:09 pm
by richards
I have tried this on a script:

#!/bin/bash

if [ ! $brainvisa ]; then
brainvisa=/home/richards/brainvisa/SHFJ_pack-stable-linux-3.0.2/bin
fi

if [ ! $anatomist]; then
brainvisa=/home/richards/brainvisa/SHFJ_pack-stable-linux-3.0.2/bin
fi

$anatomist openAxial.ana

with openAxial.ana = :
*BEGIN TREE EXECUTE
*BEGIN TREE LoadObject
filename irm
res_pointer 1
*END
*END

*BEGIN TREE EXECUTE
*BEGIN TREE CreateWindow
res_pointer 2
type Axial
*END
*END


*BEGIN TREE EXECUTE
*BEGIN TREE AddObject
objects 1
windows 2
*END
*END

But i get on the terminal the following message:
test_ana: line 19: openAxial.ana: command not found

Posted: Mon Jul 03, 2006 1:04 pm
by Yann Cointepas
$anatomist is not defined in your script.

Posted: Mon Jul 03, 2006 1:10 pm
by richards
the lines "
if [ ! $anatomist]; then
brainvisa=/home/richards/brainvisa/SHFJ_pack-stable-linux-3.0.2/bin
fi'

don't define "$anatomist" ? isn't it enough ?

Posted: Mon Jul 03, 2006 1:19 pm
by richards
It's ok I have solved my problem you were right my "$anatomist" were not correctly defined

Thank you very much for the tips !!