-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use Octave styled comment, NeuroJSON/jnifti#7
- Loading branch information
Showing
10 changed files
with
476 additions
and
476 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,21 +1,21 @@ | ||
function varargout = loadnifti (varargin) | ||
% | ||
% jnii=loadnifti(filename) | ||
% or | ||
% nii=loadnifti(filename,option) | ||
% | ||
% Read a NIfTI-1/2 (*.nii/.nii.gz) or Analyze 7.5 (*.hdr/*.img/.hdr.gz/.img.gz) | ||
% image file. | ||
% | ||
% author: Qianqian Fang (q.fang <at> neu.edu) | ||
% | ||
% Please run `help nii2jnii` to see the input output outputs. | ||
% This function is an alias to nii2jnii | ||
% | ||
% | ||
% this file is part of JNIfTI specification: https://github.com/fangq/jnifti | ||
% | ||
% License: Apache 2.0, see https://github.com/fangq/jnifti for details | ||
% | ||
# | ||
# jnii=loadnifti(filename) | ||
# or | ||
# nii=loadnifti(filename,option) | ||
# | ||
# Read a NIfTI-1/2 (*.nii/.nii.gz) or Analyze 7.5 (*.hdr/*.img/.hdr.gz/.img.gz) | ||
# image file. | ||
# | ||
# author: Qianqian Fang (q.fang <at> neu.edu) | ||
# | ||
# Please run `help nii2jnii` to see the input output outputs. | ||
# This function is an alias to nii2jnii | ||
# | ||
# | ||
# this file is part of JNIfTI specification: https://github.com/fangq/jnifti | ||
# | ||
# License: Apache 2.0, see https://github.com/fangq/jnifti for details | ||
# | ||
|
||
[varargout{1:nargout}] = nii2jnii(varargin{:}); |
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
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
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 <[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/>. | ||
## 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} {} 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) | ||
|
||
|
@@ -101,14 +101,14 @@ | |
|
||
endfunction; | ||
|
||
% !demo | ||
% ! %% 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'); | ||
# !demo | ||
# ! ## 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'); | ||
|
||
% !test | ||
% ! urlwrite('https://nifti.nimh.nih.gov/nifti-1/data/minimal.nii.gz','minimal.nii.gz') | ||
% ! gunzip ('minimal.nii.gz'); | ||
% ! header=niftiinfo('minimal.nii'); | ||
% ! assert (header.ImageSize,[64 64 10]); | ||
# !test | ||
# ! urlwrite('https://nifti.nimh.nih.gov/nifti-1/data/minimal.nii.gz','minimal.nii.gz') | ||
# ! gunzip ('minimal.nii.gz'); | ||
# ! header=niftiinfo('minimal.nii'); | ||
# ! assert (header.ImageSize,[64 64 10]); |
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 <[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/>. | ||
## 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 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 | ||
## -*- 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) | ||
|
||
|
@@ -42,14 +42,14 @@ | |
|
||
endfunction; | ||
|
||
% !demo | ||
% ! %% 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'); | ||
# !demo | ||
# ! ## 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'); | ||
|
||
% !test | ||
% ! urlwrite('https://nifti.nimh.nih.gov/nifti-1/data/minimal.nii.gz','minimal.nii.gz') | ||
% ! gunzip ('minimal.nii.gz'); | ||
% ! img=niftiread('minimal.nii'); | ||
% ! assert (size(img),[64 64 10]); | ||
# !test | ||
# ! urlwrite('https://nifti.nimh.nih.gov/nifti-1/data/minimal.nii.gz','minimal.nii.gz') | ||
# ! gunzip ('minimal.nii.gz'); | ||
# ! img=niftiread('minimal.nii'); | ||
# ! assert (size(img),[64 64 10]); |
Oops, something went wrong.