[wxVTK] vtkDICOMImageReader does not display images - VTK 5.0
Brought to you by:
malat
From: Andres M. <mun...@gm...> - 2006-07-18 21:48:18
|
>> Hello everyone, >> I'm trying to read DICOM images using the vtkDICOMImageReader and >> display it in a wxWidgets window. Everything seems to be working >> ok except that the image isn't displayed at all. If I call the >> viewer->Render() method a new window is opened but the image isn't >> displayed either. I'm running MacOSX 10.4. I believe the code is >> fine. >> The following snippet is used to construct the wxWidget frame to >> display the file (or series) >> ImageFrame::ImageFrame(wxMDIParentFrame *pp_Parent, const >> wxString& p_strTitle, const wxPoint& p_Pos, const wxSize& p_Size, >> const long p_lStyle):wxMDIChildFrame(pp_Parent, -1, p_strTitle, >> p_Pos, p_Size, p_lStyle | wxNO_FULL_REPAINT_ON_RESIZE) >> { >> vtk_interactor = new wxVTKRenderWindowInteractor( >> this, MDI_VTK_MINI_WINDOW); >> vtk_interactor->UseCaptureMouseOn(); >> viewer = vtkImageViewer2::New(); >> viewer->SetupInteractor(vtk_interactor); >> viewer->SetColorWindow(WINDOW_VALUE); >> viewer->SetColorLevel(LEVEL_VALUE); >> } >> bool ImageFrame::OpenSeries(wxString path) >> { >> atImage = fachade->srvOpenSeries(path); >> viewer->SetInput(atImage); >> viewer->SetupInteractor(vtk_interactor); >> // viewer->Update(); >> // viewer->Render(); >> return (atImage != NULL); >> } >> the Fachada object returns a vtkImageData* after calling the >> ImageProcessingCore OpenSeries method. >> vtkImageData* ImageProcessingCore::OpenSeries(const char* path){ >> reader->SetDirectoryName(path); >> reader->Update(); return reader->GetOutput(); } thanks for >> your help in advance, >> Andres E. Munarriz Soto >> --------------------------------------------------------------------- >> --- >> _______________________________________________ >> 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 > |