From b325933591cd1d0d534a90ad5a417c2d03a0c6f3 Mon Sep 17 00:00:00 2001 From: Pasca Date: Wed, 29 Mar 2017 16:46:28 +0100 Subject: Initial revision --- supp/add_wedges.m | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 supp/add_wedges.m (limited to 'supp/add_wedges.m') diff --git a/supp/add_wedges.m b/supp/add_wedges.m new file mode 100644 index 0000000..8b8f2a7 --- /dev/null +++ b/supp/add_wedges.m @@ -0,0 +1,30 @@ +% create a wedge mask to simulate the missing wedge + +[rows, columns] = size(sino_zing_rings); +grayImage = ones(rows, columns, 'uint8'); +xCoords = [0 360 0]; +yCoords = [35 7 7]; +mask = poly2mask(xCoords, yCoords, rows, columns); +grayImage(mask) = 0; + +xCoords = [727 360 727]; +yCoords = [35 7 7]; +mask = poly2mask(xCoords, yCoords, rows, columns); +grayImage(mask) = 0; + +xCoords = [0 360 0]; +yCoords = [145 173 173]; +mask = poly2mask(xCoords, yCoords, rows, columns); +grayImage(mask) = 0; + +xCoords = [727 360 727]; +yCoords = [145 173 173]; +mask = poly2mask(xCoords, yCoords, rows, columns); +grayImage(mask) = 0; + +grayImage(1:7,:) = 0; +grayImage(173:end,:) = 0; + +%figure; imshow(grayImage, [0 1]); +MW_sino_artifacts = sino_zing_rings.*double(grayImage); +%Dweights = Dweights.*double(grayImage); \ No newline at end of file -- cgit v1.2.3