Skip to content

Commit

Permalink
Test nearest neighbor mode of resize function (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
faridyagubbayli authored Oct 19, 2023
1 parent 4f4db2d commit bd31838
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
output_file = 'collectedValues/resize.mat';
recorder = utils.TestRecorder(output_file);

% TODO: test also for nearest
% interp_methods = {'nearest', 'linear'};
interp_methods = {'linear'};
interp_methods = {'nearest', 'linear'};

% Generate a random 3D volume with dimensions Nx x Ny x Nz
Nx = randi([10,20]);
Expand All @@ -30,4 +28,3 @@

end
recorder.saveRecordsToDisk();

Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ def test_resize():

assert np.allclose(expected_resized_volume,
resized_volume), f"Results do not match for {i + 1} dimensional case."
reader.increment()

logging.log(logging.INFO, 'revolve2d(..) works as expected!')
logging.log(logging.INFO, 'resize(..) works as expected!')

0 comments on commit bd31838

Please sign in to comment.