comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » extract circle from data with idl
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: extract circle from data with idl [message #94781 is a reply to message #94780] Wed, 11 October 2017 05:41 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 10/11/2017 02:23 PM, termybel@gmail.com wrote:
> How can extract an circle or an ellipse from my data with IDL?
> With a contour plot my data form a circle, I need to know the center
> of this circle. From the geometry I know that if I know 3 points I
> can extract a circle, are there routine or function something else in
> IDL that using, reading my data, can give me the center?

;; without using the properties of the circle or ellipse:

; DATA being the data to be contoured
data=2-(([-1:1:.1]^2)#replicate(1.,21))-(replicate(1.,21)#([ -1:1:.1]^2))
; LEVEL the appropriate level to contour
level=1.
contour, data, path_info=li, path_xy=lines, /path_data_coord, $
levels=[level], /path_double
if n_elements(li) ne 1 then message, 'not exactly 1 contour'

cont_obj =obj_new('IDLanROI',lines)
void= cont_obj.ComputeGeometry(centroid=center)

print, center[0:1]

;; otherwise use math to calculate the center
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using color tables in function graphics
Next Topic: graphic functions - CopyWindow()

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:21:11 PDT 2025

Total time taken to generate the page: 0.00185 seconds