You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that niftiread was released in Matlab version R2017b and it's a function in the core library. I am not familiar with Octave, all I know that is that Matlab files can be run in octave. Why I am I getting the above error?
function resize_nifti(input_dir, file_pattern)
files_to_scale = dir(fullfile(input_dir, file_pattern));
disp(files_to_scale);
scale_factor =2;
path = fullfile(files_to_scale.folder, files_to_scale.name);
disp(path);
% Originally scale_nifti function, put in here instead to have one function per file
disp("Scaling NIFTI file");
r = niftiread(path);
r_s = imresize3(r, scale_factor);
[path, name, ~] = fileparts(path);
save_path = fullfile(path, strcat(name, "_scaled.nii"));
disp(save_path);
niftiwrite(r_s, save_path);
end
All the disp statements execute and everything works fine up to the line disp("Scaling NIFTI file"), as soon as the niftiread statement is reached I get the above error. Do I need to somehow "import" niftiread? I'm guessing not since it should be built in. Or maybe the octave version I am using does not correspond to at least Matlab version R2017b. Is this the case?
Any ideas would be appreciated.
The text was updated successfully, but these errors were encountered:
I know that niftiread was released in Matlab version R2017b and it's a function in the core library. I am not familiar with Octave, all I know that is that Matlab files can be run in octave. Why I am I getting the above error?
All the
disp
statements execute and everything works fine up to the linedisp("Scaling NIFTI file")
, as soon as theniftiread
statement is reached I get the above error. Do I need to somehow "import" niftiread? I'm guessing not since it should be built in. Or maybe the octave version I am using does not correspond to at least Matlab version R2017b. Is this the case?Any ideas would be appreciated.
The text was updated successfully, but these errors were encountered: