Program: wxMaracas
Module: $RCSfile: CutModelMainPanel.cxx,v $
Language: C++
-Date: $Date: 2010/11/13 10:11:34 $
-Version: $Revision: 1.12 $
+Date: $Date: 2011/02/07 09:16:28 $
+Version: $Revision: 1.13 $
Copyright: (c) 2002, 2003
License:
_notebook->AddPage(new ToolBarCutModel(_notebook),_T("Cutter"),true);
//_wxauimanager->AddPane(new ToolBarCutModel(this),paneinfo.ToolbarPane().Top());
- _wxauimanager->AddPane(_notebook,paneinfo.Center());
+ _wxauimanager->AddPane(_notebook,paneinfo.Center().CloseButton(false));
addPolygonCutterTab();
_notebook->Update();
CutModelView* viewpanel = new CutModelView(this,cutmanager->getImageRange());
wxAuiPaneInfo paneinfo0;
- _wxauimanager->AddPane(viewpanel, paneinfo0.DefaultPane().DestroyOnClose().Centre());
+ _wxauimanager->AddPane(viewpanel, paneinfo0.DefaultPane().DestroyOnClose().Centre().Bottom());
viewpanel->setId(_panelid);
viewpanels.push_back(viewpanel);
Program: wxMaracas
Module: $RCSfile: CutModelView.cxx,v $
Language: C++
- Date: $Date: 2009/09/01 14:01:35 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2011/02/07 09:16:28 $
+ Version: $Revision: 1.3 $
Copyright: (c) 2002, 2003
License:
_sliderrange = new wxSlider(parent, -1, range[0],range[0],range[1],wxDefaultPosition,wxDefaultSize,wxSL_LABELS|wxSL_SELRANGE);
wxBoxSizer* sizergreyv = new wxBoxSizer(wxVERTICAL);
sizergreyv->Add(labelgreyv,wxSizerFlags().FixedMinSize());
- sizergreyv->Add(_sliderrange,wxSizerFlags().FixedMinSize());
- sizer->Add(sizergreyv,wxSizerFlags().FixedMinSize().Border());
+ sizergreyv->Add(_sliderrange,1, wxGROW);
+ sizer->Add(sizergreyv, 1, wxGROW);
wxString choices0[2];
choices0[0] = _T("inside");
wxSlider* slider0 = new wxSlider(parent, -1, 60,0,100,wxDefaultPosition,wxDefaultSize,wxSL_LABELS);
Connect(slider0->GetId(), wxEVT_SCROLL_THUMBRELEASE,(wxObjectEventFunction)(&CutModelViewEventHandler::onOpacityChange));
- sizeropacity->Add(labelopacity,wxSizerFlags().FixedMinSize());
- sizeropacity->Add(slider0,wxSizerFlags().FixedMinSize());
+ //sizeropacity->Add(labelopacity,1, wxGROWwxSizerFlags().FixedMinSize());
+ sizeropacity->Add(labelopacity,1, wxGROW);
+ //sizeropacity->Add(slider0,wxSizerFlags().FixedMinSize());
+ sizeropacity->Add(slider0, 1, wxGROW);
return sizeropacity;
}
Program: wxMaracas
Module: $RCSfile: CutModelData.cxx,v $
Language: C++
- Date: $Date: 2010/09/29 21:21:05 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2011/02/07 09:16:29 $
+ Version: $Revision: 1.8 $
Copyright: (c) 2002, 2003
License:
inversModel = vtkTransform::New();
vtkMatrix4x4* matrix = vtkMatrix4x4::New();
- matrix->Identity();
+ matrix->Identity();
+ double *ori = img->GetOrigin();
int *ext = img->GetExtent();
double *spc = img->GetSpacing();
matrix->SetElement(1,1,(ext[3]-ext[2])/4*spc[1]);
matrix->SetElement(2,2,(ext[5]-ext[4])/4*spc[2]);
- double orgx = (ext[1]-ext[0])/2*spc[0];
- double orgy = (ext[3]-ext[2])/2*spc[1];
- double orgz = (ext[5]-ext[4])/2*spc[2];
+ double orgx = (ori[0] + (ext[1]-ext[0])/2)*spc[0];
+ double orgy = (ori[1] + (ext[3]-ext[2])/2)*spc[1];
+ double orgz = (ori[2] + (ext[5]-ext[4])/2)*spc[2];
matrix->SetElement(0,3,orgx);
matrix->SetElement(1,3,orgy);