-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change comment markers to make it compatible for both matlab and octave
- Loading branch information
Showing
3 changed files
with
80 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
## Copyright (C) 2019 Qianqian Fang <q.fang@neu.edu> | ||
## | ||
## This program is free software; you can redistribute it and/or modify it under | ||
## the terms of the GNU General Public License as published by the Free Software | ||
## Foundation; either version 3 of the License, or (at your option) any later | ||
## version. | ||
## | ||
## This program is distributed in the hope that it will be useful, but WITHOUT | ||
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
## details. | ||
## | ||
## You should have received a copy of the GNU General Public License along with | ||
## this program; if not, see <http://www.gnu.org/licenses/>. | ||
%% Copyright (C) 2019 Qianqian Fang <[email protected]> | ||
%% | ||
%% This program is free software; you can redistribute it and/or modify it under | ||
%% the terms of the GNU General Public License as published by the Free Software | ||
%% Foundation; either version 3 of the License, or (at your option) any later | ||
%% version. | ||
%% | ||
%% This program is distributed in the hope that it will be useful, but WITHOUT | ||
%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
%% details. | ||
%% | ||
%% You should have received a copy of the GNU General Public License along with | ||
%% this program; if not, see <http://www.gnu.org/licenses/>. | ||
|
||
## -*- texinfo -*- | ||
## @deftypefn {Function File} {} niftiinfo (@var{filename}) | ||
## Read the metadata from a NIfTI-1/2 and Analyze7.5 formatted image file | ||
## | ||
## Parsing the metadata in a NIfTI-1/2 file or a two-part NIfTI | ||
## or Analyze7.5 header file specified by @var{filename}. The | ||
## accepted file suffixes include .nii, .nii.gz, .hdr, and .hdr.gz. | ||
## | ||
## @seealso{niftiread, niftiwrite} | ||
## @end deftypefn | ||
%% -*- texinfo -*- | ||
%% @deftypefn {Function File} {} niftiinfo (@var{filename}) | ||
%% Read the metadata from a NIfTI-1/2 and Analyze7.5 formatted image file | ||
%% | ||
%% Parsing the metadata in a NIfTI-1/2 file or a two-part NIfTI | ||
%% or Analyze7.5 header file specified by @var{filename}. The | ||
%% accepted file suffixes include .nii, .nii.gz, .hdr, and .hdr.gz. | ||
%% | ||
%% @seealso{niftiread, niftiwrite} | ||
%% @end deftypefn | ||
|
||
function nii = niftiinfo (filename, varargin) | ||
|
||
|
@@ -103,7 +103,7 @@ | |
|
||
|
||
%!demo | ||
%! ## Reading a | ||
%! %% Reading a | ||
%! urlwrite('https://nifti.nimh.nih.gov/nifti-1/data/minimal.nii.gz','minimal.nii.gz') | ||
%! gunzip ('minimal.nii.gz'); | ||
%! header=niftiinfo('minimal.nii'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
## Copyright (C) 2019 Qianqian Fang <q.fang@neu.edu> | ||
## | ||
## This program is free software; you can redistribute it and/or modify it under | ||
## the terms of the GNU General Public License as published by the Free Software | ||
## Foundation; either version 3 of the License, or (at your option) any later | ||
## version. | ||
## | ||
## This program is distributed in the hope that it will be useful, but WITHOUT | ||
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
## details. | ||
## | ||
## You should have received a copy of the GNU General Public License along with | ||
## this program; if not, see <http://www.gnu.org/licenses/>. | ||
|
||
## -*- texinfo -*- | ||
## @deftypefn {Function File} {} niftiread (@var{filename}) | ||
## @deftypefnx {Function File} {} niftiread (@var{headerfile}, @var{imagefile}) | ||
## @deftypefnx {Function File} {} niftiread (@var{info}) | ||
## Read the image data from a NIfTI-1/2 and Analyze7.5 formatted image file | ||
## | ||
## Loading a NIfTI-1/2 file specified by @var{filename}, or a two-part NIfTI | ||
## or Analyze7.5 files using @var{headerfile} and @var{imagefile}. The | ||
## accepted file suffixes include .nii, .nii.gz, .hdr, .hdr.gz, .img, img.gz | ||
## | ||
## @seealso{niftiinfo, niftiwrite} | ||
## @end deftypefn | ||
%% Copyright (C) 2019 Qianqian Fang <[email protected]> | ||
%% | ||
%% This program is free software; you can redistribute it and/or modify it under | ||
%% the terms of the GNU General Public License as published by the Free Software | ||
%% Foundation; either version 3 of the License, or (at your option) any later | ||
%% version. | ||
%% | ||
%% This program is distributed in the hope that it will be useful, but WITHOUT | ||
%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
%% details. | ||
%% | ||
%% You should have received a copy of the GNU General Public License along with | ||
%% this program; if not, see <http://www.gnu.org/licenses/>. | ||
|
||
%% -*- texinfo -*- | ||
%% @deftypefn {Function File} {} niftiread (@var{filename}) | ||
%% @deftypefnx {Function File} {} niftiread (@var{headerfile}, @var{imagefile}) | ||
%% @deftypefnx {Function File} {} niftiread (@var{info}) | ||
%% Read image data from a NIfTI-1/2 and Analyze7.5 formatted image file | ||
%% | ||
%% Loading a NIfTI-1/2 file specified by @var{filename}, or a two-part NIfTI | ||
%% or Analyze7.5 files using @var{headerfile} and @var{imagefile}. The | ||
%% accepted file suffixes include .nii, .nii.gz, .hdr, .hdr.gz, .img, img.gz | ||
%% | ||
%% @seealso{niftiinfo, niftiwrite} | ||
%% @end deftypefn | ||
|
||
function img = niftiread (filename, varargin) | ||
|
||
|
@@ -44,7 +44,7 @@ | |
|
||
|
||
%!demo | ||
%! ## Reading a | ||
%! %% Reading a | ||
%! urlwrite('https://nifti.nimh.nih.gov/nifti-1/data/minimal.nii.gz','minimal.nii.gz') | ||
%! gunzip ('minimal.nii.gz'); | ||
%! img=niftiread('minimal.nii'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
## Copyright (C) 2019 Qianqian Fang <q.fang@neu.edu> | ||
## | ||
## This program is free software; you can redistribute it and/or modify it under | ||
## the terms of the GNU General Public License as published by the Free Software | ||
## Foundation; either version 3 of the License, or (at your option) any later | ||
## version. | ||
## | ||
## This program is distributed in the hope that it will be useful, but WITHOUT | ||
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
## details. | ||
## | ||
## You should have received a copy of the GNU General Public License along with | ||
## this program; if not, see <http://www.gnu.org/licenses/>. | ||
%% Copyright (C) 2019 Qianqian Fang <[email protected]> | ||
%% | ||
%% This program is free software; you can redistribute it and/or modify it under | ||
%% the terms of the GNU General Public License as published by the Free Software | ||
%% Foundation; either version 3 of the License, or (at your option) any later | ||
%% version. | ||
%% | ||
%% This program is distributed in the hope that it will be useful, but WITHOUT | ||
%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
%% details. | ||
%% | ||
%% You should have received a copy of the GNU General Public License along with | ||
%% this program; if not, see <http://www.gnu.org/licenses/>. | ||
|
||
## -*- texinfo -*- | ||
## @deftypefn {Function File} {} niftiwrite (@var{img}, @var{filename}) | ||
## @deftypefnx {Function File} {} niftiwrite (@var{img}, @var{filename}, @var{info}) | ||
## @deftypefnx {Function File} {} niftiwrite (@var{img}, @var{filename}, @var{info},...) | ||
## Write image data and metadata to a NIfTI-1/2 and Analyze7.5 formatted image file | ||
## | ||
## Writing the image data @var{img} and metadata @var{info} to a NIfTI-1 | ||
## file or a two-part NIfTI or Analyze7.5 files specified by @var{filename}. | ||
## The accepted file suffixes include .nii and .nii.gz. | ||
## | ||
## @seealso{niftiinfo, niftiread} | ||
## @end deftypefn | ||
%% -*- texinfo -*- | ||
%% @deftypefn {Function File} {} niftiwrite (@var{img}, @var{filename}) | ||
%% @deftypefnx {Function File} {} niftiwrite (@var{img}, @var{filename}, @var{info}) | ||
%% @deftypefnx {Function File} {} niftiwrite (@var{img}, @var{filename}, @var{info},...) | ||
%% Write image data and metadata to a NIfTI-1/2 and Analyze7.5 formatted image file | ||
%% | ||
%% Writing image data @var{img} and metadata @var{info} to a NIfTI-1 | ||
%% file or a two-part NIfTI or Analyze7.5 files specified by @var{filename}. | ||
%% The accepted file suffixes include .nii and .nii.gz. | ||
%% | ||
%% @seealso{niftiinfo, niftiread} | ||
%% @end deftypefn | ||
|
||
function niftiwrite (img, filename, varargin) | ||
|
||
|
@@ -64,7 +64,7 @@ function niftiwrite (img, filename, varargin) | |
endfunction | ||
|
||
%!demo | ||
%! ## Reading a | ||
%! %% Reading a | ||
%! urlwrite('https://nifti.nimh.nih.gov/nifti-1/data/minimal.nii.gz','minimal.nii.gz') | ||
%! gunzip ('minimal.nii.gz'); | ||
%! header=niftiinfo('minimal.nii'); | ||
|