Skip to content

Commit

Permalink
change comment markers to make it compatible for both matlab and octave
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 14, 2019
1 parent 6860348 commit de634d7
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 80 deletions.
50 changes: 25 additions & 25 deletions lib/octave/niftiinfo.m
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)

Expand Down Expand Up @@ -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');
Expand Down
56 changes: 28 additions & 28 deletions lib/octave/niftiread.m
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)

Expand All @@ -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');
Expand Down
54 changes: 27 additions & 27 deletions lib/octave/niftiwrite.m
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)

Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit de634d7

Please sign in to comment.