i->ShallowCopy(mUnreadableImage);
}
// std::cout << "i="<<i<<std::endl;
+std::cout<<"return: "<<i->GetScalarTypeAsString()<<", pointer="<<i<<std::endl;
return i;
}
//=====================================================================
#ifndef __creaImageIOImageReader_h_INCLUDED__
#define __creaImageIOImageReader_h_INCLUDED__
-#include <creaImageIOAbstractImageReader.h>
#include <creaImageIOSystem.h>
+#include <creaImageIOAbstractImageReader.h>
namespace creaImageIO
{
-
+
/**
* \ingroup IO
* \brief Generic image reader which uses all the specific concrete image reader of the lib (tif, jpg, dicom, ...)
fread(header,sizeof(int),HEADER_SIZE,rf_file);
h.frame = header[1];
h.height = header[2];
- h.width = header[3];
+ h.width = header[3];
free(header);
return true;
}
//=====================================================================
vtkImageData* RFImageReader::ReadImage(const std::string& filename)
{
+
+ std::cout<<"RFImageReader reading "<<std::endl;
+
FILE *rf_file=fopen(filename.c_str(),"rb");
if (!rf_file) return false;
rf_header h;
long im_size = h.height * h.width * h.frame;
short* data = (short*)malloc(sizeof(short)*im_size);
- long frame_size = h.height * h.width * sizeof(short);
+ long frame_size = h.height * h.width;
short* ptr = data;
for (int k=0; k<h.frame; k++) {
int frame_number;
h.width,
h.height,
h.frame);
-
return im;
// std::cout << "OK" << std::endl;
#include <creaImageIOAbstractImageReader.h>
-
+#include <creaImageIOSystem.h>
namespace creaImageIO
{
//=====================================================================
/// Concrete image reader for ultrasonix 'rf' files
- class RFImageReader : virtual public AbstractImageReader
+ class CREAIMAGEIO_EXPORT RFImageReader : virtual public AbstractImageReader
{
public:
RFImageReader();
+#include <creaImageIOSystem.h>
#include <creaImageIOUltrasonixImageReader.h>
#include <creaVtk.h>
-#include <creaImageIOSystem.h>
#include "boost/filesystem/path.hpp"
namespace creaImageIO
//=====================================================================
vtkImageData* UltrasonixImageReader::ReadImage(const std::string& filename)
{
-
- std::cout<<"UltrasonixImageReader reading "<<std::endl;
-
FILE *Ultrasonix_file=fopen(filename.c_str(),"rb");
if (!Ultrasonix_file) return false;
Ultrasonix_header h;