I have a 3d pixel data and I want to fit ellipsoid to it . Is there a way to fit ellipsoids to 3d image.
So far I have included an ellipsoid to my data and rotated it . I have been trying to fit ellipsoid by manually in python by changing semi-major axis along x,y,z axis of the ellipsoid for each desired rotation.
What I wish to attain is an automatic way in which the ellipsoid rotates and every time it goes to different angle it would fit an ellipsoid to the data .
The images below describe the data in blue and ellipsoid in Red . The ellipsoid in Red has been rotated at different angles in image 1 and 2. The fitting was done in python by changing parameters of ellipsoid manually in the first image .
The fitting has to be such that all the elongated structures in the image should be fitted with the ellipsoid. As we can see in the figure below that there are many elongated structures specially in the lower end of the image which need to be fitted.