That is a bug in -cifti-create-dense-from-template we hadn't caught, sorry. To work around it, you can remove the -crop option from the -cifti-separate command (warning, may use a lot of memory, you could take only the first frame with -cifti-merge before doing -cifti-separate, as for this method you don't need the data volume output), and then use the -volume-all option to -cifti-create-dense-from-template instead of the -volume option, like so:
#get the roi in the full volume space wb_command -cifti-separate tfMRI_EMOTION_LR_Atlas.dtseries.nii COLUMN -volume AMYGDALA_LEFT output_left_amygdala.nii.gz -roi roi_left_amygdala.nii.gz #turn the ROI into cifti wb_command -cifti-create-dense-from-template tfMRI_EMOTION_LR_Atlas.dtseries.nii roi_left_amygdala.dscalar.nii -volume-all roi_left_amygdala.nii.gz #stats prints a number per column to standard output wb_command -cifti-stats tfMRI_EMOTION_LR_Atlas.dtseries.nii -reduce MEAN -roi roi_left_amygdala.dscalar.nii Tim On Tue, Sep 1, 2015 at 9:57 AM, Nomi, Jason <jxn...@miami.edu> wrote: > Hi Tim, > > > When doing the second step (turn the ROI into cifti), I get the following > error: > > > ERROR: input volume doesn't match volume space and dimensions in CIFTI > > > > > The code I am using for the first step: > > wb_command -cifti-separate 30_min.dtseries.nii COLUMN -volume > AMYGDALA_LEFT output_left_amygdala.nii.gz -roi roi_left_amygdala.nii.gz > -crop > > The code I am using for the second step: > > wb_command -cifti-create-dense-from-template 30_min.dtseries.nii > roi_left_amygdala.dscalar.nii -volume AMYGDALA_LEFT > roi_left_amygdala.nii.gz -from-cropped > > > > Any advice on what is happening? > > Jason > > > > > ------------------------------ > *From:* Timothy Coalson <tsc...@mst.edu> > *Sent:* Monday, August 31, 2015 9:12 PM > > *To:* Nomi, Jason > *Cc:* hcp-users@humanconnectome.org > *Subject:* Re: [HCP-Users] Acquire text file with averaged volume time > series for subcortical structures from cifti file > > That file contains all the voxels of the structure, plus zero voxels out > to the bounding box of the structure, so you probably also need the ROI > volume to get it to do the right thing. I'm not all that familiar with fsl > tools. > > The tfMRI_EMOTION_LR_Atlas.dtseries.nii file is the same as the input in > the first step. The roi_left_amygdala.dscalar.nii file is written out by > the second step, for use in the third step. > > Tim > > > On Mon, Aug 31, 2015 at 7:07 PM, Nomi, Jason <jxn...@miami.edu> wrote: > >> Thank you for the quick reply Tim! >> >> >> I was wondering if I could simplify things by applying the fsl >> command "fslmeants" to the output from the first step, on the >> "output_left_amygdala.nii.gz" file? That should get me the mean of all the >> voxels included in that file right? If that file contains only the voxels >> of the left amygdala, then I figure that would get me the averaged time >> series. >> >> >> If that is not possible, I am unclear where the file in the second step, >> "tfMRI_EMOTION_LR_Atlas.dtseries.nii >> roi_left_amygdala.dscalar.nii", comes from. >> >> >> Thanks for the help - >> >> >> Jason >> >> >> ------------------------------ >> *From:* Timothy Coalson <tsc...@mst.edu> >> *Sent:* Monday, August 31, 2015 6:45 PM >> *To:* Nomi, Jason >> *Cc:* hcp-users@humanconnectome.org >> *Subject:* Re: [HCP-Users] Acquire text file with averaged volume time >> series for subcortical structures from cifti file >> >> -cifti-separate can't do any averaging, that isn't its purpose. Instead, >> you can use -cifti-stats and the roi of the amygdala to do such an average: >> >> #what you already did, for the purpose of getting the ROI >> wb_command -cifti-separate tfMRI_EMOTION_LR_Atlas.dtseries.nii COLUMN >> -volume AMYGDALA_LEFT output_left_amygdala.nii.gz -roi >> roi_left_amygdala.nii.gz -crop >> >> #turn the ROI into cifti >> wb_command >> -cifti-create-dense-from-template tfMRI_EMOTION_LR_Atlas.dtseries.nii >> roi_left_amygdala.dscalar.nii >> -volume AMYGDALA_LEFT roi_left_amygdala.nii.gz -from-cropped >> >> #stats prints a number per column to standard output >> wb_command -cifti-stats tfMRI_EMOTION_LR_Atlas.dtseries.nii -reduce MEAN >> -roi roi_left_amygdala.dscalar.nii >> >> If you were using a surface structure, you should use >> -cifti-weighted-stats instead as the last step with -spatial-weights to >> account for differences in vertex area. >> >> Tim >> >> >> On Mon, Aug 31, 2015 at 1:33 PM, Nomi, Jason <jxn...@miami.edu> wrote: >> >>> Dear Experts, >>> >>> >>> I am trying to acquire the averaged volume time series for subcortical >>> structures in text file form. >>> >>> >>> From this post >>> http://www.mail-archive.com/hcp-users@humanconnectome.org/msg01184.html >>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_hcp-2Dusers-40humanconnectome.org_msg01184.html&d=BQMFaQ&c=y2w-uYmhgFWijp_IQN0DhA&r=ZJUDSwWP05vEvMBUQZ8FbQ&m=BmKcM4Yzl6xcnzSTeNcIEuHvRFAqTKTTeOiGiMbb7UQ&s=rMIzyQLLAXu4Qo1sXKKB9Rx2BEZhsmIRPFso5N-9d_0&e=> >>> , >>> I assume that doing these commands : >>> >>> >>> wb_command -cifti-separate tfMRI_EMOTION_LR_Atlas.dtseries.nii COLUMN >>> -volume AMYGDALA_LEFT output_left_amygdala.nii.gz -roi >>> roi_left_amygdala.nii.gz -crop >>> >>> >>> gives me a nifti file with *all* the voxels from the left amygdala >>> (output_left_amygdala.nii.gz). >>> >>> >>> Is there a way to get the *averaged* time series for all left amygdala >>> voxels into a nifti file using the -cifti-separate command? >>> >>> >>> If so, I suppose that I could then use the -nifti-information command to >>> extract the time series from that averaged nifti file into a text file. >>> >>> >>> Or, is there another way that I should do this? >>> >>> >>> Thanks in advance! >>> >>> >>> Jason >>> >>> >>> >>> >>> >>> _______________________________________________ >>> HCP-Users mailing list >>> HCP-Users@humanconnectome.org >>> http://lists.humanconnectome.org/mailman/listinfo/hcp-users >>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.humanconnectome.org_mailman_listinfo_hcp-2Dusers&d=BQMFaQ&c=y2w-uYmhgFWijp_IQN0DhA&r=ZJUDSwWP05vEvMBUQZ8FbQ&m=BmKcM4Yzl6xcnzSTeNcIEuHvRFAqTKTTeOiGiMbb7UQ&s=eIqQcGiHAP8KDaMKQ5LBktP1HatoITSdGPtrXN1YFqs&e=> >>> >> >> > _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users