Re: [HCP-Users] 答复: 答复: About wb_command -cifti-resample

2019-01-15 Thread Jan Mathijs Schoffelen
Hi all,

The shared MEG source reconstructed data are only defined on the cortical 
meshes, in cifti-format, and does not contain subcortical volumetrically 
defined brainordinates. Therefore, I suggest to go with Tim’s suggestion to do 
a cifti-separate on the fMRI ciftis and proceed from there.
Best,
Jan-Mathijs



> On 15 Jan 2019, at 20:55, Timothy Coalson  wrote:
> 
> Cifti files are defined not only by their resolution, but also by ROIs that 
> exclude uninteresting or redundant locations, in particular the medial wall 
> vertices and white matter voxels for fMRI.  This is the reason that 
> -cifti-resample needs a template, to define what is included/excluded.
> 
> I'm not all that familiar with the HCP MEG data, and the outputs may not be 
> in cifti format.  You can get the cortical data from a cifti file in 
> single-hemisphere gifti format using -cifti-separate, and you can use 
> -metric-resample on those, which is a simpler command (because the gifti 
> format does not have a provision for excluding vertices from the data file).  
> You can also get the subcortical volume data using the same command, though 
> for volume downsampling you should smooth before resampling in order not to 
> waste signal (the volume resampling algorithms currently available in 
> wb_command are point estimates, unlike the adaptive barycentric surface 
> resampling).
> 
> If the MEG data does provide cifti format files, you should be able to use 
> any of them as the template in -cifti-resample, as I would expect them to all 
> use the same defining ROIs.
> 
> Tim
> 
> 
> On Tue, Jan 15, 2019 at 10:08 AM Rigel Wang 
>  > wrote:
> Hi Jan-Mathijs,
> Thank you for your interest. 
> I want to resample the high spatial resolution fMRI signal to a low spatial 
> resolution to compare with the MEG signal in source space, which is for 
> comparing different M/EEG inverse methods.
> So I want to convert the two modal signal in the same individual coordinate 
> system with low spatial resolution.
> But I never did downsampling with HCP CIFTI file before. I want to use the 
> HCP Connectome Workbench command line to downsampling which can avoid 
> converting the format to other platforms for downsampling, such as freesurfer 
> -mri_surf2surf needs -reconall to segment T1w to their format again then do 
> downsampling.  
> However, the -cifti-resample  ask for CIFTI format file as a 
> target template.
> I don't know what should it be.
> I put the instruction description in the below.
> Thank you!
> Best,
> Rigel
> 
> 
> RESAMPLE A CIFTI FILE TO A NEW CIFTI SPACE
>wb_command -cifti-resample
>- the cifti file to resample
>- the direction of the input that should be resampled, ROW 
> or
>  COLUMN
>- a cifti file containing the cifti space to resample 
> to
>- the direction of the template to use as the
>  resampling space, ROW or COLUMN
>- specify a surface resampling method
>- specify a volume interpolation method
>- output - the output cifti file
> [-surface-largest] - use largest weight instead of weighted average or
>  popularity when doing surface resampling
> 
> [-volume-predilate] - dilate the volume components before resampling
>   - distance, in mm, to dilate
> 
> [-nearest] - use nearest value dilation
> 
> [-weighted] - use weighted dilation (default)
> 
> [-exponent] - specify exponent in weighting function
> - exponent 'n' to use in (1 / (distance ^ n)) as the
>   weighting function (default 2)
> 
> [-surface-postdilate] - dilate the surface components after resampling
>   - distance, in mm, to dilate
> 
> [-nearest] - use nearest value dilation
> 
> [-linear] - use linear dilation
> 
> [-weighted] - use weighted dilation (default for non-label data)
> 
> [-exponent] - specify exponent in weighting function
> - exponent 'n' to use in (area / (distance ^ n)) as
>   the weighting function (default 2)
> 
> [-affine] - use an affine transformation on the volume components
>   - the affine file to use
> 
> [-flirt] - MUST be used if affine is a flirt affine
>  - the source volume used when generating the 
> affine
>  - the target volume used when generating the 
> affine
> 
> [-warpfield] - use a warpfield on the volume components
>   - the warpfield to use
> 
> [-fnirt] - MUST be used if using a fnirt warpfield
>  - the source volume used when generating the
>warpfield
> 
> [-left-spheres] - specify spheres for left surface resampling
>   - a sphere with the same mesh as the current left
> surface
>   - a sphere with the new left mesh that is in register
> with the current sphere
> 
> [-left-area-surfs] - specify left surfaces to do vertex area
> correction based on
>  - a rel

