Hi..
I tried to create a sphere and then threshold the sphere. The image
after thresholding appears to be smaller. i want it to be in the same
size as the original 3D iamge. I'm not sure if i am scaling it down.
Please help me
Thanks,
Pushya
The code i wrote is attached below:
PRO createsphere
sphere = FltArr(40, 40, 40)
FOR x=0,39 DO FOR y=0,39 DO FOR z=0,39 DO $
sphere(x, y, z) = SQRT((x-20)^2 + (y-20)^2 + (z-20)^2)
Shade_Volume, sphere, 16, vertices, polygons, /LOW, /VERBOSE
Scale3, XRange=[0,40], YRange=[0,40], ZRange=[0,40]
image = PolyShade(vertices, polygons, /T3D)
TV, image
sphere = bytscl(sphere)
threshim = sphere ge 50
help, threshim
threshim = congrid(bytscl(threshim),40,40,40)
;print, threshim
shade_volume, threshim, 20, v, p, /LOW, /VERBOSE
Scale3, XRange=[0,40], YRange=[0,40], ZRange=[0,40]
image1 = PolyShade(v,p, /T3D)
TV, image1
END
|