[vtkusers] displaying .raw data

Peter Spring meancity at gmail.com
Wed Jan 31 00:57:18 EST 2007


definitely u need a mapper, that's the pipeline

u try another reader.  see how

vtkVolume16Reader reader





On 1/29/07, tony hakki <tony2007vtk at yahoo.com> wrote:
>
> 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
> vtkOpenGLImageActor (01654BB0): This filter requires unsigned char scalars
> as input". When I use vtkPolyDataMapper It gives an converting parameter
> error. like that"
>
> vtkPolyDataMapper::SetInput' : cannot convert parameter 1 from 'vtkImageData
> *' to 'vtkPolyData *'
>
>
>
>
> vtkImageReader *read=vtkImageReader::New();
>
> read->SetFileName( "3Ddata.raw");
>
>
>
>
>
> vtkPolyDataMapper *readmap2=vtkPolyDataMapper::New();
>
> readmap2->SetInput(read->GetOutput());
>
>
>
> vtkImageActor *lodactor=vtkImageActor::New();
>
> lodactor->SetInput(read->GetOutput());
>
> lodactor->InterpolateOff();
>
>
>
> vtkRenderer *ren1=vtkRenderer::New();
>
> vtkRenderWindow *renwin=vtkRenderWindow::New();
>
> renwin->AddRenderer(ren1);
>
> vtkRenderWindowInteractor
> *iren=vtkRenderWindowInteractor::New();
>
>
>
> iren->SetRenderWindow(renwin);
>
> ren1->AddActor(lodactor);
>
> ren1->SetBackground(0,0,0);
>
>
>
> renwin->SetSize(500,500);
>
> ren1->ResetCamera();
>
> ren1->GetActiveCamera()->Zoom(1.5);
>
> renwin->Render();
>
> iren->Start();
>
> ----- Original Message ----
> From: Peter Spring <meancity at gmail.com>
> To: tony hakki <tony2007vtk at yahoo.com>
> Cc: VTK Ortak mail hesabi <vtkusers at vtk.org>
> Sent: Monday, January 29, 2007 2:14:49 AM
> Subject: Re: [vtkusers] displaying .raw data
>
> if not mistaken , you might try vtkPolyDataMapper..
>
> what kind of rendering r u doing ? iso or vol
>
>
> On 1/29/07, tony hakki <tony2007vtk at yahoo.com> wrote:
> >
> > hi;
> > I want to display  my 3D data which is .raw extension on the screen.  I
> read
> > it by itkRawImageIO.h  then what kind of mapper should I use to add it to
> > actor?
> > thank you
> > Tony
> >
> > ________________________________
> > Don't pick lemons.
> > See all the new 2007 cars at Yahoo! Autos.
> > _______________________________________________
> > 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
> >
> >
> >
>
>
> ________________________________
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo! Games.
> _______________________________________________
> 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
>
>
>



More information about the vtkusers mailing list