Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/05/15 08:02:36 $
- Version: $Revision: 1.20 $
+ Date: $Date: 2008/06/26 07:37:04 $
+ Version: $Revision: 1.21 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bbtkDebugMessage("wx",5,"WxBlackBoxFrame::bbShow("
<<bbGetBlackBox()->bbGetFullName()<<")"<<std::endl);
WxBlackBoxWindow::bbShow();
- wxFrame::Show();
+ wxFrame::Show();
// This Update is ** MANDATORY **
// to synchronize wxvtkRenderWindowInteractor objects
// (force wx objects creation **NOW**)
+ wxFrame::Refresh();
wxFrame::Update();
+ wxFrame::SetFocus();
if (bbGetBlackBox()) bbGetBlackBox()->bbUserOnShow();
- // wxFrame::SetFocus();
}
//=========================================================================
Program: bbtk
Module: $RCSfile: bbtkWxGUITextEditor.cxx,v $
Language: C++
- Date: $Date: 2008/05/14 12:32:26 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/06/26 07:37:05 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
wxFileDialog* fd = new wxFileDialog(this,_T("Save file"),_T(""),
_T(""),std2wx(filter),
wxSAVE | wxOVERWRITE_PROMPT );
- fd->ShowModal();
+ int result_fd = fd->ShowModal();
+ // This line is need it by windows // EED
+ fd->SetReturnCode( result_fd );
+
if (fd->GetReturnCode()==wxID_OK)
{
mName = wx2std(fd->GetPath());
wxFileDialog* fd = new wxFileDialog(this,_T("Open file"),_T(""),
_T(""),std2wx(mFileNameFilter),
wxOPEN | wxFILE_MUST_EXIST );
- fd->ShowModal();
-
+ int result_fd = fd->ShowModal();
+
+ // This line is need it by windows //EED
+ fd->SetReturnCode( result_fd );
+
if (fd->GetReturnCode()==wxID_OK)
{
std::string filename = wx2std(fd->GetPath());
print "=== GaussianSmooth box example ==="
-description "GaussianSmooth box example"
+description "GaussianSmooth box example. Screenshot : <img src=ExampleGaussianSmooth.jpg></img>"
author "eduardo.davila at creatis.insa-lyon.fr"
category "example"
--- /dev/null
+print "=== GaussianSmooth_02 box example ==="
+description "GaussianSmooth Save box. Screenshot : <img src=ExampleGaussianSmooth_02.jpg></img>"
+author "eduardo.davila at creatis.insa-lyon.fr"
+category "example"
+
+include wx
+include itk
+include vtk
+include wxvtk
+include itkvtk
+
+new FileSelector fileselectoropen
+ set fileselectoropen.OpenSave "Open"
+
+new ImageReader imagereader
+ connect fileselectoropen.Out imagereader.Filename
+
+new Viewer2D viewerleft
+ connect imagereader.Out viewerleft.In
+
+new Slider slidersmooth
+ set slidersmooth.In 1
+ set slidersmooth.Max 10
+ set slidersmooth.Title "Gaussian smooth "
+
+new ImageGaussianSmooth smooth
+ connect imagereader.Out smooth.In
+ connect slidersmooth.Out smooth.StdDevX
+ connect slidersmooth.Out smooth.StdDevY
+ connect slidersmooth.Out smooth.StdDevZ
+ connect slidersmooth.BoxChange smooth.BoxExecute
+
+new Viewer2D viewerright
+ connect smooth.Out viewerright.In
+ connect slidersmooth.BoxChange viewerright.BoxExecute
+
+new LayoutLine layoutlineviwer
+ set layoutlineviwer.Orientation H
+ connect viewerleft.Widget layoutlineviwer.Widget1
+ connect viewerright.Widget layoutlineviwer.Widget2
+
+new FileSelector fileselectorsave
+ set fileselectorsave.OpenSave "Save"
+
+new ImageWriter imagewrite
+ connect smooth.Out imagewrite.In
+ connect fileselectorsave.Out imagewrite.Filename
+
+new CommandButton btnSave
+ set btnSave.Label "Save smooth"
+ connect btnSave.BoxChange fileselectorsave.BoxExecute
+ connect btnSave.BoxChange imagewrite.BoxExecute
+
+new LayoutLine layoutline
+ connect slidersmooth.Widget layoutline.Widget1
+ connect btnSave.Widget layoutline.Widget2
+
+new LayoutSplit main
+ connect layoutlineviwer.Widget main.Widget1
+ connect layoutline.Widget main.Widget2
+
+
+exec main
\ No newline at end of file
Program: bbtk
Module: $RCSfile: bbwxColourSelector.cxx,v $
Language: C++
- Date: $Date: 2008/04/18 12:59:52 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/06/26 07:37:11 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
<<bbGetFullName()<<"]"<<std::endl);
wxColourDialog *colordialog = new wxColourDialog( 0 );
- colordialog->ShowModal();
+ int result_colordialog = colordialog->ShowModal();
+
+ // This line is need it by windows // EED
+ colordialog->SetReturnCode( result_colordialog );
+
if (colordialog->GetReturnCode()==wxID_OK)
{
char col[100];
Program: bbtk
Module: $RCSfile: bbwxCommandButton.cxx,v $
Language: C++
- Date: $Date: 2008/05/15 08:02:37 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/06/26 07:37:11 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
&CommandButtonWidget::OnCommandButton );
wxFlexGridSizer *sizer = new wxFlexGridSizer(1);
- sizer -> Add( mwxCommandButton,1,wxGROW );
+ sizer -> Add( mwxCommandButton,1,wxGROW | wxALL,10 );
sizer -> AddGrowableCol(0);
panel -> SetSizer(sizer);
bbSetInputIn("");
bbSetInputLabel("");
std::vector<double> lstColour;
- lstColour.push_back(-1);
- lstColour.push_back(-1);
- lstColour.push_back(-1);
+ lstColour.push_back(0.75);
+ lstColour.push_back(0.75);
+ lstColour.push_back(0.75);
bbSetInputColour(lstColour);
}
Program: bbtk
Module: $RCSfile: bbwxFileSelector.cxx,v $
Language: C++
- Date: $Date: 2008/04/18 12:59:52 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/06/26 07:37:11 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bbtk::std2wx(wc),
style,
wxDefaultPosition);
+//EED
+
+ int result_FD = FD->ShowModal();
+
+ // This line is need it by windows //EED
+ FD->SetReturnCode( result_FD );
- FD->ShowModal();
-
if (FD->GetReturnCode()==wxID_OK)
{
bbSetOutputOut( bbtk::wx2std (FD->GetPath()) );
}
+ void FileSelector::bbUserConstructor()
+ {
+ bbSetInputOpenSave("Open");
+ }
+
+
}//namespace bbtk
Program: bbtk
Module: $RCSfile: bbwxFileSelector.h,v $
Language: C++
- Date: $Date: 2008/04/18 12:59:52 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/06/26 07:37:11 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
BBTK_DECLARE_OUTPUT(Out,std::string);
BBTK_PROCESS(Process);
void Process();
+
+ protected:
+ virtual void bbUserConstructor();
+
};
//=================================================================
Program: bbtk
Module: $RCSfile: bbwxvtkViewer2D.cxx,v $
Language: C++
- Date: $Date: 2008/06/25 15:36:19 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2008/06/26 07:37:18 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
(backImageData!=NULL)&&
(mBox->bbIsShown()))
{
- int z = mBox->bbGetInputSlice();
- // std::cout << "slice = "<<z<<std::endl;
- int ext[6];
- backImageData->GetWholeExtent(ext);
+ int z = mBox->bbGetInputSlice();
+ // std::cout << "slice = "<<z<<std::endl;
+ int ext[6];
+ backImageData->GetWholeExtent(ext);
- // std::cout << "ext = "<<ext[4]<<" - "<<ext[5]<<std::endl;
+ // std::cout << "ext = "<<ext[4]<<" - "<<ext[5]<<std::endl;
- if (z<ext[4]) { z=ext[4]; }
- if (z>ext[5]) { z=ext[5]; }
+ if (z<ext[4]) { z=ext[4]; }
+ if (z>ext[5]) { z=ext[5]; }
-#if (VTK_MAJOR_VERSION >= 5)
- imageViewer->SetSlice( z );
-#else
- imageViewer->SetZSlice( z );
-#endif
+ #if (VTK_MAJOR_VERSION >= 5)
+ imageViewer->SetSlice( z );
+ #else
+ imageViewer->SetZSlice( z );
+ #endif
- //imageViewer->UpdateDisplayExtent();
- wxvtkrenderwindowinteractor->Render();
- imageViewer->GetRenderer()->ResetCameraClippingRange();
+ //imageViewer->UpdateDisplayExtent();
+ // wxvtkrenderwindowinteractor->Render();
+ imageViewer->GetRenderer()->ResetCameraClippingRange();
}
// when window is shown
void Viewer2D::bbUserOnShow()
{
+ ((Viewer2DWidget*)bbGetOutputWidget())->Refresh();
+ ((Viewer2DWidget*)bbGetOutputWidget())->Update();
((Viewer2DWidget*)bbGetOutputWidget())->UpdateView();
}