[vtkusers] Re: How to update a contour(Isosurface)?

Paul Tait paul at opes.com.au
Mon Nov 10 21:28:27 EST 2003


Hi

You need to tell the pipeline that the data has be modified.

try m_vtkImageData.Update()
or m_vtkImageData.modified()

Paul Tait

> 
> Message: 4
> From: "Yang Zhengyi" <yangzy at hkusua.hku.hk>
> To: <vtkusers at vtk.org>
> Date: Mon, 10 Nov 2003 10:22:23 +0800
> Subject: [vtkusers] How to update a contour(Isosurface)?
> 
> This is a multi-part message in MIME format.
> 
> ------=_NextPart_000_0012_01C3A774.87E98960
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
> 
> Dear all,
> 
> I am trying to update the isosurface generated from a vtkImageData when =
> I change the it.
> My problem is: I changed the scalar value of some points in the =
> ImageData, but the isosurface remains unchanged.
> 
> The codes of isosurface generation is here:
>  //create isofurface using contour filter
>  m_vtkContours->SetInput(m_vtkImageData);
>  m_vtkContours->GenerateValues(1, m_iValue, m_iValue);
>  m_vtkContoursMapper->SetInput(m_vtkContours->GetOutput());
>  m_vtkContoursMapper->SetScalarRange(1, 1);
>  m_vtkContoursActor->SetMapper(m_vtkContoursMapper);
> 
> but I don't which function should be used to update the isosurface when =
> m_vtkImageData changed.
> Thanks a lot!
> 
> Steven





More information about the vtkusers mailing list