generating and resampling an ROI

Hello,

I am generating an ROI using 3dUndump (3dUndump -master macaque_template+tlrc -prefix vent3.nii -srad 1 -xyz mycoord.1D) - 3dinfo output below. The output looks great and I can see the ROI in AFNI - but then, I have to resample the ROI from the template grid to my anaticor file. The resampling seems to work fine without any errors but then the ROI disappears within AFNI (3dinfo for vent3_rs.nii below).

Then, I call the resampled ROI with 3dmaskave - 3dmaskave -mask ${mask} -quiet $dset > ${s}_${ROI}.1D - where the mask is the resampled ROI (vent3_rs.nii)

And I get this error:

3dmaskave: AFNI version=AFNI_16.2.09 (Aug 6 2016) [64-bit]
*** No voxels survive the masking operation

Is my ROI so small that when I resample, it loses all of it’s information so the mask and therefore the 1D file it generates is empty?

Thanks in advance for your help!

[NIALBN-01878663:NHP_Lesion/macaque_atlas_final/ROIs] rossisl% 3dinfo vent3.nii
++ 3dinfo: AFNI version=AFNI_16.2.09 (Aug 6 2016) [64-bit]

Dataset File: vent3.nii
Identifier Code: AFN_QB3fyctv7JxF0kNUAu_eXw Creation Date: Mon Sep 12 15:47:31 2016
Template Space: D99_Macaque
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI
Storage Space: 46,758,250 (47 million [mega]) bytes
Geometry String: “MATRIX(-0.25,0,0,34.25,0,-0.25,0,49.75,0,0,0.25,-27.5):275,347,245”
Data Axes Tilt: Plumb
Data Axes Orientation:
first (x) = Left-to-Right
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient LPI]
R-to-L extent: -34.250 [R] -to- 34.250 [L] -step- 0.250 mm [275 voxels]
A-to-P extent: -36.750 [A] -to- 49.750 [P] -step- 0.250 mm [347 voxels]
I-to-S extent: -27.500 [I] -to- 33.500 [S] -step- 0.250 mm [245 voxels]
Number of values stored at each pixel = 1
– At sub-brick #0#0’ datum type is short: 0 to 1

----- HISTORY -----
[rossisl@NIALBN-01878663.local: Mon Sep 12 15:47:31 2016] 3dUndump -master /Volumes/SHARYN_HD/NHP_Lesion/macaque_atlas_final/D99_template+tlrc -prefix vent3.nii -srad 1 -xyz mycoord.1D

[NIALBN-01878663:NHP_Lesion/macaque_atlas_final/ROIs] rossisl% 3dinfo vent3_rs.nii
++ 3dinfo: AFNI version=AFNI_16.2.09 (Aug 6 2016) [64-bit]

Dataset File: vent3_rs.nii
Identifier Code: AFN_DI-3PuMIh287yfEgIkQt3A Creation Date: Mon Sep 12 15:47:32 2016
Template Space: D99_Macaque
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI
Storage Space: 124,032 (124 thousand [kilo]) bytes
Geometry String: “MATRIX(-1.8,0,0,33.3,0,-1.8,0,48.8,0,0,1.8,-26.7):38,48,34”
Data Axes Tilt: Plumb
Data Axes Orientation:
first (x) = Left-to-Right
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient LPI]
R-to-L extent: -33.300 [R] -to- 33.300 [L] -step- 1.800 mm [ 38 voxels]
A-to-P extent: -35.800 [A] -to- 48.800 [P] -step- 1.800 mm [ 48 voxels]
I-to-S extent: -26.700 [I] -to- 32.700 [S] -step- 1.800 mm [ 34 voxels]
Number of values stored at each pixel = 1
– At sub-brick #0#0’ datum type is short: 0 to 0

----- HISTORY -----
[rossisl@NIALBN-01878663.local: Mon Sep 12 15:47:31 2016] 3dUndump -master /Volumes/SHARYN_HD/NHP_Lesion/macaque_atlas_final/D99_template+tlrc -prefix vent3.nii -srad 1 -xyz mycoord.1D
[rossisl@NIALBN-01878663.local: Mon Sep 12 15:47:32 2016] 3dresample -master /Volumes/SHARYN_HD/NHP_Lesion/Abu/anaticor_warp2std+tlrc -prefix vent3_rs.nii -inset /Volumes/SHARYN_HD/NHP_Lesion/macaque_atlas_final/ROIs/vent3.nii

A 1mm radius sphere isn’t likely to survive simple nearest neighbor resampling to a 3 mm sphere. Consider using 3dfractionize for resampling from a finer resolution ROI to a coarse resolution grid. Alternatively, use 3dresample with a linear interpolation on a floating point dataset and choose some threshold for the results.