-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
optimizationEnsure that code runs faster with unchanged functionalityEnsure that code runs faster with unchanged functionality
Milestone
Description
Description
We should do a small follow-up on 35feb2f & 28fea18 from #799, where we simplify the code. We can easily merge xASL_im_ResampleLinearFair_1D_1/2/3 into a single sub-function, if we introduce the current dimension as an input parameter.
Idea:
%% 1-dimensional change n-th dimension
function output_res = xASL_im_ResampleLinearFair_1D(old_res,new_res,dim)
for k=1:size(new_res,1)
startDim =(k-1)* (size(old_res,dim) / size(new_res,dim));
endDim =k * (size(old_res,dim) / size(new_res,dim));
...
end
endRequirements
Optional: add feature requirements here
How to test
xASL_im_ResampleLinearFair is used in a few places. One of them is even in xASL_init_VisualizationSettings.m. We should test at least one 1D example.
Release notes
Refactored xASL_im_ResampleLinearFair code.
Metadata
Metadata
Assignees
Labels
optimizationEnsure that code runs faster with unchanged functionalityEnsure that code runs faster with unchanged functionality