bfopen()
image_data=ans{1,1};
pixel_data=image_data(:,1);
total_laser_channels=input('How many laser channels were used to acquire this image?\n');
images_per_channel=length(pixel_data)/total_laser_channels;
*
if total_laser_channels==1
channel1{images_per_channel,:}=[];
elseif total_laser_channels==2
channel1{images_per_channel,:}=[];
channel2{images_per_channel,:}=[];
elseif total_laser_channels==3
channel1{images_per_channel,:}=[];
channel2{images_per_channel,:}=[];
channel3{images_per_channel,:}=[];
elseif total_laser_channels==4
channel1{images_per_channel,:}=[];
channel2{images_per_channel,:}=[];
channel3{images_per_channel,:}=[];
channel4{images_per_channel,:}=[];
elseif total_laser_channels==5
channel1{images_per_channel,:}=[];
channel2{images_per_channel,:}=[];
channel3{images_per_channel,:}=[];
channel4{images_per_channel,:}=[];
channel5{images_per_channel,:}=[];
else
break
end*
i=1;
while i<length(pixel_data)+1
if total_laser_channels==1
channel1=[channel1;pixel_data(i,1)];
i=i+1;
elseif total_laser_channels==2
channel1=[channel1;pixel_data(i,1)];
channel2=[channel2;pixel_data(i+1,1)];
i=i+2;
elseif total_laser_channels==3
channel1=[channel1;pixel_data(i,1)];
channel2=[channel2;pixel_data(i+1,1)];
channel3=[channel3;pixel_data(i+2,1)];
i=i+3;
elseif total_laser_channels==4
channel1=[channel1;pixel_data(i,1)];
channel2=[channel2;pixel_data(i+1,1)];
channel3=[channel3;pixel_data(i+2,1)];
channel4=[channel4;pixel_data(i+3,1)];
i=i+4;
elseif total_laser_channels==5
channel1=[channel1;pixel_data(i,1)];
channel2=[channel2;pixel_data(i+1,1)];
channel3=[channel3;pixel_data(i+2,1)];
channel4=[channel4;pixel_data(i+3,1)];
channel5=[channel5;pixel_data(i+4,1)];
i=i+5;
else
display('Too many or wrong number of laser channels.')
break
end
end