[vtkusers] a simple question
u liu
lsenlee at yahoo.com.cn
Wed Dec 6 20:56:05 EST 2006
hi,my dear vtkusers,
i am a newbie in the vtk,recently i had a question.
the idea:
i draw a polygon myself ,the size is 380*261;the format is BMP.
the name of picture is named like this
yu01.bmp,yu02.bmp............
the picture is exsit in the E:\bmp1\,
now i want to read it and reconstruction.
the code :
vtkBMPReader *v8=vtkBMPReader::New();
v8->SetFilePrefix("E:\\bmp1\\yu");
v8->SetFilePattern("%s%2d.bmp");
v8->SetDataExtent(0,379,0,260,1,13);
v8->SetDataSpacing(1,1,1);
v8->Update();
vtkPolyDataMapper *ctmapper=vtkPolyDataMapper::New();
ctmapper->SetInputConnection(v8->GetOutputPort());
vtkActor *ctactor=vtkActor::New();
ctactor->SetMapper(ctmapper);
vtkRenderer *ctren=vtkRenderer::New();
ctren->AddActor(ctactor);
ctren->SetBackground(0.1,0.1,0.1);
vtkRenderWindow *ctrenwin=vtkRenderWindow::New();
ctrenwin->AddRenderer(ctren);
ctrenwin->Delete();
ctren->Delete();
ctactor->Delete();
ctmapper->Delete ();
v8->Delete();
the error:
ERROR: In ..\..\VTK\IO\vtkBMPReader.cxx, line 95
vtkBMPReader (017D6E70): Unable to open file E:\bmp1\yu 1.bmp
why ? who can help me ,thanks advance!
or somebody have a simple code .can you share with me !thanks a lot!
lee
---------------------------------
Mp3疯狂搜-新歌热歌高速下
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061207/ba6f6c52/attachment.htm>
More information about the vtkusers
mailing list