How can i view the .tiff file. I am able to read the .tif file but i am not able to view it. I used the following code to view, but its not working.
clear all; close all; clc
obj = Tiff('clipped_row2.tif','r');
i = 1;
while 1
subimage = obj.read();
subimages(:,:,:,i) = subimage(:,:,1:3);
if (obj.lastDirectory())
break;
end
obj.nextDirectory()
i = i+1;
end
dicomwrite( subimages, 'output_image.dcm');
dicomanon('output_image.dcm', 'output_anon.dcm');
X = dicomread('output_image.dcm');
4 Comments
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473154
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473154
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473155
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473155
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473196
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473196
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473222
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/350754-how-to-read-and-view-the-tif-file-in-matlab#comment_473222
Sign in to comment.