After tackling the things above, you have to remove the U shaped object from the image.
You don't have to use imfill necessarily; you can come up with anything. I can recommend
another way to solve it. For example if you create a cylinder which has values 1 inside
and 0 outside; and place it so that it contains only the VOI (volume of interest) we are
interested and excludes the U shaped object; then you can multiply it with data which
will solve the problem. You can implement it as follows:
Toujours pour le même projet,
Je dois supprimer de mon volume une forme en U
J ai pense a utiliser un volume cylindrique qui contiendrait le volume d interet (valeur 1 a l interieur et 0 a l exterieur) et que je multiplierai avec par une bonne donnee pour supprimer ce U
mais je bloque pour identifier X_DIM, Y_DIM, Z_DIM, RADIUS et leurs centres.
Merci d avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 [X Y Z] = meshgrid(1:<X_DIM>, 1:<Y_DIM>, 1:<Z_DIM>); cylinder_mask = (X - <CENTER_ON_X_DIMENSION>).^2+(Y - CENTER_ON_Y_DIMENSION).^2 < <RADIUS>2; % Then finally you multiply it with the image; new_volume = uniform_volume.*cylinder_mask;
Partager