[vtkusers] Problems loading files
Walter Cabrera
walter at eresmas.net
Tue Nov 27 10:50:56 EST 2007
This is the code:
int main()
{
vtkBMPReader *bmpReader=vtkBMPReader::New();
bmpReader->SetFileName("C:\\VTK original\\VTKData\\Data\\masonry.bmp");
vtkTexture *atext=vtkTexture::New();
atext->SetInputConnection(bmpReader->GetOutputPort());
atext->InterpolateOn();
vtkPlaneSource *plane=vtkPlaneSource::New();
vtkPolyDataMapper *planeMapper=vtkPolyDataMapper::New();
planeMapper->SetInputConnection(plane->GetOutputPort());
vtkActor *planeActor=vtkActor::New();
planeActor->SetMapper(planeMapper);
planeActor->SetTexture(atext);
vtkRenderer *ren1=vtkRenderer::New();
vtkRenderWindow *renWin=vtkRenderWindow::New();
renWin->AddRenderer(ren1);
vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
ren1->AddActor(planeActor);
ren1->SetBackground(0.1, 0.2, 0.4);
renWin->SetSize(500, 500);
ren1->ResetCamera();
vtkCamera *cam1=ren1->GetActiveCamera();
cam1->Elevation(-30);
cam1->Roll(-20);
ren1->ResetCameraClippingRange();
renWin->Render();
iren->Initialize();
iren->Start();
//Delete block
}
This is the example of page 54 of the VTK User's Guide. I am working with
C++ Builder 6.0
Mark Wyszomierski wrote:
>
> What code are you using to load the file?
>
> Mark
>
> On Nov 27, 2007 5:16 AM, Walter Cabrera <walter at eresmas.net> wrote:
>>
>> I am executing the examples of the Visualization Toolkit and The VTK
>> User´s
>> Guide When I have to load some file type BMP or of another type it gives
>> mistake. What can happen? Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/Problems-loading-files-tf4880854.html#a13968189
>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
View this message in context: http://www.nabble.com/Problems-loading-files-tf4880854.html#a13973328
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list