<div>hi,<BR>thanks for your answer! <BR>what i want to do:<BR> i draw a 8 bits bitmap with windows drawing tool.its total number is 13.in the bitmap ,i draw a rectangle. what i want to do is read this bitmap,and reconstruct a cuboid.</div> <div>the code :<BR>#include "vtkConeSource.h"<BR>#include "vtkPolyDataMapper.h"<BR>#include"vtkImageMapper.h"<BR>#include "vtkRenderWindow.h"<BR>#include "vtkCamera.h"<BR>#include "vtkActor.h"<BR>#include "vtkActor2D.h"<BR>#include "vtkRenderer.h"<BR>#include"vtkBMPReader.h"<BR>int main()<BR>{vtkBMPReader *cone=vtkBMPReader::New();<BR> cone->Allow8BitBMPOn();<BR> cone->SetFilePrefix("E:\\bmp1\\yu");<BR> cone->SetFilePattern("%s%02d.bmp");<BR> cone->SetDataExtent(0,379,0,260,1,29);<BR> cone->SetDataSpacing(1,1,3);<BR> cone->Update();<BR> vtkImageMapper *coneMapper =
vtkImageMapper::New(); <BR> coneMapper->SetInput(cone->GetOutput()); </div> <div>vtkActor2D *coneActor = vtkActor2D::New(); <BR> coneActor->SetMapper(coneMapper); <BR> vtkRenderer *ren1= vtkRenderer::New();<BR> ren1->AddActor2D( coneActor );<BR> ren1->SetBackground( 1, 1, 1 );<BR> vtkRenderWindow *renWin = vtkRenderWindow::New();<BR> renWin->AddRenderer( ren1 );<BR> renWin->SetSize( 300, 300 );<BR>int i;<BR> for (i = 0; i < 360; ++i)<BR> {<BR> renWin->Render();<BR> ren1->GetActiveCamera()->Azimuth( 0.01 );<BR> }<BR> cone->Delete();<BR>
coneMapper->Delete();<BR> coneActor->Delete();<BR> ren1->Delete();<BR> renWin->Delete();<BR> return 0;<BR>}</div> <div>problem:<BR> first i use vtkPolyDataMapper and vtkActor to mapper and actor the piictures. and it had some errors! the code can compile but not results. and now i use vtkImageMapper and vtkActor2D . the result is just a 2D picture. not a cuboid.i think it is maybe the problem that vtkImageMapper and vtkActor2D is a class which to deal with 2D, and i don`t konw which class i can use and how to use to get the result:a cuboid.can you tell what is wrong,and how can i do to get the reuslt.<BR>maybe you will ask me what is this doing for. i just to do a test. because i get a borderline after the image segmentation,and want to reconstruct. so it is similar with this test.</div> <div>it is very kind of you for your answer.<BR>liu</div><p> 
                <hr size=1><a href="http://music.yahoo.com.cn/?source=mail_mailbox_footer" target=blank>
Mp3疯狂搜-新歌热歌高速下
</a>