<DIV>VTKUsers,</DIV>
<DIV> </DIV>
<DIV> I am new to vtk and have a very simple question. I am trying to visualize an UnstructuredGrid using VTK file format. I get the following error:</DIV>
<DIV> </DIV>
<DIV>Error E2034 C:\groupsinC.cxx 40: Cannot convert 'vtkUnstructuredGrid *' to 'vtkDataSet *' in function main()<BR>Error E2342 C:\groupsinC.cxx 40: Type mismatch in parameter 'input' (wanted 'vtkDataSet *',got 'vtkUnstructuredGrid *') in function main()<BR>*** 2 errors in Compile ***</DIV>
<DIV> </DIV>
<DIV>Relevant part of my code is as follows:</DIV>
<DIV> </DIV>
<DIV> vtkDataSetReader *reader1 = vtkDataSetReader::New();<BR> reader1->SetFileName ("C:/hola.vtk");<BR> reader1->SetScalarsName("groups");<BR> reader1->SetVectorsName("velocity");</DIV>
<DIV><BR> vtkThreshold *thresh = vtkThreshold::New();<BR> thresh->SetAttributeModeToUseCellData();<BR> thresh->ThresholdByUpper(1);<BR> thresh-> AllScalarsOff();<BR> thresh-> SetInput(reader1->GetOutput());</DIV>
<DIV><BR>vtkDataSetMapper *mapper = vtkDataSetMapper::New();<BR> mapper->SetInput(thresh->GetOutput() );</DIV>
<DIV> </DIV>
<DIV>vtkActor *actor = vtkActor::New();<BR> actor->SetMapper(mapper);<BR> actor->GetProperty()->SetColor(.2, .2, .2);<BR> actor->GetProperty()->SetRepresentationToWireframe();<BR></DIV>
<DIV>So I don't know what mapper to use to map Unstructured grid. Can someone help me out?</DIV>
<DIV> </DIV>
<DIV>Thanking you,</DIV>
<DIV>Yours Sincerely,</DIV>
<DIV>Nikhil Butala</DIV>