-
-
-#ifndef __creaImageIOWxAnySimpleDlg_h_INCLUDED__
-#define __creaImageIOWxAnySimpleDlg_h_INCLUDED__
+#ifndef __creaImageWxAnySimpleDlg_h_INCLUDED__
+#define __creaImageWxAnySimpleDlg_h_INCLUDED__
#include <itkImageFileReader.h>
#include <boost/any.hpp>
#include <typeinfo>
+#include "itkImageToVTKImageFilter.h"
+
namespace creaImageIO
{
/**
return imgs;
}
bool AllSameType();
+ template <class TImage>
+ void split3Din3Dvtk(TImage* i_Img)
+ {
+ typedef itk::ImageToVTKImageFilter< TImage > ConnectorType;
+ typename ConnectorType::Pointer connector = ConnectorType::New();
+ connector->SetInput(i_Img);
+ connector->GetImporter()->SetDataScalarTypeToUnsignedChar();
+ connector->Update();
+ vtkImageData *im = vtkImageData::New();
+ im->ShallowCopy(connector->GetOutput());
+ im->Update();
+ m_Vresults.push_back(im);
+ }
+
+
+ template <typename TImage>
+ void split4Din3Dvtk(TImage* i_Img);
+
+
private:
// strange compile error with gcc 4.5.1-4 //JPR
std::string namedb;
wxString infoimage;
std::string m_dir;
- template <class TImage>
- void split3Din3Dvtk(TImage* i_Img);
- template <typename TImage>
- void split4Din3Dvtk(TImage* i_Img);
- bool m_dicom;
+ bool m_dicom;
/// interface to read data
SimpleView m_view;
void readImg(const std::string &i_name);
const std::type_info & getType(const std::string &i_name);
};
-}
-
-#endif //__creaImageIOWxAnySimpleDlg_h_INCLUDED__
+}// namespace creaImageIO
+#endif //__creaImageWxAnySimpleDlg_h_INCLUDED__