[vtkusers] vtkThreshold

Polly Pui polly_sukting at hotmail.com
Wed Mar 21 10:50:23 EDT 2018


Hi Jorge,

Thanks for your reply.

I could do the ThresholdBetween to get the points.


I have another question.

Is it possible for me to get the threshold value automatically without pre-assign the value to vtkThreshold?

Let me explain further. I am doing a feature extraction using meanCurvature on the 3D vtk polydata. I obtained the meanCurvature values from the dataset.

And I realized that threshold value (eg. ThresholdByUpper =0.085) could show the relevant regions (about 500-800 polydata points) that I am looking for.

Now I want to obtain the threshold values automatically by looking into the points that

If 500 points more than 0.085

>>show me the threshold value

If 600 points more than 0.085

>>show me the threshold value

I want to reverse the process to get the threshold values.

Thanks again.

Best,
Polly

________________________________
From: Jorge Perez <josp.jorge at gmail.com>
Sent: Wednesday, March 21, 2018 3:26 PM
To: Polly Pui
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkThreshold

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<mailto: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<http://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/f21bc338/attachment.html>


More information about the vtkusers mailing list