2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
5 #include "bbcreaImageIOItkImagesChooserDialogBox.h"
6 #include "bbcreaImageIOPackage.h"
8 namespace bbcreaImageIO
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaImageIO,ItkImagesChooserDialogBox)
12 BBTK_BLACK_BOX_IMPLEMENTATION(ItkImagesChooserDialogBox,bbtk::AtomicBlackBox);
14 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
16 void ItkImagesChooserDialogBox::Process()
19 dlg = new creaImageIO::WxAnySimpleDlg(0,crea::std2wx(bbGetInputTitle()),"localdatabase_Descriptor.dscp","Local Database");
23 bbtk::TypeInfo typ = bbitk::GetITKImagePtrTypeInfoFromPixelTypeInfoAndDimension(*dlg->getTypes().front(), dlg->getDims().front());
24 BBTK_TEMPLATE_ITK_IMAGE_SWITCH(typ, Export);
25 bbSetOutputOutVImages(dlg->getVtkImagesSelected());
28 template <class TImage>
29 void ItkImagesChooserDialogBox::Export()
31 if (dlg->getImagesSelected().size() == 1)
33 bbSetOutputOut( dlg->getTemplatedImagesSelected<TImage>().front() );
35 else if (dlg->getImagesSelected().size() > 1)
37 // bbSetOutputOutImages( bbSetOutputOutIImages( dlg->getTemplatedImagesSelected<TImage>() ));
41 bbSetOutputOut( NULL);
43 // FCY To test the Output
44 //typedef itk::Image <short, 3> ImageType;
45 //typedef itk::ImageFileReader< ImageType > itkReaderType;
46 // typename itkReaderType::Pointer reader = itkReaderType::New();
48 // reader->SetFileName("d:\test.hdr");
50 //reader->GetOutput()->Register();
51 // this->bbSetOutputOut(reader->GetOutput());
54 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
56 void ItkImagesChooserDialogBox::bbUserSetDefaultValues()
63 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
65 void ItkImagesChooserDialogBox::bbUserInitializeProcessing()
70 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
72 void ItkImagesChooserDialogBox::bbUserFinalizeProcessing()
77 // EO namespace bbcreaImageIO