SmallBlob3D

Extract the smallest white blob from a binary image.

 

function call:

[out_img1]=vsg('SmallBlob3D',in_img1);

 

Arguments:

in_img1 - input image, a DICOM image which is binary, i.e. with values 0 or 255;

 

Description:

out_img1 – a DICOM image. The input image is processed such that each connected region is given an individual label. These labels are then re-ordered such that the largest blob will have the lowest label and the smallest blob, the highest label. The smallest object is then thresholded and returned in the output image.

 

Example:

[filename, chosenDirectory] = uigetfile('*.dcm', 'Pick an M-file');

filePath = [chosenDirectory filename];

stackOfImages=vsg('DICOMRead',filePath);  %4D array of data

[out_img1]=vsg('Threshold',stackOfImages,500);

[out_img2]=vsg('SmallBlob3D',out_img1);

 

Notes:

1. For RGB or Dicom images, the function operates on all colour planes or slices separately.

2. Dicom images require XMedCon software (version xmedcon-0.10.5-1-win32).

3. DICOM data must be in a separate folder.

Home       Functions       Back