niftiwrite and 'Version' parameter

조회 수: 5 (최근 30일)
Garikoitz Lerma Usabiaga
Garikoitz Lerma Usabiaga 2020년 1월 28일
답변: Walter Roberson 2020년 1월 28일
In the niftiwrite documentation page it says that there is the 'Version' option:
'Version'NIfTI data format
'NIfTI1' | 'NIfTI2'
NIfTI data format, specified as 'NIfTI1' or 'NIfTI2'.
  • If specified as 'NIfTI1', then niftiwrite writes the input according to NIfTI1 data format.
  • If specified as 'NIfTI2', then niftiwrite writes the input according to NIfTI2 data format.
  • If not specified, then the default value for 'Version' is chosen based on the maximum dimension of the input volumetric data.
  • If the maximum dimension of the input is less than or equal to 32767, then the default value is NIfTI1.
  • If the maximum dimension of the input is greater than 32767, then the default value is NIfTI2.
This function is not working:
  1. If no 'Version' is specified and the maximum dimension is greater than 32767, it truncates the input to that maximum (silently)
  2. The parameter 'Version' does not exist:
Error using niftiwrite>parseInputs (line 165)
'Version' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for this function.
The option is not there:
% Parse the PV pairs
parser = inputParser;
parser.addParameter('Combined', true, @(x)canBeLogical(x));
parser.addParameter('Compressed', false, @(x)canBeLogical(x));
parser.addParameter('Endian', 'little', @(x)ischar(x));
parser.addOptional('Info', [], @(x)validateHeader(V,x));
parser.parse(varargin{:});

채택된 답변

Walter Roberson
Walter Roberson 2020년 1월 28일
You are reading the documentation for a newer version than you have. The 'Version' option was added in R2019a.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Neuroimaging에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by