Morphological opening of volumetric DICOM images

I understand the concept of opening of 2D binary images but never used such opening on volumetric data as in the code below.

nhood = ones([3 3 3]); 
bw = imopen(bw,nhood); % bw is binary volumetric MRI data (28 slices) 

If I create a structure element of ones([3 3]), this means it has three rows and three columns, but in the code above it is ones([3 3 3]). First 3 is for number of rows, the second for number of columns, but what is the remaining 3?

Answers


You have to think about volumes instead of images. You can call the third dimension and slices, and plot each of the slices:

bw = imopen(bw,nhood);
[nRows, nCols, nSlics] = size(bw);
disp(['There are ', num2str(nSlics), 'with dimensions ', num2str(nRows), ' x ', num2str(nCols)])

for ii=1:nSlics
   figure();
   imshow(squeeze(bw(:,:,ii)));
   title(['Slice ', num2str(ii), '/', num2str(nSlics)]);
end

See all: techniques-for-visualizing-scalar-volume-datatechniques-for-visualizing-scalar-volume-data


When working in 3D, you want your structuring element be a 3D cube (containing 3*3*3=27 voxels) within your 3D volume:


Need Your Help

How to determine if client expects a JSON response

python http http-headers mime-types

In my Werkzeug application I am intercepting all error responses and trying to respond with a JSON response if the client expects JSON or return the usual HTML page with 404 or 500:

Styling of nav links on scroll

javascript jquery css3

I'm trying to make an effect similar to: https://streetart.withgoogle.com/en/artist-stories