Print

Print


Dear Simon,

I'm afraid that there is no other working option in run_mesh_utils apart from what you are using (the --sampNN is not currently implemented).  The second call you are making is not suitable for a 3D volume, it only works with a "fake" volume (a 1D array, stored in nifti format, which is convenient for some internal processing, but not generally useful).

If you really had to have nearest neighbour (and I'm not sure why this is important if the input image is statistical) then you could mask the volume with the boundary mask (formed from the mesh) and then dilate the values in the volume and then do the sampling.  This would at least reduce the amount of interpolation beyond the boundary that happened (although it technically does not eliminate it).

I hope this helps.
All the best,
	Mark



On 14 Nov 2012, at 13:38, Simon Vandekar <[log in to unmask]> wrote:

> Hi Brain and Other FSL experts,
> 
> In short, Is there a way to do Nearest Neighbor Interpolation onto a mesh?
> 
> As a test, I am trying to project the corrected results of the new vertex analysis onto a surface mesh. Two commands I have seen previously posted are:
> 
> 1. run_mesh_utils --doSampleMesh -m ../concat_imgfiles/average_mesh.vtk -i R_Hipp_anova_clustere_corrp_tstat3.nii.gz -o newsurface.vtk
> 
> This works, but seems to do something other than nearest neighbor interpolation from the .nii.gz file. My cluster image that was say .996 in the cluster and 0 elsewhere is now a gradient of (1-p) values on the mesh (as it seems to have been averaged with 0 voxels).
> 
> 2. run_mesh_utils --doVolumeToScalars -m ../concat_imgfiles/average_mesh.vtk -i R_Hipp_anova_clustere_corrp_tstat3.nii.gz -o vts_0-3surface.vtk
> terminate called after throwing an instance of 'NEWMAT::IndexException'
> Aborted
> 
> I've seen Mark post something similar to this, but it seems to fail for me. Is there something I am doing wrong?
> 
> What I eventually want to do is project mean differences or effect sizes onto the surface of a mesh, because I am comparing groups of different sizes.
> 
> Thanks for your help,
> Simon
>