|
# Create each feature folders for each image |
|
for (feature in c("allocation", "transport", "vbm")) { |
|
feature_dir = file.path(img_dir, feature) |
|
dir.create(feature_dir) |
|
writeNifti(res$im[[feature]], sprintf("%s/correlation.nii.gz", feature_dir)) |
|
writeNifti(res$pim[[feature]], sprintf("%s/pvalue.nii.gz", feature_dir)) |
|
} |
|
} |
|
} |
The spacing information from the original feature images that were analyzed is not passed into the writeNifti here^^
So we should use the template argument of writeNifti; see documentation.
Pass to the template argument the result of applying readNifti to one of the feature images that were used for analysis.
This way when our analysis results visualizer looks at nifti images that were written here, it knows how to display them in relation to the atlas.
UTM/Scripts/Analysis/analyse.images.cor.R
Lines 157 to 165 in a17e172
The spacing information from the original feature images that were analyzed is not passed into the
writeNiftihere^^So we should use the
templateargument of writeNifti; see documentation.Pass to the
templateargument the result of applyingreadNiftito one of the feature images that were used for analysis.This way when our analysis results visualizer looks at nifti images that were written here, it knows how to display them in relation to the atlas.