Ifanbeam FanRotationIncrement wrong length error

Hi I keep getting the error 'Error using fan2para>formMinimalThetaVector (line 298) Internal Problem: FanRotationAngles has the wrong length.' when this code is reached:
distSourceToDetector = dICOMREAD.DistanceSourceToDetector;
totalPixelLength = distSourceToDetector/pixelSize(1);
pixelsToCenter = totalPixelLength/2;
F1 = fanbeam(transverse(:,:,16),pixelsToCenter,'FanSensorGeometry', 'line');
finv2 = ifanbeam(F1,pixelsToCenter,'FanSensorGeometry', 'line',...
'FanCoverage','minimal','FanRotationIncrement',1);
Any Ideas please?

4 commentaires

Matt J
Matt J le 9 Fév 2018
Modifié(e) : Matt J le 9 Fév 2018
You would need to provide F1 and pixelsToCenter for us to test it ourselves.
I would, in any case, be cautious about relying on fanbeam/ifanbeam. I still see the same nonlinear behavior in R2017b as I saw 4 years ago in R2013a.
Hi apologies, edited, dICOMREAD is the variable used to read one of the CT image's dicom data.
Can you provide some sample data from dlCOMREAD so that we can test this script at our end for debugging purpose?
Hi Please find attached the files, common just sets up some objects that are reused, the file Lab1_5 is the main file and the ima file (Siemens dicom file) is a CT slice of a phantom. Thanks

Connectez-vous pour commenter.

Réponses (1)

Arvind Narayanan
Arvind Narayanan le 5 Mar 2018
Modifié(e) : Arvind Narayanan le 5 Mar 2018

0 votes

Okay. So I was able to get the script working on the test data you have provided. The change I made was to change the FanCoverage parameter at line 15 from "minimal" to "cycle". This change caused the rotation increment parameter to be taken properly and the calculation completed generating the images as needed. Maybe you should look at the input data you are feeding to the ifanbeam function to ensure that it is consistent and valid. Refer the documentation of ifanbeam for more details: link

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by