--- /dev/null
+#include <creaImageIOGimmickReaderDialog.h>
+#include <creaImageIOWxGimmickReaderDialog.h>
+#include <BlockScopeWxApp.h>
+
+namespace creaImageIO
+{
+
+ bool GimmickReaderDialog(std::vector<vtkImageData*>& 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 !"
+ <<std::endl;
+ return false;
+ }
+
+
+ }
+
+}
--- /dev/null
+#ifndef __creaImageIOGimmickReaderDialog_h_INCLUDED__
+#define __creaImageIOGimmickReaderDialog_h_INCLUDED__
+
+#include <vtkImageData.h>
+#include <vector>
+
+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<vtkImageData*>& 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
}
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;
}
//=====================================================================