[vtkusers] help Request Data is not compiling

Julia Fischer julia.ute.fischer at gmail.com
Mon Apr 27 16:15:05 EDT 2015


Somehow  I cant make work this piece of code , apparently the problem is in
RequestData





int Reader::RequestData(vtkInformation *vtkNotUsed(request),
        vtkInformationVector **vtkNotUsed(inputVector),
        vtkInformationVector  outputVector) {

    // get the info object
    vtkInformation *outInfo = outputVector->GetInformationObject(0);

    // get the ouptut
    vtkUnstructuredGrid *output = vtkUnstructuredGrid::SafeDownCast(
            outInfo->Get(vtkDataObject::DATA_OBJECT()));

    if (!this->FileName) {
        vtkErrorMacro("No filename specified");
        return 0;
    }


    vtkSmartPointer < vtkUnstructuredGrid   > grid =vtkSmartPointer<
vtkUnstructuredGrid>::New();

    ......

    vtkSmartPointer <vtkUnstructuredGrid>

outUG=vtkUnstructuredGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));


    vtkSmartPointer<vtkPoints> pts2=vtkSmartPointer<vtkPoints>:: New();

    cout<<"gg"<<grid->GetNumberOfPoints()<<endl;

    outUG->ShallowCopy(grid);






    return 1;

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150427/cd16d143/attachment.html>


More information about the vtkusers mailing list