//===== // 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) //===== #include "bbcreaImageIOItkImagesChooserDialogBox.h" #include "bbcreaImageIOPackage.h" namespace bbcreaImageIO { BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaImageIO,ItkImagesChooserDialogBox) BBTK_BLACK_BOX_IMPLEMENTATION(ItkImagesChooserDialogBox,bbtk::AtomicBlackBox); //===== // 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) //===== void ItkImagesChooserDialogBox::Process() { dlg = new creaImageIO::WxAnySimpleDlg(0,crea::std2wx(bbGetInputTitle()),"localdatabase_Descriptor.dscp","Local Database"); dlg->ShowModal(); // FCY to test bbtk::TypeInfo typ = bbitk::GetITKImagePtrTypeInfoFromPixelTypeInfoAndDimension(*dlg->getTypes().front(), dlg->getDims().front()); BBTK_TEMPLATE_ITK_IMAGE_SWITCH(typ, Export); bbSetOutputOutVImages(dlg->getVtkImagesSelected()); delete dlg; } template void ItkImagesChooserDialogBox::Export() { if (dlg->getImagesSelected().size() == 1) { bbSetOutputOut( dlg->getTemplatedImagesSelected().front() ); } else if (dlg->getImagesSelected().size() > 1) { // bbSetOutputOutImages( bbSetOutputOutIImages( dlg->getTemplatedImagesSelected() )); } else { bbSetOutputOut( NULL); } // FCY To test the Output //typedef itk::Image ImageType; //typedef itk::ImageFileReader< ImageType > itkReaderType; // typename itkReaderType::Pointer reader = itkReaderType::New(); // // reader->SetFileName("d:\test.hdr"); // reader->Update(); //reader->GetOutput()->Register(); // this->bbSetOutputOut(reader->GetOutput()); } //===== // 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) //===== void ItkImagesChooserDialogBox::bbUserSetDefaultValues() { } //===== // 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) //===== void ItkImagesChooserDialogBox::bbUserInitializeProcessing() { } //===== // 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) //===== void ItkImagesChooserDialogBox::bbUserFinalizeProcessing() { } } // EO namespace bbcreaImageIO