コード例 #1
0
void objsearch_pi::ScanArea( int latmin, int lonmin, int latmax, int lonmax, int scale )
{
    double lat = latmin;
    double lon = lonmin;
    double lat_step;
    double lon_step;
    double ppm_scale;
    
    while( !finishing && lat <= latmax )
    {
        JumpToPosition( lat, lon, m_vpppm );
        RequestRefresh(m_parent_window);
        wxMicroSleep(100);
        ppm_scale = CalculatePPM( scale );
        JumpToPosition( lat, lon, ppm_scale );
        RequestRefresh(m_parent_window);
        wxMicroSleep(100);
        lat_step = vplat_max - vplat_min;
        lon_step = vplon_max - vplon_min;
        while( !finishing && lon <= lonmax )
        {
            JumpToPosition(lat, lon, ppm_scale);
            RequestRefresh(m_parent_window);
            //wxMicroSleep(100);
            if (!finishing)
                wxYield();
            lon += lon_step;
        }
        lon = lonmin;
        lat += lat_step;
    }
    
    finishing = false;
}
コード例 #2
0
void ObjSearchDialogImpl::OnShowOnChart( wxCommandEvent& event )
{
    long itemIndex = -1;
    itemIndex = m_listCtrlResults->GetNextItem(itemIndex, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
    if (itemIndex == -1) return;
    
    wxListItem     row_info;  
    wxString       cell_contents_string;
 
    row_info.m_itemId = itemIndex;
    row_info.m_col = 2;
    row_info.m_mask = wxLIST_MASK_TEXT;
    m_listCtrlResults->GetItem( row_info );
    double lat = fromDMM(row_info.m_text);
    
    row_info.m_col = 3;
    m_listCtrlResults->GetItem( row_info );
    double lon = fromDMM(row_info.m_text);
    
    row_info.m_col = 5;
    m_listCtrlResults->GetItem( row_info );
    double scale;
    row_info.m_text.ToDouble(&scale);
    if (scale < 0.001)
        scale = 0.001;
        
    event.Skip();
    JumpToPosition(lat, lon, scale);
    if (m_cAutoClose->GetValue())
        Hide();
}
コード例 #3
0
ファイル: PathProp.cpp プロジェクト: ptulp/ocpn_draw_pi
void PathProp::OnPathPropListClick( wxListEvent& event )
{
    long itemno = 0;
    m_nSelected = 0;

    //      We use different methods to determine the selected point,
    //      depending on whether this is a Route or a Track.
    const wxListItem &i = event.GetItem();
    i.GetText().ToLong( &itemno );

    m_pPath->ClearHighlights();

    wxODPointListNode *node = m_pPath->m_pODPointList->GetFirst();
    while( node && itemno-- ) {
        node = node->GetNext();
    }
    if( node ) {
        ODPoint *prp = node->GetData();
        if( prp ) {
            prp->m_bPtIsSelected = true;                // highlight the routepoint

            //gFrame->JumpToPosition( prp->m_lat, prp->m_lon, ocpncc1->GetVPScale() );
            JumpToPosition( prp->m_lat, prp->m_lon, g_pivp->chart_scale );

        }
    }
}
コード例 #4
0
ファイル: WeatherRouting.cpp プロジェクト: CarCode/Cocoa-OCPN
void WeatherRouting::OnGoTo( wxCommandEvent& event )
{
    RouteMapOverlay *rmo = CurrentRouteMap(true);
    if(rmo)
    {
        RouteMapConfiguration config = rmo->GetConfiguration();

        double distance;
        DistanceBearingMercator_Plugin(config.StartLat, config.StartLon,
                                       config.EndLat, config.EndLon,
                                       NULL, &distance);

        JumpToPosition(config.StartLat, config.StartLon, .25/distance);
    }
}
コード例 #5
0
void QmitkSemanticRelationsView::OnDataNodeDoubleClicked(const mitk::DataNode* dataNode)
{
  if (nullptr == dataNode)
  {
    return;
  }

  if (mitk::NodePredicates::GetImagePredicate()->CheckNode(dataNode))
  {
    OpenInEditor(dataNode);
  }
  else if (mitk::NodePredicates::GetSegmentationPredicate()->CheckNode(dataNode))
  {
    JumpToPosition(dataNode);
  }
}
コード例 #6
0
QmitkMoveROIToolGUI::QmitkMoveROIToolGUI()
:QmitkToolGUI()
{
	//std::cout << "hi from " << __FUNCSIG__ << std::endl;
	// create the visible widgets
	QBoxLayout* verticalLayout = new QVBoxLayout( this );

	QBoxLayout* horizontalLayout = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout);
	QBoxLayout* horizontalLayout1 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout1);
	QBoxLayout* horizontalLayout2 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout2);
	QBoxLayout* horizontalLayout3 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout3);
	QBoxLayout* horizontalLayout4 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout4);
	QBoxLayout* horizontalLayout5 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout5);
	QBoxLayout* horizontalLayout6 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout6);

	m_SelectSurfaceBox = new QComboBox();
	horizontalLayout->addWidget(m_SelectSurfaceBox);
	connect(m_SelectSurfaceBox, SIGNAL(activated(int)), this, SLOT(SelectSurface(int)));
	
	QPushButton* pbtn_JumpToPosition = new QPushButton();
	pbtn_JumpToPosition->setText("Jump to Position");
	horizontalLayout->addWidget(pbtn_JumpToPosition);
	connect(pbtn_JumpToPosition, SIGNAL(clicked()), this, SLOT(JumpToPosition()));

	QLabel* label = new QLabel( "Radius", this );
	QFont f = label->font();
	f.setBold(false);
	label->setFont( f );
	horizontalLayout1->addWidget(label);

	m_RadiusSlider = new QSlider(Qt::Horizontal);
	m_RadiusSlider->setSliderPosition(20);
	horizontalLayout1->addWidget(m_RadiusSlider);
	QObject::connect(m_RadiusSlider, SIGNAL(sliderMoved(int)), this, SLOT(RadiusChanged(int)));

	QPushButton* pbtn_CreateSurface = new QPushButton();
	pbtn_CreateSurface->setText("Create Surface");
	horizontalLayout2->addWidget(pbtn_CreateSurface);
	connect(pbtn_CreateSurface, SIGNAL(clicked()), this, SLOT(CombineSurfaces()));

	QPushButton* pbtn_Bulging = new QPushButton();
	pbtn_Bulging->setText("Bulging");
	horizontalLayout2->addWidget(pbtn_Bulging);
	connect(pbtn_Bulging, SIGNAL(clicked()), this, SLOT(Bulging()));

	QPushButton* pbtn_PatchHoles = new QPushButton();
	pbtn_PatchHoles->setText("Patch Holes");
	horizontalLayout3->addWidget(pbtn_PatchHoles);
	connect(pbtn_PatchHoles, SIGNAL(clicked()), this, SLOT(PatchHoles()));

	QPushButton* pbtn_SmoothROI = new QPushButton();
	pbtn_SmoothROI->setText("Smooth ROI");
	horizontalLayout3->addWidget(pbtn_SmoothROI);
	connect(pbtn_SmoothROI, SIGNAL(clicked()), this, SLOT(SmoothROI()));

	QLabel* label2 = new QLabel( "Smooth Iterations", this );
	QFont f2 = label2->font();
	f2.setBold(false);
	label2->setFont( f2 );
	horizontalLayout4->addWidget(label2);

	QSlider* smoothSlider = new QSlider(Qt::Horizontal);
	smoothSlider->setSliderPosition(5);
	horizontalLayout4->addWidget(smoothSlider);
	QObject::connect(smoothSlider, SIGNAL(sliderMoved(int)), this, SLOT(SmoothChanged(int)));

	QPushButton* pbtn_Subdivide = new QPushButton();
	pbtn_Subdivide->setText("Subdivide Surface");
	horizontalLayout5->addWidget(pbtn_Subdivide);
	connect(pbtn_Subdivide, SIGNAL(clicked()), this, SLOT(Subdivide()));

	QPushButton* pbtn_SubdivideVOI = new QPushButton();
	pbtn_SubdivideVOI->setText("Subdivide VOI");
	horizontalLayout5->addWidget(pbtn_SubdivideVOI);
	connect(pbtn_SubdivideVOI, SIGNAL(clicked()), this, SLOT(SubdivideVOI()));

	QPushButton* pbtn_ColorSurface = new QPushButton();
	pbtn_ColorSurface->setText("Color Surface");
	horizontalLayout6->addWidget(pbtn_ColorSurface);
	connect(pbtn_ColorSurface, SIGNAL(clicked()), this, SLOT(ColorSurface()));


	 connect( this, SIGNAL(NewToolAssociated(mitk::Tool*)), this, SLOT(OnNewToolAssociated(mitk::Tool*)) );
	//std::cout << "ciao from " << __FUNCSIG__ << std::endl;
}
コード例 #7
0
QmitkFillHoleToolGUI::QmitkFillHoleToolGUI()
:QmitkToolGUI()
{
	//std::cout << "hi from " << __FUNCSIG__ << std::endl;
	// create the visible widgets
	QBoxLayout* verticalLayout = new QVBoxLayout( this );

	m_HorizontalLayout = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout);
	m_HorizontalLayout1 = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout1);
	m_HorizontalLayout2 = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout2);

	m_SelectSurfaceBox = new QComboBox();
	m_HorizontalLayout->addWidget(m_SelectSurfaceBox);
	connect(m_SelectSurfaceBox, SIGNAL(activated(int)), this, SLOT(SelectSurface(int)));

	m_PbtnSelectSurfaceViaMouse = new QPushButton();
	QIcon icn_OpenFile;
	icn_OpenFile.addFile(":/threeDEditing/res/threeDEditing/mousepointer.png");
	m_PbtnSelectSurfaceViaMouse->setIcon(icn_OpenFile);
	m_PbtnSelectSurfaceViaMouse->setFixedSize(22,22);
	m_HorizontalLayout->addWidget(m_PbtnSelectSurfaceViaMouse);
	connect(m_PbtnSelectSurfaceViaMouse, SIGNAL(clicked()), this, SLOT(SelectSurfaceViaMouse()));
	
	m_PbtnReinitSelection = new QPushButton();
	m_PbtnReinitSelection->setText("Reinit Selection");
	m_PbtnReinitSelection->setCheckable(true);
	m_HorizontalLayout1->addWidget(m_PbtnReinitSelection);
	connect(m_PbtnReinitSelection, SIGNAL(clicked()), this, SLOT(ReinitSelection()));

	m_PbtnJumpToPosition = new QPushButton();
	m_PbtnJumpToPosition->setText("Jump to Position");
	m_PbtnJumpToPosition->setCheckable(true);
	m_HorizontalLayout1->addWidget(m_PbtnJumpToPosition);
	connect(m_PbtnJumpToPosition, SIGNAL(clicked()), this, SLOT(JumpToPosition()));

	QLabel* label = new QLabel( "Radius", this );
	QFont f = label->font();
	f.setBold(false);
	label->setFont( f );
	m_HorizontalLayout2->addWidget(label);

	m_RadiusSlider = new QSlider(Qt::Horizontal);
	m_RadiusSlider->setSliderPosition(20);
	m_HorizontalLayout2->addWidget(m_RadiusSlider);
	QObject::connect(m_RadiusSlider, SIGNAL(sliderMoved(int)), this, SLOT(RadiusChanged(int)));


	// Tool Specific
	QBoxLayout* horizontalLayout3 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout3);
	QBoxLayout* horizontalLayout4 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout4);
	QBoxLayout* horizontalLayout5 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout5);
	QBoxLayout* horizontalLayout6 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout6);

	QFrame *frame = new QFrame( this );
	frame->setFrameStyle( QFrame::Box | QFrame::Plain );
	frame->setLineWidth(10);
	frame->setFixedSize(200,10);
	QColor color(214,247,202);
	QPalette colorPalette(color);
	colorPalette.setColor(QPalette::Foreground, color);
	frame->setPalette(colorPalette);
	horizontalLayout3->addWidget(frame);

	QPushButton* pbtn_DetectHoles = new QPushButton();
	pbtn_DetectHoles->setText("Detect Holes");
	horizontalLayout4->addWidget(pbtn_DetectHoles);
	connect(pbtn_DetectHoles, SIGNAL(clicked()), this, SLOT(DetectHoles()));

	QPushButton* pbtn_FillHoles = new QPushButton();
	pbtn_FillHoles->setText("Fill Holes");
	horizontalLayout5->addWidget(pbtn_FillHoles);
	connect(pbtn_FillHoles, SIGNAL(clicked()), this, SLOT(FillHoles()));

	QPushButton* pbtn_FillHolesVOI = new QPushButton();
	pbtn_FillHolesVOI->setText("Fill Holes VOI");
	horizontalLayout6->addWidget(pbtn_FillHolesVOI);
	connect(pbtn_FillHolesVOI, SIGNAL(clicked()), this, SLOT(FillHolesVOI()));

	connect( this, SIGNAL(NewToolAssociated(mitk::Tool*)), this, SLOT(OnNewToolAssociated(mitk::Tool*)) );
	//std::cout << "ciao from " << __FUNCSIG__ << std::endl;
}
コード例 #8
0
QmitkBulgeToolGUI::QmitkBulgeToolGUI()
:QmitkToolGUI()
{
	std::cout << "hi from " << __FUNCSIG__ << std::endl;
	// create the visible widgets
	QBoxLayout* verticalLayout = new QVBoxLayout( this );

	m_HorizontalLayout = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout);
	m_HorizontalLayout1 = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout1);
	m_HorizontalLayout2 = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout2);

	m_SelectSurfaceBox = new QComboBox();
	m_HorizontalLayout->addWidget(m_SelectSurfaceBox);
	connect(m_SelectSurfaceBox, SIGNAL(activated(int)), this, SLOT(SelectSurface(int)));

	m_PbtnSelectSurfaceViaMouse = new QPushButton();
	QIcon icn_OpenFile;
	icn_OpenFile.addFile(":/threeDEditing/res/threeDEditing/mousepointer.png");
	m_PbtnSelectSurfaceViaMouse->setIcon(icn_OpenFile);
	m_PbtnSelectSurfaceViaMouse->setFixedSize(22,22);
	m_HorizontalLayout->addWidget(m_PbtnSelectSurfaceViaMouse);
	connect(m_PbtnSelectSurfaceViaMouse, SIGNAL(clicked()), this, SLOT(SelectSurfaceViaMouse()));

	m_PbtnReinitSelection = new QPushButton();
	m_PbtnReinitSelection->setText("Reinit Selection");
	m_PbtnReinitSelection->setCheckable(true);
	m_HorizontalLayout1->addWidget(m_PbtnReinitSelection);
	connect(m_PbtnReinitSelection, SIGNAL(clicked()), this, SLOT(ReinitSelection()));

	m_PbtnJumpToPosition = new QPushButton();
	m_PbtnJumpToPosition->setText("Jump to Position");
	m_PbtnJumpToPosition->setCheckable(true);
	m_HorizontalLayout1->addWidget(m_PbtnJumpToPosition);
	connect(m_PbtnJumpToPosition, SIGNAL(clicked()), this, SLOT(JumpToPosition()));

	QLabel* label = new QLabel( "Radius", this );
	QFont f = label->font();
	f.setBold(false);
	label->setFont( f );
	m_HorizontalLayout2->addWidget(label);

	m_RadiusSlider = new QSlider(Qt::Horizontal);
	m_RadiusSlider->setSliderPosition(20);
	m_HorizontalLayout2->addWidget(m_RadiusSlider);
	QObject::connect(m_RadiusSlider, SIGNAL(sliderMoved(int)), this, SLOT(RadiusChanged(int)));


	// Tool Specific
	QBoxLayout* horizontalLayout3 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout3);
	QBoxLayout* horizontalLayout4 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout4);
	QBoxLayout* horizontalLayout5 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout5);
	QBoxLayout* horizontalLayout6 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout6);
	QBoxLayout* horizontalLayout7 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout7);
	QBoxLayout* horizontalLayout8 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout8);
	QBoxLayout* horizontalLayout9 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout9);
	QBoxLayout* horizontalLayout10 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout10);
	QBoxLayout* horizontalLayout11 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout11);

	QFrame *frame = new QFrame( this );
	frame->setFrameStyle( QFrame::Box | QFrame::Plain );
	frame->setLineWidth(10);
	frame->setFixedSize(200,10);
	QColor color(214,247,202);
	QPalette colorPalette(color);
	colorPalette.setColor(QPalette::Foreground, color);
	frame->setPalette(colorPalette);
	horizontalLayout3->addWidget(frame);

	QLabel* label2 = new QLabel( "Select move points technique:", this );
	QFont f2 = label2->font();
	f2.setBold(false);
	label->setFont( f2 );
	horizontalLayout4->addWidget(label2);

	m_pbtn_Collinear = new QPushButton();
	m_pbtn_Collinear->setText("Collinear");
	m_pbtn_Collinear->setToolTip("Move points in the same direction as the mouse moves.");
	m_pbtn_Collinear->setCheckable(true);
	m_pbtn_Collinear->setChecked(true);
	horizontalLayout5->addWidget(m_pbtn_Collinear);
	connect(m_pbtn_Collinear, SIGNAL(clicked()), this, SLOT(Collinear()));

	m_pbtn_Radial = new QPushButton();
	m_pbtn_Radial->setText("Radial");
	m_pbtn_Radial->setToolTip("Move points outside radial from the origin of the tool.");
	m_pbtn_Radial->setCheckable(true);
	horizontalLayout5->addWidget(m_pbtn_Radial);
	connect(m_pbtn_Radial, SIGNAL(clicked()), this, SLOT(Radial()));

	QFrame *frame1 = new QFrame( this );
	frame1->setFrameStyle( QFrame::Box | QFrame::Plain );
	frame1->setLineWidth(10);
	frame1->setFixedSize(200,10);
	frame1->setPalette(colorPalette);
	horizontalLayout6->addWidget(frame1);

	QLabel* label3 = new QLabel( "The tool can add further points while bulging.", this );
	QFont f3 = label3->font();
	f3.setBold(false);
	label3->setFont( f );
	horizontalLayout7->addWidget(label3);

	m_SelectRefinementMethodeBox = new QComboBox();
	m_SelectRefinementMethodeBox->addItem("Off. Don't add points");
	m_SelectRefinementMethodeBox->addItem("Automatic");
	m_SelectRefinementMethodeBox->addItem("Insert Point(s)");
	m_SelectRefinementMethodeBox->addItem("Subdivide Edge(s)");
	horizontalLayout8->addWidget(m_SelectRefinementMethodeBox);
	connect(m_SelectRefinementMethodeBox, SIGNAL(activated(int)), this, SLOT(SelectRefinementMethode(int)));

	QFrame *frame2 = new QFrame( this );
	frame2->setFrameStyle( QFrame::Box | QFrame::Plain );
	frame2->setLineWidth(10);
	frame2->setFixedSize(200,10);
	frame2->setPalette(colorPalette);
	horizontalLayout9->addWidget(frame2);

	QPushButton* pbtn_ShowTool = new QPushButton();
	pbtn_ShowTool->setText("Show Bulge Tool");
	pbtn_ShowTool->setCheckable(true);
	horizontalLayout10->addWidget(pbtn_ShowTool);
	connect(pbtn_ShowTool, SIGNAL(clicked()), this, SLOT(ShowTool()));

	QPushButton* pbtnReinitNow = new QPushButton();
	pbtnReinitNow->setText("Reinit Now");
	horizontalLayout11->addWidget(pbtnReinitNow);
	connect(pbtnReinitNow, SIGNAL(clicked()), this, SLOT(ReinitNow()));

	connect(this, SIGNAL(NewToolAssociated(mitk::Tool*)), this, SLOT(OnNewToolAssociated(mitk::Tool*)));
	std::cout << "ciao from " << __FUNCSIG__ << std::endl;
}
コード例 #9
0
QmitkActiveSurfaceToolGUI::QmitkActiveSurfaceToolGUI()
:QmitkToolGUI()
{
	//std::cout << "hi from " << __FUNCSIG__ << std::endl;
	// create the visible widgets
	QBoxLayout* verticalLayout = new QVBoxLayout( this );

	m_HorizontalLayout = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout);
	m_HorizontalLayout1 = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout1);
	m_HorizontalLayout2 = new QHBoxLayout();
	verticalLayout->addLayout(m_HorizontalLayout2);

	m_SelectSurfaceBox = new QComboBox();
	m_HorizontalLayout->addWidget(m_SelectSurfaceBox);
	connect(m_SelectSurfaceBox, SIGNAL(activated(int)), this, SLOT(SelectSurface(int)));

	m_PbtnSelectSurfaceViaMouse = new QPushButton();
	QIcon icn_OpenFile;
	icn_OpenFile.addFile(":/threeDEditing/res/threeDEditing/mousepointer.png");
	m_PbtnSelectSurfaceViaMouse->setIcon(icn_OpenFile);
	m_PbtnSelectSurfaceViaMouse->setFixedSize(22,22);
	m_HorizontalLayout->addWidget(m_PbtnSelectSurfaceViaMouse);
	connect(m_PbtnSelectSurfaceViaMouse, SIGNAL(clicked()), this, SLOT(SelectSurfaceViaMouse()));
	
	m_PbtnReinitSelection = new QPushButton();
	m_PbtnReinitSelection->setText("Reinit Selection");
	m_PbtnReinitSelection->setCheckable(true);
	m_HorizontalLayout1->addWidget(m_PbtnReinitSelection);
	connect(m_PbtnReinitSelection, SIGNAL(clicked()), this, SLOT(ReinitSelection()));

	m_PbtnJumpToPosition = new QPushButton();
	m_PbtnJumpToPosition->setText("Jump to Position");
	m_PbtnJumpToPosition->setCheckable(true);
	m_HorizontalLayout1->addWidget(m_PbtnJumpToPosition);
	connect(m_PbtnJumpToPosition, SIGNAL(clicked()), this, SLOT(JumpToPosition()));

	QLabel* label = new QLabel( "Radius", this );
	QFont f = label->font();
	f.setBold(false);
	label->setFont( f );
	m_HorizontalLayout2->addWidget(label);

	m_RadiusSlider = new QSlider(Qt::Horizontal);
	m_RadiusSlider->setSliderPosition(20);
	m_HorizontalLayout2->addWidget(m_RadiusSlider);
	QObject::connect(m_RadiusSlider, SIGNAL(sliderMoved(int)), this, SLOT(RadiusChanged(int)));


	// Tool Specific
	QBoxLayout* horizontalLayout3 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout3);
	QBoxLayout* horizontalLayout4 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout4);
	QBoxLayout* horizontalLayout5 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout5);
	QBoxLayout* horizontalLayout6 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout6);
	QBoxLayout* horizontalLayout7 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout7);
	QBoxLayout* horizontalLayout8 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout8);
	QBoxLayout* horizontalLayout9 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout9);
	QBoxLayout* horizontalLayout10 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout10);
	QBoxLayout* horizontalLayout11 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout11);
	QBoxLayout* horizontalLayout12 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout12);
	QBoxLayout* horizontalLayout13 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout13);
	QBoxLayout* horizontalLayout14 = new QHBoxLayout();
	verticalLayout->addLayout(horizontalLayout14);

	QFrame *frame = new QFrame( this );
	frame->setFrameStyle( QFrame::Box | QFrame::Plain );
	frame->setLineWidth(10);
	frame->setFixedSize(200,10);
	QColor color(214,247,202);
	QPalette colorPalette(color);
	colorPalette.setColor(QPalette::Foreground, color);
	frame->setPalette(colorPalette);
	horizontalLayout3->addWidget(frame);

	QLabel* label2 = new QLabel( "Select feature image:", this );
	QFont f2 = label2->font();
	f2.setBold(false);
	label2->setFont( f2 );
	horizontalLayout4->addWidget(label2);

	m_SelectImageBox = new QComboBox();
	horizontalLayout5->addWidget(m_SelectImageBox);
	connect(m_SelectImageBox, SIGNAL(activated(int)), this, SLOT(SelectImage(int)));

	QLabel* label3 = new QLabel( "Set seed point bubble\n(left click):\nRemove bubble\n(shift + left click)", this );
	QFont f3 = label3->font();
	f3.setPointSize(7);
	f3.setBold(false);
	label3->setFont( f3 );
	horizontalLayout6->addWidget(label3);

	QPushButton* pbtn_RemoveBubble = new QPushButton();
	pbtn_RemoveBubble->setText("Remove Bubble");
	horizontalLayout6->addWidget(pbtn_RemoveBubble);
	connect(pbtn_RemoveBubble, SIGNAL(clicked()), this, SLOT(RemoveBubble()));

	m_VCR = new std::vector<QPushButton*>;
	int size = 24;

	QPushButton* pbtn_Stop = new QPushButton();
	QIcon icn_Stop;
	icn_Stop.addFile(":/threeDEditing/res/threeDEditing/Backward_01.png");
	pbtn_Stop->setIcon(icn_Stop);
	pbtn_Stop->setIconSize(QSize(size,size));
	horizontalLayout7->addWidget(pbtn_Stop);	
	connect(pbtn_Stop, SIGNAL(clicked()), this, SLOT(Stop()));

	QPushButton* pbtn_StepBack = new QPushButton();
	QIcon icn_StepBack;
	icn_StepBack.addFile(":/threeDEditing/res/threeDEditing/left.png");
	pbtn_StepBack->setIcon(icn_StepBack);
	pbtn_StepBack->setIconSize(QSize(size,size));
	horizontalLayout7->addWidget(pbtn_StepBack);	
	connect(pbtn_StepBack, SIGNAL(clicked()), this, SLOT(StepBack()));

	QPushButton* pbtn_ReversePlay = new QPushButton();
	m_VCR->push_back(pbtn_ReversePlay);
	QIcon icn_ReversePlay;
	icn_ReversePlay.addFile(":/threeDEditing/res/threeDEditing/Backward.png");
	pbtn_ReversePlay->setIcon(icn_ReversePlay);
	pbtn_ReversePlay->setCheckable(true);
	pbtn_ReversePlay->setIconSize(QSize(size,size));
	horizontalLayout7->addWidget(pbtn_ReversePlay);	
	connect(pbtn_ReversePlay, SIGNAL(clicked()), this, SLOT(ReversePlay()));

	QPushButton* pbtn_Pause = new QPushButton();
	m_VCR->push_back(pbtn_Pause);
	QIcon icn_Pause;
	icn_Pause.addFile(":/threeDEditing/res/threeDEditing/pause.png");
	pbtn_Pause->setIcon(icn_Pause);
	pbtn_Pause->setCheckable(true);
	pbtn_Pause->setChecked(true);
	pbtn_Pause->setIconSize(QSize(size,size));
	horizontalLayout7->addWidget(pbtn_Pause);	
	connect(pbtn_Pause, SIGNAL(clicked()), this, SLOT(Pause()));

	QPushButton* pbtn_Play = new QPushButton();
	m_VCR->push_back(pbtn_Play);
	QIcon icn_Play;
	icn_Play.addFile(":/threeDEditing/res/threeDEditing/Forward.png");
	pbtn_Play->setIcon(icn_Play);
	pbtn_Play->setCheckable(true);
	pbtn_Play->setIconSize(QSize(size,size));
	horizontalLayout7->addWidget(pbtn_Play);	
	connect(pbtn_Play, SIGNAL(clicked()), this, SLOT(Play()));

	QPushButton* pbtn_StepForward = new QPushButton();
	QIcon icn_StepForward;
	icn_StepForward.addFile(":/threeDEditing/res/threeDEditing/right.png");
	pbtn_StepForward->setIcon(icn_StepForward);
	pbtn_StepForward->setIconSize(QSize(size,size));
	horizontalLayout7->addWidget(pbtn_StepForward);	
	connect(pbtn_StepForward, SIGNAL(clicked()), this, SLOT(StepForward()));

	QLabel* label5 = new QLabel( "Step size:", this );
	QFont f5 = label5->font();
	f5.setBold(false);
	label5->setFont( f5 );
	horizontalLayout8->addWidget(label5);
	QSpinBox* selectStepSize = new QSpinBox();
	selectStepSize->setRange(1, 50);
	selectStepSize->setValue(1);
	horizontalLayout8->addWidget(selectStepSize);
	connect(selectStepSize, SIGNAL(valueChanged(int)), this, SLOT(SelectStepSize(int)));

	QLabel* label6 = new QLabel( "Iteration:", this );
	QFont f6 = label6->font();
	f6.setBold(false);
	label6->setFont( f6 );
	horizontalLayout8->addWidget(label6);
	numberOfIterations = new QLineEdit(this);
	numberOfIterations->setText("0");
	numberOfIterations->setReadOnly(true);
	horizontalLayout8->addWidget(numberOfIterations);

	QFrame *frame1 = new QFrame( this );
	frame1->setFrameStyle( QFrame::Box | QFrame::Plain );
	frame1->setLineWidth(10);
	frame1->setFixedSize(200,10);
	frame1->setPalette(colorPalette);
	horizontalLayout9->addWidget(frame1);

	// Parameters
	QLabel* label7 = new QLabel( "Parameters:", this );
	QFont f7 = label7->font();
	f7.setBold(true);
	label7->setFont( f7 );
	horizontalLayout10->addWidget(label7);


	// make the "InputMask" for values between 1.11 and 17.93 with 2 digits after the comma
	QValidator *inputRange = new QDoubleValidator(0.000, 100000.000, 3, this);

	// table layout
	QBoxLayout* verticalLayout1 = new QVBoxLayout();
	horizontalLayout11->addLayout(verticalLayout1);
	QBoxLayout* verticalLayout2 = new QVBoxLayout();
	horizontalLayout11->addLayout(verticalLayout2);
	QBoxLayout* verticalLayout3 = new QVBoxLayout();
	horizontalLayout11->addLayout(verticalLayout3);

	QLabel* label8 = new QLabel( "Curvature\nForce:", this );
	QFont f8 = label8->font();
	f8.setBold(false);
	f8.setPointSize(7);
	label8->setFont( f8 );
	verticalLayout1->addWidget(label8);
	m_CurvatureForce = new QLineEdit(this);
	m_CurvatureForce->setText("0");
	m_CurvatureForce->setReadOnly(false);
	m_CurvatureForce->setValidator(inputRange);
	QObject::connect(m_CurvatureForce, SIGNAL(returnPressed()), this, SLOT(EditedCurvatureForce()));
	verticalLayout2->addWidget(m_CurvatureForce);
	QmitkCrossWidget* curvatureForceCross = new QmitkCrossWidget();
	QPixmap pixCurvatureForce(":/threeDEditing/res/threeDEditing/CrossArrow.png");
	curvatureForceCross->setPixmap(pixCurvatureForce.scaledToWidth(100));
	curvatureForceCross->setFixedSize(100,20);
	curvatureForceCross->setToolTip("Drag with a left mouse click from the center circle to the sides.");
	verticalLayout3->addWidget(curvatureForceCross);
	connect( curvatureForceCross, SIGNAL( SignalDeltaMove( int, int ) ), this, SLOT( CurvatureForceCross( int, int ) ) );

	QLabel* label10 = new QLabel( "Area\nForce:", this );
	QFont f10 = label10->font();
	f10.setBold(false);
	f10.setPointSize(7);
	label10->setFont( f10 );
	verticalLayout1->addWidget(label10);
	m_AreaForce = new QLineEdit(this);
	m_AreaForce->setText("0");
	m_AreaForce->setReadOnly(false);
	m_AreaForce->setValidator(inputRange);
	QObject::connect(m_AreaForce, SIGNAL(returnPressed()), this, SLOT(EditedAreaForce()));
	verticalLayout2->addWidget(m_AreaForce);
	QmitkCrossWidget* areaForceCross = new QmitkCrossWidget();
	QPixmap pixAreaForce(":/threeDEditing/res/threeDEditing/CrossArrow.png");
	areaForceCross->setPixmap(pixAreaForce.scaledToWidth(100));
	areaForceCross->setFixedSize(100,20);
	areaForceCross->setToolTip("Drag with a left mouse click from the center circle to the sides.");
	verticalLayout3->addWidget(areaForceCross);
	connect( areaForceCross, SIGNAL( SignalDeltaMove( int, int ) ), this, SLOT( AreaForceCross( int, int ) ) );

	QLabel* label11 = new QLabel( "Volume\nForce:", this );
	QFont f11 = label11->font();
	f11.setBold(false);
	f11.setPointSize(7);
	label11->setFont( f11 );
	verticalLayout1->addWidget(label11);
	m_VolumeForce = new QLineEdit(this);
	m_VolumeForce->setText("0");
	m_VolumeForce->setReadOnly(false);
	m_VolumeForce->setValidator(inputRange);
	QObject::connect(m_VolumeForce, SIGNAL(returnPressed()), this, SLOT(EditedVolumeForce()));
	verticalLayout2->addWidget(m_VolumeForce);
	QmitkCrossWidget* volumeForceCross = new QmitkCrossWidget();
	QPixmap pixVolumeForce(":/threeDEditing/res/threeDEditing/CrossArrow.png");
	volumeForceCross->setPixmap(pixVolumeForce.scaledToWidth(100));
	volumeForceCross->setFixedSize(100,20);
	volumeForceCross->setToolTip("Drag with a left mouse click from the center circle to the sides.");
	verticalLayout3->addWidget(volumeForceCross);
	connect( volumeForceCross, SIGNAL( SignalDeltaMove( int, int ) ), this, SLOT( VolumeForceCross( int, int ) ) );

	QFrame *frame2 = new QFrame( this );
	frame2->setFrameStyle( QFrame::Box | QFrame::Plain );
	frame2->setLineWidth(10);
	frame2->setFixedSize(200,10);
	frame2->setPalette(colorPalette);
	horizontalLayout12->addWidget(frame2);

	QPushButton* pbtnClosing = new QPushButton();
	pbtnClosing->setText("Closing by one pixel");
	pbtnClosing->setCheckable(true);
	horizontalLayout13->addWidget(pbtnClosing);
	connect(pbtnClosing, SIGNAL(clicked()), this, SLOT(Closing()));

	QLabel* label12 = new QLabel( "Zoom:", this );
	QFont f12 = label12->font();
	f12.setBold(false);
	//f12.setPointSize(6);
	label12->setFont( f12 );
	horizontalLayout14->addWidget(label12);
	QmitkCrossWidget* zoomCross = new QmitkCrossWidget();
	QPixmap pixZoom(":/threeDEditing/res/threeDEditing/CrossArrow.png");
	zoomCross->setPixmap(pixZoom.scaledToWidth(100));
	zoomCross->setFixedSize(100,20);
	zoomCross->setToolTip("Drag with a left mouse click from the center circle to the sides.");
	horizontalLayout14->addWidget(zoomCross);
	connect( zoomCross, SIGNAL( SignalDeltaMove( int, int ) ), this, SLOT( ZoomCross( int, int ) ) );

	connect( this, SIGNAL(NewToolAssociated(mitk::Tool*)), this, SLOT(OnNewToolAssociated(mitk::Tool*)) );
	//std::cout << "ciao from " << __FUNCSIG__ << std::endl;
}