[vtkusers] Error: abnormal program termination

Pingkun Yan pingkun at ieee.org
Thu Oct 21 08:58:16 EDT 2004


Hi Thomas,

You may try to add

connector->Update();

into your program, because connector can not be triggered in the pipeline.

Pingkun
  ----- Original Message ----- 
  From: ¿ Venu Thomas ¿ 
  To: vtkusers at vtk.org 
  Cc: insight-users at itk.org 
  Sent: Thursday, October 21, 2004 6:13 PM
  Subject: [vtkusers] Error: abnormal program termination


  Dear,
         all...

          iam making a new sample pgm.. if i want to build this sample program in VS C++ .. then i got a error(as bellow).. how is avoid it? pls send to me..

  Error:
    Debug error !
          
          program :..../sample/myproject.cxx

      abnormal program termination

      (Press Retry to debug the application)


  My program is ..

  myprogram.cxx:

  #include "itkImage.h"
  #include "itkImageFileReader.h"
  #include "itkImageToVTKImageFilter.h"
  #include "vtkImageViewer.h"
  #include "vtkRenderWindowInteractor.h"
  int main( int argc, char **argv ) {
  typedef itk::Image<unsigned short,2> ImageType;
  typedef itk::ImageFileReader<ImageType> ReaderType;
  typedef itk::ImageToVTKImageFilter< ImageType> ConnectorType;
  ReaderType::Pointer reader = ReaderType::New();
  ConnectorType::Pointer connector = ConnectorType::New();
  reader->SetFileName( argv[1] );
  connector->SetInput( reader->GetOutput() );
  vtkImageViewer * viewer = vtkImageViewer::New();
  vtkRenderWindowInteractor * renderWindowInteractor =
  vtkRenderWindowInteractor::New();
  viewer->SetupInteractor( renderWindowInteractor );
  viewer->SetInput( connector->GetOutput() );
  viewer->Render();
  viewer->SetColorWindow( 255 );
  viewer->SetColorLevel( 128 );
  renderWindowInteractor->Start();
  return 0;
  }

  I wait for ur reply....


  Regards,
            Venu Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041021/1f701f6b/attachment.htm>


More information about the vtkusers mailing list