Applying Gaussian 3D filter to 32 bit float 3D Micro-CT image

1 回表示 (過去 30 日間)
Hege
Hege 2020 年 10 月 10 日
コメント済み: Hege 2020 年 10 月 20 日
Hi All,
I have a Micro-CT data file to process it through Matlab as shown in below. My array is a 3D array and it is 32 bit float. but gaussian filters which are introduced in mathworks are not supported to float data type
fid = fopen('E:\RE\re_C_7mm_6um_1d42s_01\re_C_7mm_6um_1d42s.vol');
voxels = fread(fid, '*float32'); %read as 32 bit float. I'm assuming they are 32 bit float(CT data)
fclose(fid);
voxels = reshape(voxels,[1920,1920,1536]);
d=imbinarize(voxels,95); % Thresholding the volume
d1=imgaussfilt3(d) % This lines gives me an error that it supports only for uint,int, single or double.check the error
What I should do to filter my 3D array using the gausfilt3 command? Appreciate your valuable advices. I want to remove the P(see the attached image)with or without gausfilt3.Appreciate your valuable adivces!
Error is shown below. A is the file for the filtering. If you check the gaussfilt3 command in mathworks A is defined. it is not my own name.
Error using imgaussfilt3
Expected A to be one of these types:
uint8, uint16, uint32, int8, int16, int32, single, double
Instead its type was logical.
Error in imgaussfilt3>parseInputs (line 285)
validateattributes(A, supportedClasses, supportedImageAttributes, mfilename, 'A');
Error in imgaussfilt3 (line 116)
[A, options] = parseInputs(args{:});
Error in volreading (line 55)
d1=imgaussfilt3(d)

回答 (1 件)

Image Analyst
Image Analyst 2020 年 10 月 11 日
Try imfilter() with your own custom kernel that is a Gaussian shape.
  11 件のコメント
Hege
Hege 2020 年 10 月 15 日
Thank you Image Analyst.
Honestly, I tried the d=double(voxels) command first. may be then something wrong in my script.
Actually, what I am trying to do is ,voxels values more than 95 should be 1 and if not it should be zero. Further, voxels values less than 220 should be 1 and if not it should be zero. That is what I am trying to do at the moment. Appreciate if you can show if there is any mistake of way I am trying to do thresholding.Thank you
Hege
Hege 2020 年 10 月 20 日
Thank you for your support Image Analyst. I thresholeded the 3D volume and heading for the skeletonization. But I got the values from Micro-CT experimental works. Thank you in Advance

サインインしてコメントする。

カテゴリ

Help Center および File Exchange3-D Volumetric Image Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by