[vtkusers] ->Update()....what does that do?

Giancarlo Amati ilferraresebono at hotmail.it
Wed Feb 3 12:41:13 EST 2010



Hi David,

yes I opened the file with Paraview and it's all perfectly visualised.
I've printed 'data' and the path name is ok.

what the compiler returns is this:
Unhandled exception at 0x775c1ffe in QTVTK_Diorama.exe: 0xC0000005: Access violation reading location 0x5f5bc9f4.

Many Thanks.
Giancarlo

Date: Wed, 3 Feb 2010 11:43:40 -0500
From: daviddoria+vtk at gmail.com
CC: vtkusers at vtk.org
Subject: Re: [vtkusers] ->Update()....what does that do?

On Wed, Feb 3, 2010 at 11:33 AM, Giancarlo Amati <ilferraresebono at hotmail.it> wrote:






Hello VTK users,
this might be already posted but I can't find it in the repository. So, I apologies for any duplicate.

I have these statements:

QByteArray temp = fn->toAscii(); 
char *data = temp.data();

        vtkSmartPointer<vtkPolyDataReader> drs =  vtkSmartPointer<vtkPolyDataReader>::New();
        drs->SetFileName(data);
         drs->Update();
        vtkPolyData *pd = drs->GetOutput();


where QByteArray is a QT array of byte then converted into a string and passed as input to PolyDataReader. so basically it's the path of the file .vtk (which is a polydata) I would like to load.

but the problem is that when i get to 


drs->Update();

it all crashes saying that an Unhandled expection has been generated.

I checked out around and apparently it's the standard way to read a vtk file (the one I have is ASCII format).


Any suggestion would be helpful..

Kind Regards.
Giancarlo Amati
 		 	   		  

A couple of things -

1) try opening the file with Paraview. If it crashes, your file is bad.2) did you print 'data' to make sure the file name is as you expect?
Thanks,

David  		 	   		  
_________________________________________________________________
Personalizza la tua vita digitale, scarica i nuovi gadget!
http://www.pimpit.it/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100203/298587f5/attachment.htm>


More information about the vtkusers mailing list