SCI Seg3D Mailing List

Text archives Help

[Seg3D] Re: trying to create a new GUI Tool for Seg3D

Chronological Thread 
  • From: Kristen Zygmunt <>
  • To:
  • Subject: [Seg3D] Re: trying to create a new GUI Tool for Seg3D
  • Date: Fri, 14 Aug 2009 18:30:35 -0600

    I was able to get your code working with the following process:
1) In DialogBlocks, edit the test window to uncheck the wxDIALOG_MODAL style property
2)  Have DialogBlocks generate a test.xrc file for the test panel.
3) Copy all of the object tags from test.xrc into data/Seg3D.xrc (I did this at the end of the file just before the closing resource tag).
4) part of the build process is to copy this file into the bin/data directory. Either rebuild, or manually copy Seg3D.xrc to the bin/ data directory
5)  Try running.

I think the error was occurring because the modal dialog style was enabled, so you should be able to just uncheck the wxDIALOG_MODAL property and then regenerate the Seg3D.xrc directly. However, this did not work for me. Either I am doing something wrong in DialogBlocks or there is something wrong with the Seg3D.pjd file in the repository.

I am curious which method solves the problem for you.

Also, I noticed that the lines:

are missing from your test.cpp file. This did not cause your current problem, but will be needed for your buttons to work.

I will attach my working version of test.xrc . I am curious if the version you get from DialogBlocks matches.

Good Luck!

<?xml version="1.0" encoding="iso-8859-1"?>
<resource version="" xmlns="";>
    <object class="wxPanel" name="ID_TEST" subclass="Test">
        <object class="wxGridSizer">
            <object class="sizeritem">
                <object class="wxGridSizer">
                    <object class="sizeritem">
<object class="wxStaticText" name="wxID_STATIC">
                            <label>test spinner</label>
                    <object class="sizeritem">
                        <object class="wxSpinCtrl" name="ID_SPINCTRL">
            <object class="sizeritem">
                <object class="wxGridSizer">
                    <object class="sizeritem">
                        <object class="wxButton" name="START_BUTTON">
                    <object class="sizeritem">
                        <object class="wxButton" name="CLOSE_BUTTON">

On Aug 6, 2009, at 6:41 AM, Ramón Casero Cañas wrote:

Hi all,

Raf (a mate at ComLab) and I have been trying to add a new filter to Seg3D.

We have been following the documentation at "CIBC:Seg3D Develop GUI"

but found that there are some typos and that even after correcting them it doesn't quite work for us.

In particular, we have managed to add code for a new Test tool, as described in the documentation, and then with some tweaks make the code compile.

However, the application crashes at launch. Michael Callahan mentioned that Kristen Zygmunt may be interested in creating a filter, so before leaving on holiday for two weeks, I'm sending to the list a patch with our changes so far (see attached), in case somebody is interested.

We are working based on Revision: 44410.

The error we get is (note that we have added some debugging messages to the code)

$ ./Seg3D
Before Create Test
Constructor: before setparent
Constructor: before createcontrols
Before creating controls
Before creating control mSpinner
Before creating control mStart
Before creating control mStopr
After creating controls
Constructor: before getsize
Constructor: before centre

Thread "main" (id: 140524218964000, pid: 13136)
        caught signal SIGSEGV at address 0x19 (segmentation violation)
1. ./Seg3D
 in SCIRun::handle_abort_signals(int, siginfo*, void*)
2. /lib/ [0x7fce53261040]
3. ./Seg3D
 in wxWindow::DoSetSize(int, int, int, int, int)
4. ./Seg3D
 in wxWindowBase::DoCentre(int)
5. ./Seg3D
 in Test::Create(wxWindow*, int, wxPoint const&, wxSize const&, long)
6. ./Seg3D
 in Test::Test(wxWindow*, int, wxPoint const&, wxSize const&, long)
7. ./Seg3D
in SCIRun::Seg3DFrame::Seg3DFrame(std::string const&, wxFrame*, wxString const&, wxPoint const&, wxSize const&, long)
8. ./Seg3D
 in Seg3D::OnInit()
9. ./Seg3D
 in wxEntry(int&, char**)
a. ./Seg3D(main+0x12) [0x733ba2]
b. /lib/ [0x7fce5324c5a6]
c. ./Seg3D [0x733a29]
140524218964000:main( RUNNING, List: )

Abort signalled by pid: 13136
Occured for thread: "main"

Best regards,


Ramón Casero Cañas, DPhil

Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610807

Archive powered by MHonArc 2.6.16.

Top of page