visualize pictures

Questions about Anatomist manipulation

Moderators: denghien, riviere

Post Reply
richards
Posts: 21
Joined: Mon Jun 12, 2006 3:21 pm

visualize pictures

Post 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 ?
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 »

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
richards
Posts: 21
Joined: Mon Jun 12, 2006 3:21 pm

Post by richards »

It's in order to visualize the picture from a script, without running directly Anatomist.
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post 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
richards
Posts: 21
Joined: Mon Jun 12, 2006 3:21 pm

Post by richards »

ok i'll try it thant you !
richards
Posts: 21
Joined: Mon Jun 12, 2006 3:21 pm

Post 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
User avatar
Yann Cointepas
Posts: 316
Joined: Tue Jan 20, 2004 2:56 pm
Location: Neurospin, Saint Aubin, France
Contact:

Post by Yann Cointepas »

$anatomist is not defined in your script.
richards
Posts: 21
Joined: Mon Jun 12, 2006 3:21 pm

Post 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 ?
richards
Posts: 21
Joined: Mon Jun 12, 2006 3:21 pm

Post 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 !!
Post Reply