[vtkusers] vtkborlandrenderwindow Problem.

German Falasco gfalasco at fleni.org.ar
Mon Jul 21 09:22:24 EDT 2008


Hi,
 
does someone knows how to open a itk image on a vtkborlandrenderwindow?
i don´t have any problem using vtkRenderWindow* but when i try to open the image in the TvtkBorlandrenderWindow on mi own project Forms nothing happens:
The code that i implement was:
 
typedef unsigned int  PixelType;
const   unsigned int  Dimension = 2;
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::ImageFileReader< ImageType >  ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(FileNameRead.c_str());
 
reader->Update();
typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;

ConnectorType::Pointer connector= ConnectorType::New();
connector->SetInput( reader->GetOutput() );
vtkImageData *vtkImage;
vtkImage=vtkImageData::New();
vtkImageActor *actor;
actor=vtkImageActor::New();
vtkImage = connector->GetOutput();  
actor->SetInput(vtkImage);
 
vtkBorlandRenderWindow1->GetRenderer()->AddActor(actor);

i don´t know if i have to modified the vtkBorlandrenderWindow Object.
 
regards, 
Germán.- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080721/4f954028/attachment.htm>


More information about the vtkusers mailing list