Page 1 of 1
Referentiel CACP and Title in Anatomist window
Posted: Thu Jul 21, 2005 4:53 pm
by quere
Hello
I would like to display my object in a CACP referentiel. How can I do this?
Furthemore, I would to put a title in the Anatomist window. So which fonction I have to use?
Thanks
Aurélie
Posted: Thu Jul 21, 2005 5:21 pm
by riviere
Hi,
For AC-PC referential, there's a commandline AimsTalairachTransform that should do the job: it outputs a transformation file that you can load in anatomist.
For the windows titles, it's not possible currently using the standard brainvisa interface. It may be possible using the new python bindings, but this project is just beginning, nothing is documented and everything may change so we don't encourage people to use them yet: it's a bit too early.
Denis
Posted: Fri Jul 22, 2005 3:01 am
by quere
Hello!!
Thank you for your answer. But is it possible that you give me an example of the command system AimsTalairachTransform?
Because I tried this:
context.system( 'AimsTalairachTransform', '-ac', '(xac,yac,zac)', '-pc','(xpc,ypc,zpc)','ihp','(xihp,yihp,zihp)','-o','C:\toto' )
But it didn't run
Thanks
Aurélie
Posted: Sat Jul 23, 2005 10:40 pm
by riviere
Hi,
Every Aims command providea at least a basic help: run it with the -h option.
AimsTalairachTransform takes as input a .apc file (the one created using the PrepareSubject process in BrainVisa), not directly coordinates.
Denis
Posted: Mon Jul 25, 2005 3:41 pm
by quere
Hello
I tried to execute this command:
context.system( 'AimsTalairachTransform', '-ac', 'C:\users\toto.APC' , '-pc','C:\users\toto.APC','ihp','C:\users\toto.APC','-o','C:\toto',-m, 'C:\users\mask_toto.mesh')
But I have this error:
Abnormal program termination
Could you help me please
Aurélie
Posted: Mon Jul 25, 2005 9:05 pm
by riviere
Hi,
The option for the .apc file is '-apc' and it should be given only once (the .apc file contains the 3 points). Didn't you get a more precise error message in the log ?
Just read the help !
Otherwise I have never tried this command on Windows (but why should it fail?)
Denis
Posted: Wed Jul 27, 2005 10:01 pm
by quere
Hello
I solved my problem. In fact, the command AimsTalairachTransform -apc doesn't run on the version 2.13, so I download the last version and now it's running.
Thus I generated an output file 'transfTal', but which command I have to apply to display an object in this referential!!!
Futhemore, I would like to know which is the difference if you put the mask or not.
Thanks
Aurélie
Posted: Thu Jul 28, 2005 11:21 am
by Manik
Hi,
if you want to use the transformation file in a BrainVisa process, you can do something like this :
Code: Select all
a = anatomist()
mri = a.loadObject("myMRI.ima") # Default referential = a.centralReferential
window = a.createWindow("3D")
talairachRef = window.assignNewReferential()
a.loadTransformation(origin = a.centralReferential() , destination = talairachRef, filename = "myTransformation.trm")
Posted: Thu Jul 28, 2005 7:02 pm
by riviere
Hi,
Yes, Manik is right. I just want to add a precision: if you load in anatomist objects that are given as DiskItems (process parameters), brainvisa might automatically load a referential and a transformation going with it (and is sometimes wrong because this system is not well designed and has to be re-written). In this case, the object referential is not the central one a.centralReferential(). So it's safer to override it:
Code: Select all
mri = a.loadObject(self.input_image) # self.input_image is a process parameter
mri.assignReferential( a.centraReferential() ) # force mri to be in central ref
# then do the rest as Manik said
Another precision: I had never used AimsTalairachTransform up to now (I didn't write it myself), I just had to use it today and I realize it doesn't give the same coordinates as we were used to in the rest of Aims/anatomist/brainvisa. So I don't really know what do this coorddinates represent (SPM-like Talairach coords? I will figure out soon). However I guess they should be aligned with AC-PC.
Denis