Skip to content

Commit

Permalink
Update resizeScanAndMask.m
Browse files Browse the repository at this point in the history
Better alignment for padded img with odd vox length
  • Loading branch information
locastre committed May 6, 2021
1 parent 149fad4 commit 85c0680
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CERR_core/DLSegmentationTraining/resizeScanAndMask.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@

case 'pad3d'

xPad = floor((outputImgSizeV(1) - origSizV(1))/2);
yPad = floor((outputImgSizeV(2) - origSizV(2))/2);
xPad = ceil((outputImgSizeV(1) - origSizV(1))/2);
yPad = ceil((outputImgSizeV(2) - origSizV(2))/2);

if xPad<0 || yPad<0
error(['To resize by padding, output image dimensions must be',...
Expand Down Expand Up @@ -384,4 +384,4 @@
end


end
end

0 comments on commit 85c0680

Please sign in to comment.