Re: 3D images [message #39833 is a reply to message #39832] |
Mon, 21 June 2004 12:00   |
jnettle1
Messages: 27 Registered: January 2001
|
Junior Member |
|
|
Timm,
This is really cool, but now i'm wondering how you figure out things
like this :) Is there a book or some other resource (webpage?) that I
can tap into that deals with creating shapes in images mathmatically?
I can figure some basic stuff out myself (I can do a square! woohoo!)
but I'd like to learn more. Is this called morphometry?
Jeff
Timm Weitkamp <dont.try@this.address> wrote in message news:<Pine.LNX.4.44.0406211459060.1292-100000@localhost.localdomain>...
> On 18.06.04 at 13:49 -0700, Aleks wrote:
>
>> Hello,
>> this board has been very helpful and I was wondering if anyone could
>> help me with the following.
>> I'm trying to construct a cylinder. I made a circle in photoshop and
>> made 10 copies of the file just renaming it. (example circle_01.tiff,
>> ...._02.tiff etc)
>>
>> [...]
>
> If those images do not contain anything more than a binary image of a
> cylinder, then the best is to forget Photoshop and do everything in IDL.
> Like this, for example:
>
>
> ;; (code starts here)
>
> nx = 1600
> ny = 1200
> nz = 80
> radius = 500.0
>
>
> ;; Define coordinates
>
> xVec = FINDGEN(nx) - (nx -1 ) / 2.0
> yVec = FINDGEN(ny) - (ny -1 ) / 2.0
> x = xVec # (1.0 + FLTARR(ny))
> y = yVec ## (1.0 + FLTARR(nx))
> r = SQRT(x^2 + y^2)
>
>
> ;; Calculate image of filled circle
>
> circle = r LT radius
>
>
> ;; Extend circle into third dimension
>
> cylinder = REBIN(circle, nx, ny, nz)
>
>
> ;; "Cap" cylinder with zero slice on top and bottom
>
> cylinder[*, *, 0] = 0
> cylinder[*, *, nz-1] = 0
>
>
> ;; Fire up Slicer3 to visualize interactively
>
> SLICER3, PTR_NEW(cylinder)
>
>
> ;; (code ends here)
>
> In "Slicer3" you can then simply have a 3D isosurface plot drawn by
> selecting "Mode: Surface", then "Low", and clicking on "Display". After
> that, there are lots of ways to change angles, color, etc.
>
> There are alternatives to SLICER3, among which are XVOLUME and Volume
> Objects. Just try and see which suits you best.
>
> Hope this helps
>
> Timm
|
|
|