<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">here is my code. When I run it without vtkPolyDataMapper ,a black window appears and an error appear on an another window like that"ERROR: In ..\..\vtk-src-windows\Rendering\vtkImageActor.cxx, line 182<BR>vtkOpenGLImageActor (01654BB0): This filter requires unsigned char scalars as input". When I use vtkPolyDataMapper It gives an converting parameter error. like that"<FONT color=#ff0000 size=4>
<P>vtkPolyDataMapper::SetInput' : cannot convert parameter 1 from 'vtkImageData *' to 'vtkPolyData *'</P></FONT></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT size=2>
<P>vtkImageReader *read=vtkImageReader::New();</P>
<P>read->SetFileName( </FONT><FONT color=#800000 size=2>"3Ddata.raw"</FONT><FONT size=2>);</FONT></P>
<P><FONT size=2></FONT> </P><FONT size=2>
<P></P>
<P>vtkPolyDataMapper *readmap2=vtkPolyDataMapper::New();</P>
<P>readmap2->SetInput(read->GetOutput());</P></FONT>
<P><FONT size=2></FONT> </P><FONT size=2><FONT size=2>
<P>vtkImageActor *lodactor=vtkImageActor::New();</P><FONT size=2>
<P>lodactor->SetInput(read->GetOutput());</P>
<P>lodactor->InterpolateOff();</P>
<P> </P><FONT size=2>
<P>vtkRenderer *ren1=vtkRenderer::New();</P>
<P>vtkRenderWindow *renwin=vtkRenderWindow::New();</P>
<P>renwin->AddRenderer(ren1); </P>
<P>vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();</P>
<P> </P>
<P>iren->SetRenderWindow(renwin);</P></FONT><FONT size=2>
<P>ren1->AddActor(lodactor);</P>
<P>ren1->SetBackground(0,0,0);</P>
<P> </P>
<P>renwin->SetSize(500,500); </P><FONT size=2>
<P>ren1->ResetCamera();</P>
<P>ren1->GetActiveCamera()->Zoom(1.5);</P>
<P>renwin->Render();</P>
<P>iren->Start();</P></FONT></FONT></FONT></FONT></FONT></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Peter Spring <meancity@gmail.com><BR>To: tony hakki <tony2007vtk@yahoo.com><BR>Cc: VTK Ortak mail hesabi <vtkusers@vtk.org><BR>Sent: Monday, January 29, 2007 2:14:49 AM<BR>Subject: Re: [vtkusers] displaying .raw data<BR><BR>
<DIV>if not mistaken , you might try vtkPolyDataMapper..<BR><BR>what kind of rendering r u doing ? iso or vol<BR><BR><BR>On 1/29/07, tony hakki <tony2007vtk@yahoo.com> wrote:<BR>><BR>> hi;<BR>> I want to display my 3D data which is .raw extension on the screen. I read<BR>> it by itkRawImageIO.h then what kind of mapper should I use to add it to<BR>> actor?<BR>> thank you<BR>> Tony<BR>><BR>> ________________________________<BR>> Don't pick lemons.<BR>> See all the new 2007 cars at Yahoo! Autos.<BR>> _______________________________________________<BR>> This is the private VTK discussion list.<BR>> Please keep messages on-topic. Check the FAQ at:<BR>> <A href="http://www.vtk.org/Wiki/VTK_FAQ" target=_blank>http://www.vtk.org/Wiki/VTK_FAQ</A><BR>> Follow this link to subscribe/unsubscribe:<BR>> <A href="http://www.vtk.org/mailman/listinfo/vtkusers"
target=_blank>http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>><BR>><BR>></DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div><br>
<hr size=1>Be a PS3 game guru.<br>Get your game face on with <a href="http://us.rd.yahoo.com/evt=49936/*http://videogames.yahoo.com">the latest PS3 news and previews at Yahoo! Games.</a></body></html>