Different number of nodes in two surfaces

Hello! I’m trying to take the intersection of two surfaces:

  1. The result from a thresholded group surface ttest (3dttest++ that I then 3dcalc to take only significant values) – it’s a niml.dset and I don’t quite understand what surface it goes with since it’s an output of the ttest of 30 surfaces.
  2. A hand-drawn ROI on the TT 141-node surface (an .niml.dset coverted with ROI2dataset)

I can visualize them on top of each other in SUMA but I can’t seem to figure out how to create a surface that takes the intersection of the two. I’m trying to use 3dcalc and it doesn’t work because they differ in size (198812 voxels vs. 198068). I tried using SurftoSurf but since I don’t know what surface #1 actually corresponds to, I’m not sure what to input there. Since I can see them on the same surface in SUMA, it feels like there should be some easy way!

Thanks so much for your help!


So, for #1:
I think all your surfaces for the 3dttest++ command would have had to have been on the same sized mesh (either std.60 or std.141). The output *.niml.dset would also have that same size (so all node indices correspond).

For #2:
You might need to add the “-pad_to_node …” option to ROI2dataset, so that even empty nodes are added to the dataset; the value given to it would be the size of your mesh in the output *.niml.dset from your 3dttest++ command, which can be seen as the first argument in “3dinfo -n4 DSET.niml.dset”, for example.

So, if you were using dsets on std.141 meshes for your inputs to 3dttest++, there are 198812 nodes; therefore, you would pad to one less than that number (because of zero-based counting in the indices):

ROI2dataset -prefix DSET.141.lh.niml.dset -pad_to_node 198811 -overwrite -input DSET.lh.niml.roi

Now, your dset “DSET.141.lh.niml.dset” would have the same size as your other *.niml.dsets, and you could run a 3dcalc command like:

3dcalc -a DSET.141.lh.niml.dset -b STAT.141.lh.niml.dset -expr 'step(a)*b' -prefix MASKED_STAT.141.lh.niml.dset