Re: [HCP-Users] 答复: 答复: About wb_command -cifti-resample

2019-01-15 Thread Timothy Coalson
Cifti files are defined not only by their resolution, but also by ROIs that
exclude uninteresting or redundant locations, in particular the medial wall
vertices and white matter voxels for fMRI.  This is the reason that
-cifti-resample needs a template, to define what is included/excluded.

I'm not all that familiar with the HCP MEG data, and the outputs may not be
in cifti format.  You can get the cortical data from a cifti file in
single-hemisphere gifti format using -cifti-separate, and you can use
-metric-resample on those, which is a simpler command (because the gifti
format does not have a provision for excluding vertices from the data
file).  You can also get the subcortical volume data using the same
command, though for volume downsampling you should smooth before resampling
in order not to waste signal (the volume resampling algorithms currently
available in wb_command are point estimates, unlike the adaptive
barycentric surface resampling).

If the MEG data does provide cifti format files, you should be able to use
any of them as the template in -cifti-resample, as I would expect them to
all use the same defining ROIs.

Tim


On Tue, Jan 15, 2019 at 10:08 AM Rigel Wang <
rigel.w...@neuroinformatics-collaboratory.org> wrote:

> Hi Jan-Mathijs,
> Thank you for your interest.
> I want to resample the high spatial resolution fMRI signal to a low
> spatial resolution to compare with the MEG signal in source space, which is
> for comparing different M/EEG inverse methods.
> So I want to convert the two modal signal in the same individual
> coordinate system with low spatial resolution.
> But I never did downsampling with HCP CIFTI file before. I want to use the
> HCP Connectome Workbench command line to downsampling which can
> avoid converting the format to other platforms for downsampling, such as
> freesurfer -mri_surf2surf needs -reconall to segment T1w to their format
> again then do downsampling.
> However, the -cifti-resample  ask for CIFTI format file as
> a target template.
> I don't know what should it be.
> I put the instruction description in the below.
> Thank you!
> Best,
> Rigel
>
>
> RESAMPLE A CIFTI FILE TO A NEW CIFTI SPACE
>wb_command -cifti-resample
>- the cifti file to resample
>- the direction of the input that should be resampled,
> ROW or
>  COLUMN
>- a cifti file containing the cifti space to
> resample to
>- the direction of the template to use as the
>  resampling space, ROW or COLUMN
>- specify a surface resampling method
>- specify a volume interpolation method
>- output - the output cifti file
>
> [-surface-largest] - use largest weight instead of weighted average or
>  popularity when doing surface resampling
>
> [-volume-predilate] - dilate the volume components before resampling
>   - distance, in mm, to dilate
>
> [-nearest] - use nearest value dilation
>
> [-weighted] - use weighted dilation (default)
>
> [-exponent] - specify exponent in weighting function
> - exponent 'n' to use in (1 / (distance ^ n))
> as the
>   weighting function (default 2)
>
> [-surface-postdilate] - dilate the surface components after resampling
>   - distance, in mm, to dilate
>
> [-nearest] - use nearest value dilation
>
> [-linear] - use linear dilation
>
> [-weighted] - use weighted dilation (default for non-label data)
>
> [-exponent] - specify exponent in weighting function
> - exponent 'n' to use in (area / (distance ^
> n)) as
>   the weighting function (default 2)
>
> [-affine] - use an affine transformation on the volume components
>   - the affine file to use
>
> [-flirt] - MUST be used if affine is a flirt affine
>  - the source volume used when generating the
> affine
>  - the target volume used when generating the
> affine
>
> [-warpfield] - use a warpfield on the volume components
>   - the warpfield to use
>
> [-fnirt] - MUST be used if using a fnirt warpfield
>  - the source volume used when generating the
>warpfield
>
> [-left-spheres] - specify spheres for left surface resampling
>   - a sphere with the same mesh as the current
> left
> surface
>   - a sphere with the new left mesh that is in
> register
> with the current sphere
>
> [-left-area-surfs] - specify left surfaces to do vertex area
> correction based on
>  - a relevant left anatomical surface with
> current
>mesh
>  - a relevant left anatomical surface with new mesh
>
> [-left-area-metrics] - specify left vertex area metrics to do area
> correction based on
>  - a metric file with vertex areas for the
> current
>mesh
>  - a metric file with vertex areas for the new mesh
>
> [-right-spheres] - specify spheres for right surface resampling
>  

