Colon Tissue Image Help
5 views (last 30 days)
Show older comments
I have several tissue section images from a resected sigmoid colon and rectum biopsy

that I have been able to process into the following:

using the following code:
- * baseFileName = 'Test_9.tif';
- *
- * load Tissue_Section_9.mat p_9;
- * load Tissue_Section_9L.mat p_9L;
- *
- * p = p_9 - p_9L;
- * labeledImage = bwlabel(p, 8);
- *
- * c = 9;
- *
- * % Determine where demo folder is (works with all versions).
- * Openfolder = fileparts(which(baseFileName));
- * OpenfullFileName = fullfile(Openfolder, baseFileName);
- *
- * I = imread(baseFileName);
- * % If we get here, we should have found the image file.
- * originalImage = I;
- * figure;
- * subplot(2, 2, 1);
- * imshow(originalImage);
- * title(['Color Tissue Section Number ',num2str(c),]);
- *
- * % Check to make sure that it is grayscale, just in case the user substituted their own image.
- * [rows, columns, numberOfColorChannels] = size(originalImage);
- * if numberOfColorChannels > 1
- * % Do the conversion using standard book formula
- * originalImage = rgb2gray(originalImage);
- * end
- *
- * % Display the grayscale image.
- * subplot(2, 2, 2);
- * imshow(originalImage);
- * title('Grayscale Tissue Section Image');
- *
- * % Get all the blob properties.
- * subplot(2, 2, 3);
- * imshow(labeledImage, []); % Show the gray scale image.
- * title('Segmentation Tissue Section Image');
- *
- * % Get all the blob properties.
- * blobMeasurements = regionprops(labeledImage, originalImage, 'all');
- * numberOfBlobs = size(blobMeasurements, 1);
- *
- * keeperIndexes = find(blobMeasurements.FilledArea ~= 0);
- * TissueBinaryImage = ismember(labeledImage, keeperIndexes);
- * maskedImageTissue = originalImage; % Simply a copy at first.
- * maskedImageTissue(~TissueBinaryImage) = 0; % Set all non-tissue pixels to zero.
- *
- * subplot(2, 2, 4);
- * imshow(maskedImageTissue, []);
- * title('All Non-Tissue Pixels = Zero');
- * % Get the default filename and then apend the file name with the results
- * ResultsName = sprintf('%s/TS_Array_Image_%s.tif', Openfolder, num2str(c));
- * % Save the labeled image as a tif image.
- * % To save the current figure, specify fig as gcf.
- * saveas(gcf,ResultsName);
- * % To close the current figure
- * close(gcf);
- *
- * figure;
- * imshow(maskedImageTissue, []);
- * % Get the default filename and then apend the file name with the results
- * ResultsName = sprintf('%s/TS_%s.tif', Openfolder, num2str(c));
- * % Save the labeled image as a tif image.
- * % To save the current figure, specify fig as gcf.
- * saveas(gcf,ResultsName);
- * % To close the current figure
- * close(gcf);
I would like to take the 20 sectioned images and recreate the colon within a 3D image, but for the love of all thing holy, I can not figure out a "good way" to create the 3D image of all of the sections.
I have though about using 3D Spline Curves to help connect the tissue sections and to give the viewer a better representation of the section images with respect to the rectum and sigmoid colon, but nothing I have tired seemed to have worked.
Each section was prepared using a microtome into 3 mm thick slices.
If you could offer any advice or know of any examples, I would be very great full.
0 Comments
Answers (1)
Image Analyst
on 26 Jun 2016
Use cat(3, image3D, maskedImageTissue) to append slices. For the very first image, you'll have to create image3D with the line of code
image3D = maskedImageTissue;
but then for image #2 onward, use
image3D = cat(3, image3D, maskedImageTissue)
2 Comments
Image Analyst
on 26 Jun 2016
Maybe use cat(3,...) multiple times to "stretch out" the slice. Or else use imresize() to specify the new, larger number of slices in the z direction.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!