Home > vbmeg > functions > tool_box > dmri_processor > functions > util > dmri_add_images.m

dmri_add_images

PURPOSE ^

Add images (fileA + fileB), then create output_file.

SYNOPSIS ^

function dmri_add_images(fileA, fileB, output_file)

DESCRIPTION ^

 Add images (fileA + fileB), then create output_file.

 [Usage]
    dmri_add_images(fileA, fileB, output_file);

 [Input]
          fileA : fileA       - gzipped Nifti file(.nii.gz)
          fileB : fileB       - gzipped Nifti file(.nii.gz)
    output_file : output file - gzipped Nifti file(.nii.gz)

 [Output]
    none

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function dmri_add_images(fileA, fileB, output_file)
0002 % Add images (fileA + fileB), then create output_file.
0003 %
0004 % [Usage]
0005 %    dmri_add_images(fileA, fileB, output_file);
0006 %
0007 % [Input]
0008 %          fileA : fileA       - gzipped Nifti file(.nii.gz)
0009 %          fileB : fileB       - gzipped Nifti file(.nii.gz)
0010 %    output_file : output file - gzipped Nifti file(.nii.gz)
0011 %
0012 % [Output]
0013 %    none
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 %
0019 % --- Previous check
0020 %
0021 if nargin ~= 3
0022     error('Please check function usage.');
0023 end
0024 
0025 %
0026 % --- Main Procedure
0027 %
0028 cmd = ['fslmaths', ...
0029        ' '     , fileA, ...
0030        ' -add ', fileB, ...
0031        ' '     , output_file];
0032 dmri_system(cmd);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005