<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">Hi,</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"> Thank you very much for the reply. I have tried to two circular ROIs and two vtkImageStencil filters as follows:</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">/*******************************************************/</SPAN></div><SPAN style="RIGHT: auto"><FONT size=3>
<div>vtkImageReader reader</div>
<div>reader SetDataByteOrderToBigEndian</div>
<div>reader SetDataExtent 0 255 0 255 1 30</div>
<div>reader SetDataScalarTypeToChar</div>
<div>reader SetDataOrigin 0.0 0.0 0.0</div>
<div>reader SetDataSpacing 0.8 0.8 1.5</div>
<div>reader SetFilePrefix "images/"</div>
<div>reader SetFilePattern "%s%d.img"</div>
<div>reader SetNumberOfScalarComponents 1</div>
<div>reader Update</div>
<div>vtkImageCast cast</div>
<div>cast SetInputConnection [v16 GetOutputPort]</div>
<div>cast SetOutputScalarTypeToUnsignedShort</div>
<div>cast Update</div>
<div> </div>
<div>vtkROIStencilSource roiStencil2</div>
<div>roiStencil2 SetShapeToCylinderZ</div>
<div>roiStencil2 SetBounds 90 130 90 130 0 500</div>
<div>roiStencil2 SetInformationInput [cast GetOutput]</div>
<div> </div>
<div>vtkROIStencilSource roiStencil1</div>
<div>roiStencil1 SetShapeToCylinderZ</div>
<div>roiStencil1 SetBounds 70 135 70 135 0 500</div>
<div>roiStencil1 SetInformationInput [cast GetOutput]</div>
<div> </div>
<div>vtkImageStencil stencil1</div>
<div>stencil1 SetInput [cast GetOutput]</div>
<div>stencil1 SetStencil [roiStencil1 GetOutput]</div>
<div> </div>
<div>vtkImageStencil stencil2</div>
<div>stencil2 ReverseStencilOn</div>
<div>stencil2 SetInput [cast GetOutput]</div>
<div>stencil2 SetStencil [roiStencil2 GetOutput]</div></FONT></SPAN>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">/**********************************************************/</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">But it is not working. As after separating the first part, I need to work with that part, not the original image. But if I try to input one vtkROIStencilSource as input to second<VAR id=yui-ie-cursor></VAR> image stencil, it does not work. Do i need to convert to image the first stencil before using second stencil?</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">Thanks,</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">Hayden.</SPAN></div>
<div><BR></div>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr readonly="true" contenteditable="false"></DIV><FONT size=2 face=Arial><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> David Gobbi <david.gobbi@gmail.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Hayden Smith <s_hayden_28@yahoo.com> <BR><B><SPAN style="FONT-WEIGHT: bold">Cc:</SPAN></B> "vtkusers@vtk.org" <vtkusers@vtk.org> <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sunday, April 21, 2013 7:28 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [vtkusers] Setting VOI in a circular manner<BR></FONT></DIV>
<DIV class=y_msg_container><BR>You can probably do this with two circular ROIs and two<BR>vtkImageStencil filters, one after the other. Set ReverseStencilOn()<BR>for the second fllter.<BR><BR>On Sun, Apr 21, 2013 at 6:05 PM, Hayden Smith <<A href="mailto:s_hayden_28@yahoo.com" ymailto="mailto:s_hayden_28@yahoo.com">s_hayden_28@yahoo.com</A>> wrote:<BR>> Hello,<BR>> Thank you very much. I have been able to cut a circular portion from<BR>> the image and construct a polydata using your suggestion. Now suppose I have<BR>> set two circular ROIs one inside another in a cylindrical manner and I only<BR>> want to visualize the cylindrical portion, could any one suggest me how that<BR>> can be done.<BR>> Or is there any method available in VTK about cutting out a cylindrical<BR>> portion from the center of an object.<BR>><BR>> Thank in advance.<BR>><BR>> Regards,<BR>>
Hayden.<BR>> From: David Gobbi <<A href="mailto:david.gobbi@gmail.com" ymailto="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</A>><BR>> To: Hayden Smith <<A href="mailto:s_hayden_28@yahoo.com" ymailto="mailto:s_hayden_28@yahoo.com">s_hayden_28@yahoo.com</A>><BR>> Cc: "<A href="mailto:vtkusers@vtk.org" ymailto="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A>" <<A href="mailto:vtkusers@vtk.org" ymailto="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A>><BR>> Sent: Sunday, April 21, 2013 10:13 AM<BR>> Subject: Re: [vtkusers] Setting VOI in a circular manner<BR>><BR>> Hi Hayden,<BR>><BR>> The vtkROIStencilSource can generate a circular ROI for an image that<BR>> some of the other image filters can use, e.g. vtkImageStencil can<BR>> black out all pixels that are outside of the ROI.<BR>><BR>> - David<BR>><BR>> On Sun, Apr 21, 2013 at 8:58 AM, Hayden Smith <<A href="mailto:s_hayden_28@yahoo.com"
ymailto="mailto:s_hayden_28@yahoo.com">s_hayden_28@yahoo.com</A>> wrote:<BR>>> Dear VTK users,<BR>>> I would like to know while using vtkImageReader, is it possible to<BR>>> set VOI in a circular manner from the center of image? Current<BR>>> implementation shows setting of VOI in a rectangle.<BR>>><BR>>> Thanks and regards,<BR>>> Hayden.<BR>><BR>><BR><BR><BR></DIV></DIV></DIV></div></body></html>