#include <creaImageIODicomImageReader2.h>
#include "gdcmStringFilter.h"
-
+#include "vtkGDCMImageReader.h"
#include <creaImageIOSystem.h>
#include "boost/filesystem/path.hpp"
mValidationSignal(ivalid);
}
+ void GimmickView::stopReader()
+ {
+ mReader.Stop();
+ }
+
//======================================================================
///Reads Images (Non Threaded)
void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s, std::vector<std::string> im, int dimension)
{
- mReader.Stop();
+ stopReader();
/* remember!
#define GIMMICK_NO_IMAGE_SELECTION 0
void readImages(std::vector<OutStrGimmick>& o_output, std::vector<std::string> im,
OutputAttr i_attr, int i_dim, double i_zspc);
bool isSingle(const std::string i_file);
+
+ void stopReader();
private:
//=====================================================================
bool UltrasonixImageReader::CanRead(const std::string& filename)
{
- long size;
+ long size = -1;
bool ok = false;
FILE *Ultrasonix_file=fopen(filename.c_str(), "rb");
if (Ultrasonix_file)
size = (ftell(Ultrasonix_file) - HEADER_SIZE * sizeof(int)) / sizeof(int);
// check if the data size corresponds to the dimensions of the images
- if (size == h.width * h.height * h.frame)
+ if (size == h.width * h.height * h.frame )
ok = true;
fclose(Ultrasonix_file);
void deleteMessage();
// void OnButtonOk(wxCommandEvent& event);
// void OnButtonCancel(wxCommandEvent& event);
+ void stopReading()
+ {
+ mView->stopReader();
+ }
private :
///Called when there has been a change in the visible attributes of a tree view
void OnAttributesChanged(const std::vector<std::string>& nShown, int level);
-
+
+
protected:
/// Creates the tool bar
void CreateToolBar();
dlg.ShowModal();
if (dlg.GetReturnCode() == wxID_OK)
{
- infoimage=_T("DICOM: ???_EED_???");
+ // infoimage=_T("DICOM: ???_EED_???");
//EED 07JUIN2010 dlg.GetSelectedImages(m_results,3);
std::vector<creaImageIO::OutStrGimmick> out;
std::vector<std::string> attr;
// attr.push_back("D0028_0010");
// attr.push_back("D0008_0023");
// attr.push_back("D0008_1070");
+ dlg.stopReading();
dlg.getSelected(out, attr,true,"");
// crea::VtkBasicSlicer(out.front().img);
m_results.clear();