[vtkusers] setValue of vtkContourFilter

Yang, Jinzhong jinzhong76 at gmail.com
Wed Jun 24 18:52:35 EDT 2009


You can try method GenerateValues() of vtkContourFilter

You may need to know the range of values of your input data.  Normally it is
the scalar values accessing via input->GetPointData()->GetScalars().

Here "input" is the pointer to your input data.

 

By the way, anybody know how to control the number of points in the output
surface of vtkContourFilter?

 

Thanks,

-Jinzhong

 

From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of Saket Jalan
Sent: Wednesday, June 24, 2009 12:13 AM
To: vtkusers at vtk.org
Subject: [vtkusers] setValue of vtkContourFilter

 

i m not still clear with what i want....

Actually i have some vtk structured point data sets, and i am trying to
generate the isosurface in which i m using contour filter. 
in that i m setting the value of a single contour. My question is how to
decide what would be the value of this variable acc to data set?
Like for one vtk file i found it works when it is 60,,,for second one it
works for 92.....
So how to decide using the program (the source code) the value ?

 

On Wed, Jun 24, 2009 at 12:36 AM, Gerrick Bivins
<gbivins at objectreservoir.com> wrote:

Oh. You're probably over thinking it. No worries! It's not very clear in the
docs.
So for instance, lets say you want to generate 1 contour with a value of
100.
The call would  look like this:
    contour->SetValue(0, 100);

If you wanted to change the value of this contour to 200 your call would be
like this:
    contour->SetValue(0, 200);

Now if you wanted to generate another contour at 50 and keep the contour at
200 (thus totaling 2 contours) , after making the previous call you would
add this:
 
   contour->SetValue(1,50);

So in summary, if you just want one contour the contour number is always 0.
If you want more than one value the contour number is assigned by you and is
<= total number of contours.
 Gerrick






On 6/23/09 1:59 PM, "Saket Jalan" <saaketjalan at gmail.com> wrote:

Thanks for replying...

I m still not able to find out the value of a contour number,,,plss help
i m new to vtk...

Thanks

On Tue, Jun 23, 2009 at 6:33 PM, Gerrick Bivins
<gbivins at objectreservoir.com> wrote:

Hi Saket,
In that method:
 int "i" ==> the contour number 
 double v ==> value of contour number "i"

This is so that you can supply more than one contour value to the contour
filter.
Gerrick



On 6/22/09 7:01 PM, "Saket Jalan" <saaketjalan at gmail.com
<http://saaketjalan@gmail.com> > wrote:

hii...

the class vtkContourFilter.h contains a method called

SetValue(int i, double v);

Anyone please tell me how to decide the value of v while using this
filter.....

Thanks

 





-- 
Saket




-- 
Saket

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090624/49b2b729/attachment.htm>


More information about the vtkusers mailing list