Hello,
in addition to what Volkmar said, please do try the updated version I
sent to you on July 2. I will send it to you again in a minute. The
error, again, is from trying to display the generated image which is
either not generated (possibly my fault) or not accessible (not my fault
;) The updated version should at least not error out on encountering
this problem so you can see what files are generated in the end. Let us
know how you fared.
Cheers
Marko
Stef Meliss schrieb:
> Hi Marko, hi Volkmar,
>
> Thanks for your helpful input!
>
> I tried the template generation in batch mode as well as calling the
> function directly. It seems that the TPM generation works fine (it saves
> a mw_com_prior_*.nii file with 6 tissues), but that the problems occurs
> when creating the T1 image (nothing saved at all).
>
> Following Volkmar’s suggestion, I made sure that there are no spaces in
> any directories and used the COM toolbox directory. But still, there is
> this error message:
>
> *Hello stefaniemeliss, welcome to mw_com_gen...*
>
> **
>
> * ... checking provided data file
> mw_com_predictors_HPK_unified-segmentation from
> /Users/stefaniemeliss/Dropbox/Matlab/spm12/toolbox/com_toolbox, please
> wait...*
>
> * ... thank you for providing data for 158 subjects with 4
> predictors each...*
>
> * ... trying to start a parallel pool, please wait...*
>
> * ... processing tissue class 1/6, please wait...*
>
> * ... processing tissue class 2/6, please wait...*
>
> * ... processing tissue class 3/6, please wait...*
>
> * ... processing tissue class 4/6, please wait...*
>
> * ... processing tissue class 5/6, please wait...*
>
> * ... processing tissue class 6/6, please wait...*
>
> * ... processing T1 data, please wait...*
>
> * ... saving averaged tissue classes to a single prior file, please
> wait...*
>
> *Error using spm_vol>spm_vol_hdr (line 80)*
>
> *File
> "/Users/stefaniemeliss/Dropbox/Matlab/spm12/toolbox/com_toolbox/mw_com_prior_Age_0074.nii"
> does not exist.*
>
> **
>
> *Error in spm_vol (line 61)*
>
> * v = spm_vol_hdr(deblank(P(i,:)));*
>
> **
>
> *Error in spm_check_registration (line 34)*
>
> *if ischar(images), images = spm_vol(images); end*
>
> **
>
> *Error in mw_com_gen (line 1110)*
>
> * evalc('spm_check_registration(name(2:end,:));');*
>
> There were no problems creating the Dartel template (output contains the
> expected 6 template files with 2 tissues each), so I would conclude that
> my input data is in correct format etc.
>
> If you could send me the file you mentioned, I could give it another
> try. Unfortunately, I did not receive the file.
>
> Cheers,
>
> Stef
>
> *From: *Marko Wilke <[log in to unmask]>
> *Date: *Monday, 2 July 2018 at 10:02
> *To: *Stef Meliss <[log in to unmask]>, "[log in to unmask]"
> <[log in to unmask]>
> *Subject: *Re: [SPM] VBM in a longitudinal paediatric sample
>
> Hi Stef,
>
> sorry, I was out of office for a few days. I don't quite see why this
>
> happens - have you tried to call the functions directly as described in
>
> the manual? In either case, the error seems to stem from spm_vol which
>
> is called by spm_check_registration which only wants to show you the
>
> images. There may be an issue with doing this remotely or with
>
> -nodisplay which is why I already put this call to
>
> spm_check_registration into a try, ... end; wrapper in the latest
>
> version of mw_com_gen, which I will send to you in a minute. Try this
>
> one and see what happens.
>
> Cheers
>
> Marko
>
> Stef Meliss schrieb:
>
> Hello Marko,
>
> Thanks again for your explanations and suggestions.
>
> We tried to use COM to produce an age-specific TPM and T1 image.
>
> However, running this code
>
> %% TPM and T1
>
> spm('defaults','fmri');
>
> spm_jobman('initcfg');
>
> matlabbatch{1}.spm.tools.com_cfg.predicts = {'/Volumes/DATA
>
> UOR/HippoKid/Templates
>
> etc./mw_com_predictors_HPK_unified-segmentation.mat'};
>
> matlabbatch{1}.spm.tools.com_cfg.domean = 1;
>
> matlabbatch{1}.spm.tools.com_cfg.smooth = 2;
>
> matlabbatch{1}.spm.tools.com_cfg.wsmooth = -1;
>
> matlabbatch{1}.spm.tools.com_cfg.mrf = 0;
>
> matlabbatch{1}.spm.tools.com_cfg.SANLM = 0;
>
> matlabbatch{1}.spm.tools.com_cfg.outd = '/Volumes/DATA
>
> UOR/HippoKid/Templates etc.';
>
> matlabbatch{1}.spm.tools.com_cfg.outf = 2;
>
> spm_jobman('run',matlabbatch);
>
> Resulted in the following error:
>
> Hello stefaniemeliss, welcome to mw_com_gen...
>
> ... checking provided data file
>
> mw_com_predictors_HPK_unified-segmentation from /Volumes/DATA
>
> UOR/HippoKid/Templates etc., please wait...
>
> ... thank you for providing data for 158 subjects with 4
>
> predictors each...
>
> ... processing tissue class 1/6, please wait...
>
> ... processing tissue class 2/6, please wait...
>
> ... processing tissue class 3/6, please wait...
>
> ... processing tissue class 4/6, please wait...
>
> ... processing tissue class 5/6, please wait...
>
> ... processing tissue class 6/6, please wait...
>
> ... processing T1 data, please wait...
>
> ... saving averaged tissue classes to a single prior file, please
>
> wait...
>
> Failed 'Cerebromatic Toolbox'
>
> Error using spm_vol>spm_vol_hdr (line 80)
>
> File "/Volumes/DATA UOR/HippoKid/Templates
>
> etc./mw_com_prior_Age_0074.nii" does not exist.
>
> In file "/Users/stefaniemeliss/Dropbox/Matlab/spm12/spm_vol.m" (v5958),
>
> function "spm_vol_hdr" at line 80.
>
> In file "/Users/stefaniemeliss/Dropbox/Matlab/spm12/spm_vol.m" (v5958),
>
> function "spm_vol" at line 61.
>
> In file
>
> "/Users/stefaniemeliss/Dropbox/Matlab/spm12/spm_check_registration.m"
>
> (v6245), function "spm_check_registration" at line 34.
>
> In file
>
> "/Users/stefaniemeliss/Dropbox/Matlab/spm12/toolbox/com_toolbox/mw_com_gen.m"
>
>
> (???), function "mw_com_gen" at line 1110.
>
> In file
>
> "/Users/stefaniemeliss/Dropbox/Matlab/spm12/toolbox/com_toolbox/tbx_cfg_com.m"
>
>
> (???), function "com_run_tbx" at line 154.
>
> The following modules did not run:
>
> Failed: Cerebromatic Toolbox
>
> Do you have any thoughts on this? That would be very helpful!
>
> Best regards,
>
> Stef
>
> On 18/06/2018, 08:08, "Marko Wilke"
> <[log in to unmask]
> <mailto:[log in to unmask]>>
>
> wrote:
>
> Hi Stef,
>
> thanks for your mail. Let's see:
>
> > There are three sets of parameters online - derived from
> different
>
> > strategies for spatial normalisation if I understand it
> correctly.
>
> Yes.
>
> > Given that our sample is quite homogeneous (age range:
> 62.04 - 90.48
>
> > months; 53% female, all scanned using a 3T Siemens Trio), which
>
> > mw_com_info.mat should we use?
>
> I would suggest to use the "unified segmentation" dataset
> which seemed
>
> like the best compromise overall. The "affine only" was used as a
>
> reference point from earlier days.
>
> > Does the choice affect later steps in the pre-processing?
>
> In terms of obtained results, it really should otherwise I
> would have
>
> wasted a lot of time ;) You could argue that the likely
> ensuing DARTEL
>
> procedure will effectively supersede the initial choice, but
> that
>
> would
>
> be up to you to find out.
>
> > Further, the batch mode of mw_com_gen states, that one
>
> > should make sure that the requested output is available
> with the
>
> > selected data file. Could you please explain which data file is
>
> > necessary to obtain a certain output?
>
> I was not referring to a file, but to information, as in age,
> gender,
>
> and field strength for each subject. This remark refers to you
>
> trying to
>
> enter, e.g., subject age outside of the specified range, which
>
> would not
>
> work.
>
> > My layman understanding would be
>
> > that it would only possible to get Dartel/Shoot template
> output
>
> if the
>
> > mw_com_info.mat saved in the com_parameters_Dartel folder was
>
> used. Does
>
> > that mean that TPM and T1 can only be generated using either
>
> > com_parameters_affine/mw_com_info.mat or
>
> > com_parameters_unified-segmentation/mw_com_info.mat as initial
>
> input?
>
> Yes, you will likely want to generate a "standard" TPM (one 6
> class
>
> TPM)
>
> using the "unified segmentation" dataset and then a DARTEL TPM (6
>
> iterations of GM and WM) using the DARTEL dataset described
> in the
>
> second publication. These should then be entered into your
> processing
>
> stream at the appropriate places.
>
> > After reading both papers, I was wondering whether it is
>
> generally more
>
> > recommended to use CAT12 for segmentation and
> pre-processing when
>
> > dealing with unusual (i.e. 6-year-old children) populations
>
> compared to
>
> > the implementations in SPM - especially when handling
> structural
>
> data. I
>
> > am not sure which preprocessing pipeline is more
> appropriate in our
>
> > case. I am weighing up two options (after creating both Dartel
>
> template
>
> > and TPM using COM): Would it be better to use the SPM12
> segmentation
>
> > that - to my understanding - relies more on tissue priors
> given
>
> the fact
>
> > that we will create an age-appropriate TPM in COM followed
> by Run
>
> Dartel
>
> > (existing Templates) using the COM Dartel template? Or
> would it be
>
> > better to use the CAT12 segmentation specifying
> sample-specific
>
> COM TPM
>
> > and template to assist the spatial normalisation?
>
> That, as John likes to state, depends on your definition of
>
> "better" and
>
> can likely only be answered empirically. You (in my opinion)
> correctly
>
> describe the problem, but what the answer is is hard to say.
>
> > Would you recommend to
>
> > always run an initial round of SPM segmentation to obtain the
>
> > bias-corrected image and segment the obtained
> bias-corrected images
>
> > afterwards as described in the referred publications?
>
> No, that was only done in this case as I had data from different
>
> sources
>
> and wanted to have equal starting estimates for the final
> processing
>
> round. In a homogeneous sample, I would suggest to rather
> play with
>
> the
>
> bias estimate options.
>
> > Thanks for sharing your expertise with us!
>
> For what it's worth ;)
>
> Cheers
>
> Marko
>
> > On 18/05/2018, 16:08, "Marko Wilke"
>
> <[log in to unmask]
> <mailto:[log in to unmask]>>
>
> > wrote:
>
> >
>
> > Hello Stef,
>
> >
>
> > as it seems no-one has answered your query, I will at
> least
>
> have a
>
> > stab
>
> >
>
> > at the pediatric aspects of it:
>
> >
>
> > > 4. Last but not least, we would like to create a study
>
> specific
>
> > sample
>
> >
>
> > > using the Dartel algorithm. How many structural
> scans are
>
> >
>
> > > recommended to use in order to run this procedure
>
> > successfully? In
>
> >
>
> > > total, we have around 100 structural scans, but
> some
>
> images
>
> > are only
>
> >
>
> > > rated as moderately good in terms of their
> quality. So
>
> when
>
> > creating
>
> >
>
> > > the template, should we only use the high quality
>
> images or
>
> > would it
>
> >
>
> > > be better to include all images that will be
> used in the
>
> > analysis?
>
> >
>
> > > Related to that, if we use a study-specific
> template,
>
> will it
>
> > still
>
> >
>
> > > be possible to perform ROI analysis? If so, what
> steps
>
> would be
>
> >
>
> > > necessary to do that and does that have any
>
> implications on the
>
> >
>
> > > pre-processing steps?
>
> >
>
> > One, you should always use all contributing subjects
> if you
>
> want to
>
> >
>
> > generate your own template. This has actually been
> discussed
>
> once or
>
> >
>
> > twice before on this list (which using the archive search
>
> function at
>
> >
>
> > https://www.jiscmail.ac.uk/cgi-bin/webadmin?S1=spm may have
>
> revealed ;)
>
> >
>
> > Two, more images are usually better, but if you look
> at the
>
> > simulations
>
> >
>
> > shown in Figures 5-8 in a recent paper
>
> >
>
> >
>
> (https://www.frontiersin.org/articles/10.3389/fncom.2017.00005/full) you
>
> >
>
> > will see that the quality of the generated tissue maps
>
> continues to
>
> >
>
> > increase way after reaching 100 subjects. Hence, in your
>
> case you may
>
> >
>
> > want to consider looking into alternative methods of
>
> generating a
>
> >
>
> > template matched to your pediatric population (as a hint,
>
> also try
>
> >
>
> > https://doi.org/10.1016/j.dib.2017.12.001).
>
> >
>
> > Three, using standard ROIs with a custom template is
> always
>
> a tricky
>
> >
>
> > question. The larger and more general the regions are,
> the less
>
> > relevant
>
> >
>
> > this will be, but an issue it is. There is a number of
>
> things you can
>
> >
>
> > do: you could manually define your own regions of
> interest
>
> on your own
>
> >
>
> > template, you could match the ROI to your template (e.g.,
>
> the original
>
> >
>
> > GM map forming the basis for the standard ROI to your
> final
>
> DARTEL GM
>
> >
>
> > template), you could use larger ROIs and assume that they
>
> will broadly
>
> >
>
> > match the regions you are interested in, or you could use
>
> functionally
>
> >
>
> > and/or diffusion-MRI-defined ROIs from your own
> population.
>
> Or you
>
> > could
>
> >
>
> > come up with an approach I did not yet mention, of which
>
> certainly
>
> > there
>
> >
>
> > are many. In other words, it will depend on the very
>
> question you
>
> > have,
>
> >
>
> > on your data, and your requirements for spatial
> specificity.
>
> >
>
> > > Thank you for taking the time to consider this
> request. I
>
> am looking
>
> >
>
> > > forward to your thoughts on the issues mentioned.
>
> >
>
> > Not sure I have helped but I tried :)
>
> >
>
> > Cheers
>
> >
>
> > Marko
>
> >
>
> > --
>
> >
>
> > ____________________________________________________
>
> >
>
> > Prof. Dr. med. Marko Wilke
>
> >
>
> > Facharzt für Kinder- und Jugendmedizin
>
> >
>
> > Leiter, Experimentelle Pädiatrische Neurobildgebung
>
> >
>
> > Oberarzt der Abteilung Neuropädiatrie
>
> >
>
> > Universitäts-Kinderklinik
>
> >
>
> > Marko Wilke, MD, PhD
>
> >
>
> > Pediatrician
>
> >
>
> > Head, Experimental Pediatric Neuroimaging
>
> >
>
> > Consultant in Pediatric Neurology
>
> >
>
> > University Children's Hospital
>
> >
>
> > Hoppe-Seyler-Str. 1
>
> >
>
> > D - 72076 Tübingen, Germany
>
> >
>
> > Tel. +49 7071 29-83416
>
> >
>
> > Fax +49 7071 29-5473
>
> >
>
> > [log in to unmask]
> <mailto:[log in to unmask]>
>
> >
>
> > http://www.medizin.uni-tuebingen.de/kinder/epn/
>
> > ____________________________________________________
>
> >
>
> --
>
> ____________________________________________________
>
> Prof. Dr. med. Marko Wilke
>
> Facharzt für Kinder- und Jugendmedizin
>
> Leiter, Experimentelle Pädiatrische Neurobildgebung
>
> Oberarzt der Abteilung Neuropädiatrie
>
> Universitäts-Kinderklinik
>
> Marko Wilke, MD, PhD
>
> Pediatrician
>
> Head, Experimental Pediatric Neuroimaging
>
> Consultant in Pediatric Neurology
>
> University Children's Hospital
>
> Hoppe-Seyler-Str. 1
>
> D - 72076 Tübingen, Germany
>
> Tel. +49 7071 29-83416
>
> Fax +49 7071 29-5473
>
> [log in to unmask]
> <mailto:[log in to unmask]>
>
> http://www.medizin.uni-tuebingen.de/kinder/epn/
>
> ____________________________________________________
>
> --
>
> ____________________________________________________
>
> Prof. Dr. med. Marko Wilke
>
> Facharzt für Kinder- und Jugendmedizin
>
> Leiter, Experimentelle Pädiatrische Neurobildgebung
>
> Oberarzt der Abteilung Neuropädiatrie
>
> Universitäts-Kinderklinik
>
> Marko Wilke, MD, PhD
>
> Pediatrician
>
> Head, Experimental Pediatric Neuroimaging
>
> Consultant in Pediatric Neurology
>
> University Children's Hospital
>
> Hoppe-Seyler-Str. 1
>
> D - 72076 Tübingen, Germany
>
> Tel. +49 7071 29-83416
>
> Fax +49 7071 29-5473
>
> [log in to unmask] <mailto:[log in to unmask]>
>
> http://www.medizin.uni-tuebingen.de/kinder/epn/
>
> ____________________________________________________
>
--
____________________________________________________
Prof. Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Oberarzt der Abteilung Neuropädiatrie
Universitäts-Kinderklinik
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
Consultant in Pediatric Neurology
University Children's Hospital
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
|