From: guigues Date: Tue, 24 Feb 2009 20:29:16 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~169 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=86c8c6b0f5c28056b5d3ea1281cc244279ccb06b;p=creaImageIO.git *** empty log message *** --- diff --git a/src2/creaImageIOGimmickReaderDialog.cpp b/src2/creaImageIOGimmickReaderDialog.cpp new file mode 100644 index 0000000..d8c52e1 --- /dev/null +++ b/src2/creaImageIOGimmickReaderDialog.cpp @@ -0,0 +1,50 @@ +#include +#include +#include + +namespace creaImageIO +{ + + bool GimmickReaderDialog(std::vector& images, + const std::string& title, + int posx, + int posy, + int sizex, + int sizey, + int image_min_type, + int image_max_type, + int image_out_dim, + int nb_threads) + { + BlockScopeWxApp app; + + creaImageIO::WxGimmickReaderDialog w(0, + -1, + crea::std2wx(title), + wxPoint(posx,posy), + wxSize(sizex,sizey), + image_min_type, + image_max_type, + nb_threads); + w.ShowModal(); + + if (w.GetReturnCode() == wxID_OK) + { + w.GetSelectedImages(images,image_out_dim); + return true; + } + else if (w.GetReturnCode() == wxID_CANCEL) + { + return false; + } + else + { + std::cout << "!! ERROR : GimmickReaderDialog : dialog ended without return code !" + < +#include + +namespace creaImageIO +{ + /** + * \ingroup GUI + * \brief Pops up a WxGimmickReaderDialog + * returns true if the user clicked 'Ok', false if 'Cancel' + * and fills the vector of images + */ + bool GimmickReaderDialog(std::vector& images, + const std::string& title = "Select images", + int posx = 0, int posy = 0, + int sizex = 1200, int sizey = 800, + int image_min_type = 2, + int image_max_type = 3, + int image_out_dim = 2, + int nb_threads = 1); + +} + +#endif diff --git a/src2/creaImageIORFImageReader.cpp b/src2/creaImageIORFImageReader.cpp index 5c7aec2..53111ac 100644 --- a/src2/creaImageIORFImageReader.cpp +++ b/src2/creaImageIORFImageReader.cpp @@ -92,9 +92,13 @@ namespace creaImageIO } fclose(rf_file); - - return crea::NewVtkImageDataFromRaw( data, - im_size); + std::cout << "NewVtkImageDataFromRaw" << std::endl; + vtkImageData* im = crea::NewVtkImageDataFromRaw( data, + h.width, + h.height, + h.frame); + + std::cout << "OK" << std::endl; } //=====================================================================