[vtkusers] Error: abnormal program termination
¿ Venu Thomas ¿
venu.thomas at nestinfotech.com
Thu Oct 21 06:13:51 EDT 2004
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/fb342f25/attachment.htm>
More information about the vtkusers
mailing list