[vtkusers] What's wrong with me?
yaolu at engineering.uiowa.edu
yaolu at engineering.uiowa.edu
Wed Sep 14 13:44:52 EDT 2005
Thank you!! Sorry about that.
I think the program seg fault. so the stack trace is as follow: (sorry for the
ugly view)
> MyProject.exe!vtkUnsignedCharArray::GetPointer(const int id=0) Line
> 137 + 0x11 C++
MyProject.exe!vtkImageToPolyDataFilter::ProcessImage(vtkUnsignedCharArray *
scalars=0x00000000, int * dims=0x016cf80c) Line 692 + 0xa C++
MyProject.exe!vtkImageToPolyDataFilter::PolygonalizeImage(vtkUnsignedCharArray
* pixels=0x00000000, int * dims=0x016cf80c, float * origin=0x016cf7ec, float *
spacing=0x016cf858, vtkPolyData * output=0x09c528d0) Line 382 + 0x10 C++
MyProject.exe!vtkImageToPolyDataFilter::Execute() Line 169 + 0x2a C++
MyProject.exe!vtkSource::ExecuteData(vtkDataObject *
__formal=0x09c51d28) Line 136 + 0x10 C++
MyProject.exe!vtkSource::UpdateData(vtkDataObject * output=0x09c51d28) Line
395 + 0x14 C++
MyProject.exe!vtkDataObject::UpdateData() Line 373 + 0x1a C++
MyProject.exe!vtkDataObject::Update() Line 254 + 0xd C++
MyProject.exe!vtkSource::Update() Line 138 + 0x1a C++
MyProject.exe!MyProjectGUIImplementation::Test() Line 312 + 0xd C++
MyProject.exe!MyProjectGUI::cb_TestButton_i(Fl_Button * __formal=0x09c27078,
Fl_Button * __formal=0x09c27078) Line 19 + 0xd C++
MyProject.exe!MyProjectGUI::cb_TestButton(Fl_Button * o=0x09c27078, void *
v=0x00000000) Line 23 C++
MyProject.exe!Fl_Widget::do_callback() Line 189 + 0x18 C++
MyProject.exe!Fl_Button::handle(int event=2) Line 102 C++
MyProject.exe!send(int event=2, Fl_Widget * to=0x09c27078, Fl_Window *
window=0x09c26e08) Line 581 + 0xf C++
MyProject.exe!Fl::handle(int e=2, Fl_Window * window=0x09c26e08) Line 670 +
0x11 C++
MyProject.exe!mouse_event(Fl_Window * window=0x09c26e08, int what=2, int
button=1, unsigned int wParam=0, long lParam=43909818) Line 470 + 0xb C++
MyProject.exe!WndProc(HWND__ * hWnd=0x000f03c0, unsigned int uMsg=514,
unsigned int wParam=0, long lParam=43909818) Line 626 + 0x15 C++
user32.dll!77d48734()
user32.dll!77d48816()
user32.dll!77d489cd()
user32.dll!77d496c7()
MyProject.exe!fl_wait(double time_to_wait=1.0000000000000000e+020) Line
298 C++
MyProject.exe!Fl::wait(double time_to_wait=1.0000000000000000e+020) Line 290
+ 0xd C++
MyProject.exe!Fl::run() Line 297 + 0x18 C++
MyProject.exe!main(int argc=1, char * * argv=0x003e2da0) Line 13 C++
MyProject.exe!mainCRTStartup() Line 400 + 0x11 C
Quoting Amy Squillacote <amy.squillacote at kitware.com>:
> Hi Jenny,
>
> Please be more specific about the problem you're seeing. What
> breaks? Does the program seg fault? If so, please include a stack
> trace. Does the program run but produce results you aren't
> expecting? If so, please explain what you expected to happen and how
> that differs from the behavior you see. Also, if this problem could
> be platform-specific, please describe the platform: OS, compiler,
> anything unusual about the hardware, etc.
>
> - Amy
>
> At 12:47 PM 9/14/2005, yaolu at engineering.uiowa.edu wrote:
>> Hi all,
>>
>> I don't understand what's wrong with my code. There is no compile error, but
>> when i run it, it breaks.
>>
>> vtkImageGridSource *imageGrid = vtkImageGridSource::New();
>> imageGrid->SetGridSpacing(10,10,20);
>> //imageGrid->SetGridOrigin(-94.710373,-69.638529,15.593220);
>> imageGrid->SetDataExtent(0,160, 0, 160, 0, 20);
>> imageGrid->SetDataScalarTypeToUnsignedChar();
>> imageGrid->SetLineValue(1);
>> imageGrid->SetFillValue(0);
>> imageGrid->Update();
>>
>> vtkTransform *Rotation = vtkTransform::New();
>> //Rotation->SetMatrix(RotationMatrix);
>>
>> vtkImageToPolyDataFilter *imagepolydata =
>> vtkImageToPolyDataFilter::New();
>> imagepolydata->SetInput(imageGrid->GetOutput());
>> imagepolydata->Update();
>>
>> vtkTransformPolyDataFilter *RotationFilter =
>> vtkTransformPolyDataFilter::New();
>> RotationFilter->SetTransform(Rotation);
>> RotationFilter->SetInput(imagepolydata->GetOutput());
>> RotationFilter->Update();
>>
>> vtkPolyDataMapper *rgridMapper = vtkPolyDataMapper::New();
>> rgridMapper->SetInput(RotationFilter->GetOutput());
>>
>> vtkActor *wireActor = vtkActor::New();
>> wireActor->SetMapper(rgridMapper);
>>
>> m_Renderer->AddActor(wireActor);
>> m_Renderer->SetBackground(0,0,0);
>> fltkRenderWindowInteractor->Initialize();
>> fltkRenderWindowInteractor->show();
>> fltkRenderWindowInteractor->redraw();
>>
>> Thanks a lot!
>>
>> Jenny
>>
>> _______________________________________________
>> 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
>
>
More information about the vtkusers
mailing list