[Paraview] problem configuring the output of a filter
Natalie Happenhofer
nataliehapp at hotmail.com
Fri Sep 19 05:49:20 EDT 2008
Hi!
I have problems configuring the output of my filter, the filter is a subclass of vtkDataSetToStructuredGrid and setting the output looks as following:
//setting the new point data
vtkSmartPointer<vtkFloatArray> new_scalars = vtkSmartPointer<vtkFloatArray>::New();
double inPtr[numOfTuples + 1]; //pointer for casting the values actually to double, so I can perform arithmetic operations with them
float outPtr[numOfTuples + 1];
//calculating ..
new_scalars -> SetArray(outPtr,numOfTuples,1);
output -> SetDimensions(dims);
output -> SetPoints(pts); //Now the points are set
output -> GetPointData() -> SetScalars(new_scalars);
output -> Squeeze();
dims are the dimensions of the input, which is a RectilinearGrid or a StructuredGrid, new_scalars is a vtkFloatArray. I believe that the "output->GetPointData() ->SetScalars(new_scalars)"-line is causing the problem, because I get the following error messages:
Program received signal SIGSEGV, Segmentation fault.
vtkFieldData::GetActualMemorySize
at C:/ParaviewSource/ParaView3/VTK/Filtering/vtkFieldData.cxx:577
size +=this->Data[i]->GetActualMemorySize();
Backtracing, functions in vtkPVDataInformation and vtkSelfConnections are called,
so I guess, this does not actually happen in my source code but in the rendering pipeline. As I did not change anything in the rendering pipeline, there must be an allocation or a call in my code with incorrect arguments, but I do not really know where to look for the error.
Does anyone have an idea?
Thx,
NH
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080919/a961102e/attachment.htm>
More information about the ParaView
mailing list