[HCP-Users] 答复: 答复: About wb_command -cifti-resample

2019-01-15 Thread Rigel Wang
Hi Jan-Mathijs,
Thank you for your interest.
I want to resample the high spatial resolution fMRI signal to a low spatial 
resolution to compare with the MEG signal in source space, which is for 
comparing different M/EEG inverse methods.
So I want to convert the two modal signal in the same individual coordinate 
system with low spatial resolution.
But I never did downsampling with HCP CIFTI file before. I want to use the HCP 
Connectome Workbench command line to downsampling which can avoid converting 
the format to other platforms for downsampling, such as freesurfer 
-mri_surf2surf needs -reconall to segment T1w to their format again then do 
downsampling.
However, the -cifti-resample  ask for CIFTI format file as a 
target template.
I don't know what should it be.
I put the instruction description in the below.
Thank you!
Best,
Rigel



RESAMPLE A CIFTI FILE TO A NEW CIFTI SPACE
   wb_command -cifti-resample
   - the cifti file to resample
   - the direction of the input that should be resampled, ROW or
 COLUMN
   - a cifti file containing the cifti space to resample to
   - the direction of the template to use as the
 resampling space, ROW or COLUMN
   - specify a surface resampling method
   - specify a volume interpolation method
   - output - the output cifti file

[-surface-largest] - use largest weight instead of weighted average or
 popularity when doing surface resampling

[-volume-predilate] - dilate the volume components before resampling
  - distance, in mm, to dilate

[-nearest] - use nearest value dilation

[-weighted] - use weighted dilation (default)

[-exponent] - specify exponent in weighting function
- exponent 'n' to use in (1 / (distance ^ n)) as the
  weighting function (default 2)

[-surface-postdilate] - dilate the surface components after resampling
  - distance, in mm, to dilate

[-nearest] - use nearest value dilation

[-linear] - use linear dilation

[-weighted] - use weighted dilation (default for non-label data)

[-exponent] - specify exponent in weighting function
- exponent 'n' to use in (area / (distance ^ n)) as
  the weighting function (default 2)

[-affine] - use an affine transformation on the volume components
  - the affine file to use

[-flirt] - MUST be used if affine is a flirt affine
 - the source volume used when generating the affine
 - the target volume used when generating the affine

[-warpfield] - use a warpfield on the volume components
  - the warpfield to use

[-fnirt] - MUST be used if using a fnirt warpfield
 - the source volume used when generating the
   warpfield

[-left-spheres] - specify spheres for left surface resampling
  - a sphere with the same mesh as the current left
surface
  - a sphere with the new left mesh that is in register
with the current sphere

[-left-area-surfs] - specify left surfaces to do vertex area
correction based on
 - a relevant left anatomical surface with current
   mesh
 - a relevant left anatomical surface with new mesh

[-left-area-metrics] - specify left vertex area metrics to do area
correction based on
 - a metric file with vertex areas for the current
   mesh
 - a metric file with vertex areas for the new mesh

[-right-spheres] - specify spheres for right surface resampling
  - a sphere with the same mesh as the current right
surface
  - a sphere with the new right mesh that is in register
with the current sphere

[-right-area-surfs] - specify right surfaces to do vertex area
correction based on
 - a relevant right anatomical surface with current
   mesh
 - a relevant right anatomical surface with new mesh

[-right-area-metrics] - specify right vertex area metrics to do area
correction based on
 - a metric file with vertex areas for the current
   mesh
 - a metric file with vertex areas for the new mesh

[-cerebellum-spheres] - specify spheres for cerebellum surface resampling
  - a sphere with the same mesh as the current
cerebellum surface
  - a sphere with the new cerebellum mesh that is in
register with the current sphere

[-cerebellum-area-surfs] - specify cerebellum surfaces to do vertex
area correction based on
 - a relevant cerebellum anatomical surface with
   current mesh
 - a relevant cerebellum anatomical surface with new mesh

[-cerebellum-area-metrics] - specify cerebellum vertex area metrics to
do area correction based on
 - a metric file with vertex areas for the current
   mesh
 - a metric file with ve