[vtkusers] Threshold - problem solved

Paulo Neves paulo.alex.neves at gmail.com
Fri Apr 20 13:18:18 EDT 2012


Dear vtk users,

Just found out the problem. 

- Code needed:
threshold->ReplaceOutOn();

- Code removed:
threshold->ReplaceInOn();

Now values are from 0 to 3000 as expected.

Best regards,

> Dear vtk users.
> 
> I am trying to perform a simple threshold over a 3D data set obtained from DICOM images.
> 
> I can render the data set before and after the threshold. Tried 2 approaches:
> 
> - vtkImageThreshold
> vtkSmartPointer<vtkImageThreshold> threshold = vtkSmartPointer<vtkImageThreshold>::New();
> 	threshold->ThresholdBetween(700, 3000);
> 	threshold->SetInputConnection(reader->GetOutputPort());
> 	threshold->ReplaceInOn();
> 	threshold->Update();
> 
> I get exactly the same scalar values (range is between -2047 and 6143), so no threshold is actually made...
> 
> - and vtkThreshold
> in this case I get an unstructured grid, which I don't want to since I need data set to apply further processing.
> 
> Any ideas why vtkImageThreshold is not working?
> 
> Kind regards,

___________________________________________________________________
Paulo Alexandre Neves
Escola Superior de Tecnologia de Castelo Branco
Unidade Técnico-Cientifica de Informática
http://di.est.ipcb.pt
E-mail: pneves at ipcb dot pt




Instituto de Telecomunicações (IT)
E-mail: pneves at co dot it dot pt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120420/1232182c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apcer_iqnet.png
Type: image/png
Size: 18573 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120420/1232182c/attachment.png>


More information about the vtkusers mailing list