[vtkusers] vtkThreshold

Jorge Perez josp.jorge at gmail.com
Wed Mar 21 03:26:31 EDT 2018


Hello, you can use ThresholdBetween

void vtkThreshold::ThresholdBetween ( double
<https://www.vtk.org/doc/nightly/html/vtkVectorOperators_8h.html#a45c855d65dd0e2b57b08024500ff9159>
  *lower*,
double
<https://www.vtk.org/doc/nightly/html/vtkVectorOperators_8h.html#a45c855d65dd0e2b57b08024500ff9159>
  *upper*
)

Criterion is cells whose scalars are between lower and upper thresholds
(inclusive of the end values).

https://www.vtk.org/doc/nightly/html/classvtkThreshold.html#a20f1127a1da274eea9791c15410e9935

2018-03-21 8:00 GMT+01:00 Polly Pui <polly_sukting at hotmail.com>:

> Hi,
>
>
> Previously, I applied vtkThreshold with ThresholdByUpper and get the data
> extracted on 3D vtk dataset.
>
> For example, i could get 500 points out of 5000 points after the
> thresholding with a criterion of 0.085.
>
>         vtkThreshold *thresh = vtkThreshold::New();
> thresh->SetInputConnection(meanCurve->GetOutputPort());
> thresh->ThresholdByUpper(0.085);
> thresh->AllScalarsOff();
> thresh->Update();
>
> Now, my question is, how i can do this process in an opposite way.
>
> I want to get the threshold value which the number of the points are
> within 500-600.
>
> Instead of I am the one who providing the threshold value manually.
>
> //
>
> If meanCurve points 500-600 provide threshold value
>
> If meanCurve points 600-700 provide threshold value
>
> ...and so on
>
> //
>
>
> Thanks.
>
>
> Best,
>
> Polly
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180321/6a27ee77/attachment.html>


More information about the vtkusers mailing list