Re: is there a 3D equivalent of CONTOUR? [message #68240] |
Thu, 08 October 2009 06:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Dorthe Wildenschild writes:
> excellent, - but I can't get it to work.. not very good at working
> with objects I'm afraid - I do it once every 3 years or so :-)
>
> Here's what I do:
>
> I use LABEL_REGION to separate all the objects in my image and then I
> pick one in a loop structure, representing "t" below
>
> ISOSURFACE, label_image,
> t, Outverts, Outconn
> ; print, outverts
> Roi=Obj_New('IDLanROI', Outverts, type=2)
>
> Status = Roi-> ComputeGeometry(Area=area,Perimeter=perimeter,
> Centroid=centroid)
>
> t_perimeter(r)=perimeter
> t_area(r-1)=area
> t_x_center(r)=centroid[0]
> t_y_center(r)=centroid[1]
> blob_siz(r)=blob_size[1]
>
> I get lots of values in Outverts, but area, perimeter etc. are all
> zero?
> Any ideas for the slightly incompetent...?
Humm, well, it must have something to do with what you are
passing to isosurface. I have no problems with this code:
IDL> vol = loaddata(8)
IDL> minmax, vol
0 232
IDL> isosurface, vol, 150, verts, conn
IDL> help, verts
VERTS FLOAT = Array[3, 178729]
IDL> roi = obj_new('idlanroi', verts)
IDL> status = roi -> computegeometry(perimeter=p, area=a, centroid=c)
IDL> print, p
361882.75
IDL> print, a
5674.0855
IDL> print, c
-35.847264 107.88590 42.979445
> BTW, nice to see you're still very active on this site.
"Active" is probably too strong a verb. Most of what is
discussed here these days is over my head. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: is there a 3D equivalent of CONTOUR? [message #68246 is a reply to message #68240] |
Thu, 08 October 2009 02:11   |
dorthe
Messages: 12 Registered: April 2007
|
Junior Member |
|
|
On Oct 7, 9:05 am, David Fanning <n...@dfanning.com> wrote:
> Dorthe Wildenschild writes:
>> I'm trying to use the ComputeGeometry function in 3 dimensions, but to
>> define my ROI, I need to outline (contour, or at least that's how I do
>> it 2D) my objects - and they're 3D. Any suggestions out there?
>
> ISOSURFACE?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Coyote's Guide to IDL Programming (www.dfanning.com)
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
excellent, - but I can't get it to work.. not very good at working
with objects I'm afraid - I do it once every 3 years or so :-)
Here's what I do:
I use LABEL_REGION to separate all the objects in my image and then I
pick one in a loop structure, representing "t" below
ISOSURFACE, label_image,
t, Outverts, Outconn
; print, outverts
Roi=Obj_New('IDLanROI', Outverts, type=2)
Status = Roi-> ComputeGeometry(Area=area,Perimeter=perimeter,
Centroid=centroid)
t_perimeter(r)=perimeter
t_area(r-1)=area
t_x_center(r)=centroid[0]
t_y_center(r)=centroid[1]
blob_siz(r)=blob_size[1]
I get lots of values in Outverts, but area, perimeter etc. are all
zero?
Any ideas for the slightly incompetent...?
BTW, nice to see you're still very active on this site.
Dorthe
|
|
|
|
Re: is there a 3D equivalent of CONTOUR? [message #68301 is a reply to message #68240] |
Tue, 13 October 2009 03:02  |
dorthe
Messages: 12 Registered: April 2007
|
Junior Member |
|
|
On 8 Oct, 15:50, David Fanning <n...@dfanning.com> wrote:
> Dorthe Wildenschild writes:
>> excellent, - but I can't get it to work.. not very good at working
>> with objects I'm afraid - I do it once every 3 years or so :-)
>
>> Here's what I do:
>
>> I use LABEL_REGION to separate all the objects in my image and then I
>> pick one in a loop structure, representing "t" below
>
>> ISOSURFACE, label_image,
>> t, Outverts, Outconn
>> ; print, outverts
>> Roi=Obj_New('IDLanROI', Outverts, type=2)
>
>> Status = Roi-> ComputeGeometry(Area=area,Perimeter=perimeter,
>> Centroid=centroid)
>
>> t_perimeter(r)=perimeter
>> t_area(r-1)=area
>> t_x_center(r)=centroid[0]
>> t_y_center(r)=centroid[1]
>> blob_siz(r)=blob_size[1]
>
>> I get lots of values in Outverts, but area, perimeter etc. are all
>> zero?
>> Any ideas for the slightly incompetent...?
>
> Humm, well, it must have something to do with what you are
> passing to isosurface. I have no problems with this code:
>
> IDL> vol = loaddata(8)
> IDL> minmax, vol
> 0 232
> IDL> isosurface, vol, 150, verts, conn
> IDL> help, verts
> VERTS FLOAT = Array[3, 178729]
> IDL> roi = obj_new('idlanroi', verts)
> IDL> status = roi -> computegeometry(perimeter=p, area=a, centroid=c)
> IDL> print, p
> 361882.75
> IDL> print, a
> 5674.0855
> IDL> print, c
> -35.847264 107.88590 42.979445
>
>> BTW, nice to see you're still very active on this site.
>
> "Active" is probably too strong a verb. Most of what is
> discussed here these days is over my head. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")- Hide quoted text -
>
> - Show quoted text -
Ok, so I need to step back and make sure I'm passing correct data to
isosurface.
Or bail and use Avizo Fire instead - oops perhaps I lose my right to
post here if I do that :-)
Thanks for helping, I'll give it another try.
Dorthe
|
|
|