[vtkusers] Latest nightly build: QT

Doug Hoppes dhoppes at mbfbioscience.com
Mon Oct 15 09:37:40 EDT 2012


Hi all,

                Okay, got the latest nightly build and trying out the QT implementation (there's a bug fix with destructor order in QT that I need).    With the latest change (vtkTDxConfigure.h being copied), I can get the code to compile.  However, running into a new issue: The renderwindow isn't built.

                My code (I have a class called VTKView which is subclassed from QVTKWidget). In my QT window, I have placed a QWidget and promoted it to VTKView.

VTKView::VTKView(QWidget *pParent)
:QVTKWidget(pParent), m_pUIProcessor(NULL), m_pSolidsImage(NULL)
{
            m_pUIProcessor = new VTKSceneManager(GetRenderWindow());
}

In QVTKWidget, it calls the function:
vtkRenderWindow* QVTKWidget::GetRenderWindow()
{
      if (!this->mRenWin)
      {
      // create a default vtk window
      vtkRenderWindow* win = vtkRenderWindow::New();
      this->SetRenderWindow(win);
      win->Delete();
      }
      return this->mRenWin;
}

                However, the software crashes because the variable "win" is null, after calling the vtkRenderWindow::New().

Also, as a side note, I had to comment out a lot of function calls (should I not be using these any more?):
                'SetScalarTypeToUnsignedChar' : is not a member of 'vtkImageData'
'vtkImageData::SetNumberOfScalarComponents' : function does not take 1 arguments
'vtkImageData::AllocateScalars' : no overloaded function takes 0 arguments
'SetInput' : is not a member of 'vtkImageShiftScale'
'SetInput' : is not a member of 'vtkImageActor'
'SetInput' : is not a member of 'vtkOutlineFilter'
'SetInput' : is not a member of 'vtkPolyDataMapper'
'SetInput' : is not a member of 'vtkSmartVolumeMapper'


Doug

---------------------------------------------------
Doug Hoppes doug at mbfbioscience.com
Senior Software Engineer
MBF Bioscience (Microbrightfield, Inc.)
+1.802.288.9290 ext:119
www.mbfbioscience.com
---------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121015/03947a91/attachment.htm>


More information about the vtkusers mailing list