Dear Jason,
One very direct thing you could do is:
Instead of having everything into a big jobs{} structure, you could have
different jobs and call them from a .m file.
Thus, you could have e.g. a script that would be something like:
spm_jobman('run',segmentjob);
mFile.m
spm_jobman('run',nextjob);
...
where segmentjob and nextjob would be the jobs (with the structure SPM
understands) and then you call the mFile in the middle.
Something more specific could be created that could interpret the jobs
and send them to SPM or to another application but if your main aim was
not having the user to type "mFile" after the segment job, this could be ok.
Cheers,
Juan J.
Jason Steffener wrote:
> Hello.
> I have been writing a lot of scripts that create jobs to do a lot of our analyses. I must also say that I really like the job format and am very happy with it. But I would like add "custom jobs," specifically after a job is run have an mFile execute and then proceed to the next job.
>
> An example would be to run a segment job on a T1 image, calculate total brain volume with non-SPM code write results to a file, then proceed to the next job in the stream without the user doing anything.
>
> Has anyone done this? can it be done in SPM now and I just haven't found it?
>
> One thought I have is to create my batch of jobs and have some of them be like:
> jobs{##}.custom.file = 'mFile.m'
> jobs{##}.custom.input = 'input files'.
>
> Then write a program that will take this sort of job stream and separate it into SPM jobs and custom jobs. The SPM jobs will be executed one at a time and when a custom job is found it will be run and then back to the next SPM job.
>
>
> Any other thoughts are greatly appreciated.
> Jason.
>
--
________________________________________________________
Juan J. Lull Noguera - jualulno_at_upvnet.upv.es
- [log in to unmask]
http://www.ibime.upv.es
[MI - Medical Imaging Area]
IBIME::Biomedical Informatics Group
UPV - Politechnical University of Valencia - Spain
________________________________________________________
[IM - Área de Imagen]
IBIME::Informática Biomédica
UPV - Universidad Politécnica de Valencia
________________________________________________________
"Education is the best provision for the journey to old age"
Aristotle
|