Hi all, I am trying to display a 2D image with vtkImageViewer2 which is placed within a wxWidget object. I can get the image to display properly except I get this black border around my image (see attached image). I am wondering how do I make the image I am trying to view fit completely inside my widget (with no black border surrounding the image)?<br>
<br>Code snippet I am using:<br><br>wxVTKRenderWindowInteractor *m_pVTKWindow = new wxVTKRenderWindowInteractor(notebook, MY_VTK_WINDOW);<br>vtkImageData *image = vtkImageData::New(); <br>image = ...<br>vtkImageViewer2 *viewer = vtkImageViewer2::New();<br>
<br>viewer->SetColorWindow(2400);<br>viewer->SetColorLevel(1200); <br>viewer->SetInput(image);<br>viewer->SetupInteractor (NULL);<br>m_pVTKWindow->SetRenderWindow(viewer->GetRenderWindow());<br>viewer->GetRenderer()->ResetCamera(); <br>
<br>Thanks<br>