<div dir="ltr">Hi Tariq,<div><br></div><div>It would be easier to diagnose with a full code listing that includes the class instantiation so we know what classes you are using. As it is, I can guess that you are using vtkImageThreshold instead of vtkThreshold. vtkImageThreshold will not clip away the cells you don't want - you need to use vtkThreshold to do that. vtkImageThreshold will produce a vtkImageData output where the voxel values may change, but it won't clip away any data.</div><div><br></div><div>On a side note, I recommend that you do the following to set up your pipeline:</div><div><br></div><div>vtkJPEGReader* jpgRead = vtkJPEGReader::New();</div><div>jpgRead->SetFileName(y.c_str());</div><div><br></div><div>vtkThresholdFilter* thresholder = vtkThresholdFilter::New();</div><div>threshold->SetInputConnection(jpgRead->GetOutputPort());</div><div><br></div><div>vtkDataSetSurfaceFilter* dataSurface = vtkDataSetSurfaceFilter::New();</div><div>dataSurface->SetInputConnection(threshold->GetOutputPort());</div><div><br></div><div>vtkPolyDataMapper* pMapper = vtkPolyDataMapper::New();</div><div>pMapper->SetInputConnection(dataSurface->GetOutputPort());</div><div>...</div><div><br></div><div>Note that you do not need to explicitly update each filter - the pipeline will figure out when each filter needs to be updated.</div><div><br></div><div>Thanks,</div><div>Cory</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 9:09 PM, tariq <span dir="ltr"><<a href="mailto:tdinar@gmail.com" target="_blank">tdinar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi Cory,<br>
this is the code I wrote<br>
    jpgRead->SetFileName(y.c_str());<br>
    jpgRead->Update();<br>
    imageData = jpgRead->GetOutput();<br>
    imageThreshold->SetInputData(imageData);<br>
    unsigned char lower = 250;<br>
    unsigned char upper = 255;<br>
    imageThreshold->ThresholdBetween(lower, upper);<br>
    imageThreshold->ReplaceInOn();<br>
    imageThreshold->SetInValue(255);<br>
    imageThreshold->Update();<br>
    dataSurface->DataSetExecute(imageThreshold->GetOutput(), pData);<br>
    pMapper->SetInputData(pData);<br>
    outputtActor->SetMapper(pMapper);<br>
    outputtActor->GetProperty()->SetRepresentationToWireframe();<br>
    inputActor->SetInputData(imageData);<br>
<br>
 rendering input on the left and output on the right (wireframe). All the<br>
cells (black or white are propagated to the output). how can I get hold of<br>
the black cells only? I would settle for that, instead of the boundary of<br>
the black cells region.<br>
I appreciate the help.<br>
<<a href="http://vtk.1045678.n5.nabble.com/file/n5734545/Screen_Shot_2015-10-23_at_6.png" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5734545/Screen_Shot_2015-10-23_at_6.png</a>><br>
Thanks.<br>
T.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Image-Blob-as-polydata-tp5734533p5734545.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/Image-Blob-as-polydata-tp5734533p5734545.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>