Re: slicing a mask from a volume [message #67066] |
Wed, 24 June 2009 06:13 |
Tibor47
Messages: 2 Registered: March 2009
|
Junior Member |
|
|
On Jun 23, 5:15 pm, Dan <Tibo...@hotmail.com> wrote:
> I'm trying to extract a mask from a 3D shape defined by a series
> of ROI's that I've grouped into an IDLanROIgroup object. I'm trying to
> use the compute mask function to make a mask by defining a plane that
> cuts through the 3D shape except it only gives me a blank mask. I've
> had success with it before but it only works when the plane matches a
> plane of an exisiting ROI in the group. Can the IDLanROIgroup object
> extract a mask given a plane that cuts through the 3D shape at an
> arbitrary angle? I would like to avoid having to create a volume and
> making slices from that since it's memory intensive.
>
> Here is a bit of the code just incase the error is trivial
>
> (*pInfo).roi_obj1[i] ->GetProperty, DATA = data ;getting ROI points
> image1 = (*pInfo).roi_obj1[i] ->COMPUTEMASK(Dimensions = [MAX(data
> (0,*)),max(data(1,*))],MASK_RULE = 2, PLANE_NORMAL =
> [0,0,1],PLANE_XAXIS = [1,0,0], LOCATION = [0,0,data(2,0)]) ; getting
> mask of roi in first object (succeeds)
> Xaxis = [1,0,0]#transform(0:2,0:2) ; transforming plane of first ROI
> to the appropriate location of the second object
> Location = [0,0,data(2,0),1]#transform
> Normal = [0,0,1]#transform(0:2,0:2)
>
> image2 = (*pInfo).roi_cont2 ->COMPUTEMASK(Dimensions = [MAX(data
> (0,*)),max(data(1,*))],MASK_RULE = 2,PLANE_NORMAL = Normal,PLANE_XAXIS
> = Xaxis,LOCATION = Location(0:2)) ; I have verified through 3D
> visualization that this plane is in the appropriate spot but image2
> always turns up blank. The size of the image is also more than
> adequate, so it should produce something.
Whoops sorry ignore this, I suppose i should have looked at the IDL
help section a little closer. I found that mesh_clip can do this.
|
|
|