[Insight-users] ITK VTK vtkborlandrenderwindow problem
German Falasco
gfalasco at fleni.org.ar
Thu Jul 17 07:07:50 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.itk.org/pipermail/insight-users/attachments/20080717/249c046a/attachment.htm>
More information about the Insight-users
mailing list