Opening images using a community created package

2 次查看(过去 30 天)
Ok, so this is slightly complicated. I'll explain what i'm attempting to do and the provide the code.
I work in a biology lab that uses proprietary equipment for High Content Analysis: Many pictures that have algorithms run on them to determine the amount of 'objects' in a picture. In our case, these are cells, proteins, etc. We upgraded our system to their newest software (previously ran on Windows XP -> upgraded to Windows 7). Because of this upgrade we the software no longer handles our old data files.
This is where the fun starts! I found a package created by a community https://www.openmicroscopy.org/site/support/omero5.2/developers/Matlab.html that runs some Java processes to extract the data from the files I need to use. These file types are .C01.
Extracting the images: These are example filenames
AS-PC-7157_150401160001_B03f00d0
AS-PC-7157_150401160001_B03f00d1
AS-PC-7157_150401160001_B03f00d2
AS-PC-7157_150401160001_B03f00o1
AS-PC-7157_150401160001_B03f00o2
You'll notice they have slightly different names. These just represent what image it is. Ex: ComputerName_IDNumber_'Series''Well'Plane'.There are roughly 2600 files in total. With the package mentioned above, I can extract an image from a SINGLE file. This is a problem because these images are in slices, or sections. I need to put together all of the files with **_***_**d0.C01 ending, all the files with **_***_**d1.C01, and all the files with **_***_**d2.C01, etc. My ultimate goal is to have them as a mosaic. This image is quite simplified but shows what I need to do (only the top layer).
Here is the code i'm currently using. My goal is to loop through all tthese images and put them into a mosaic format like above.
clear all
clc
close all
p = dir('C:\Users\LeeAllers\Desktop\AS-PC-7157_150401160001\AS-PC-7157_150401160001\*d1.C01');
n = length(p);
for i = 1 : n
str = p(i).name;
data = bfopen();
%Get Series Data and Color Maps
for i = 1:length(data)
series{i} = data{i,1};
series_ColorMaps = data{i,3};
end
clear data
%Get Plane Data
for j = 1: length(series)
F = series{j};
planecount = size(F,1);
for i = 1:planecount
series_plane{i} = F{i, 1};
series_label{i} = F{i, 2};
end
end
clear planecount,i,j,F
%Making subplot
%SP = length(data)/2;
%for i = 1:SP
%for i = 1 : length(series_plane)
%F(i) = figure('Name', series_label{i});
%imConvert = cell2mat(series_plane(i));
%imshow(imConvert);
end

回答(1 个)

Steven Lord
Steven Lord 2017-1-20
If you concatenate all the indexed image data into a 3-D array using functions like horzcat (aka [a, b]), vertcat (aka [a; b]), and cat or using indexed assignment I believe the contourslice function (as shown in the "Displaying 3-D Contour Slices" section of this documentation page) will allow you to visualize the data as you described.
If you're not sure how to store the data in a 3-D array, take a look at this small example:
% Preallocate the 3-D array to be filled
A = zeros(10, 10, 3);
% Fill in one of the 'tiles' in A; first 5 rows, last 5 columns, second slice/page
A(1:5, 6:10, 2) = magic(5)

类别

Help CenterFile Exchange 中查找有关 Biomedical Imaging 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by