Remove ITK, use simple DICOM image reader read DICOM files.
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
|
||||
#include <QObject>
|
||||
#include "exportoptions.h"
|
||||
#include <itkImage.h>
|
||||
#include <itkGDCMImageIO.h>
|
||||
#include <itkImageSeriesReader.h>
|
||||
#include <itkImageSeriesWriter.h>
|
||||
#include <itkImageToVTKImageFilter.h>
|
||||
#include <itkGDCMSeriesFileNames.h>
|
||||
//#include <itkImage.h>
|
||||
//#include <itkGDCMImageIO.h>
|
||||
//#include <itkImageSeriesReader.h>
|
||||
//#include <itkImageSeriesWriter.h>
|
||||
//#include <itkImageToVTKImageFilter.h>
|
||||
//#include <itkGDCMSeriesFileNames.h>
|
||||
#include "base/infinitiViewer.h"
|
||||
#include <vtkRenderer.h>
|
||||
#include <vtkSmartPointer.h>
|
||||
@@ -23,8 +23,8 @@
|
||||
#include <qfileinfo.h>
|
||||
#include <qdir.h>
|
||||
#include <sstream>
|
||||
#include "itkMetaDataObject.h"
|
||||
#include "itkMetaDataDictionary.h"
|
||||
//#include "itkMetaDataObject.h"
|
||||
//#include "itkMetaDataDictionary.h"
|
||||
|
||||
|
||||
class DicomExporter : public QObject
|
||||
@@ -74,17 +74,17 @@ private:
|
||||
//bmp jpg png tiff exprt releated objects
|
||||
static const unsigned int InputDimensionExport = 3;
|
||||
typedef signed short PixelTypeExport;
|
||||
typedef itk::Image<PixelTypeExport, InputDimensionExport> InputImageTypeExport;
|
||||
typedef itk::GDCMImageIO ImageIOTypeExport;
|
||||
typedef itk::ImageSeriesReader<InputImageTypeExport> SeriesReaderTypeExport;
|
||||
typedef itk::ImageToVTKImageFilter<InputImageTypeExport> ConnectorTypeExport;
|
||||
typedef itk::GDCMSeriesFileNames InputNamesGeneratorTypeExport;
|
||||
// typedef itk::Image<PixelTypeExport, InputDimensionExport> InputImageTypeExport;
|
||||
// typedef itk::GDCMImageIO ImageIOTypeExport;
|
||||
// typedef itk::ImageSeriesReader<InputImageTypeExport> SeriesReaderTypeExport;
|
||||
// typedef itk::ImageToVTKImageFilter<InputImageTypeExport> ConnectorTypeExport;
|
||||
// typedef itk::GDCMSeriesFileNames InputNamesGeneratorTypeExport;
|
||||
|
||||
//dicom export releated objects
|
||||
typedef signed short OutputPixelType;
|
||||
static const unsigned int OutputDimension = 2;
|
||||
typedef itk::Image<OutputPixelType, OutputDimension> Image2DType;
|
||||
typedef itk::ImageSeriesWriter<InputImageTypeExport, Image2DType> SeriesWriterType;
|
||||
// typedef itk::Image<OutputPixelType, OutputDimension> Image2DType;
|
||||
// typedef itk::ImageSeriesWriter<InputImageTypeExport, Image2DType> SeriesWriterType;
|
||||
|
||||
private:
|
||||
void initVTK();
|
||||
@@ -102,7 +102,7 @@ private:
|
||||
void exportDicom(const QString& fileName);
|
||||
void exportSingleDicomFile(const QString& fileName);
|
||||
void exportDicomDirectory(const QString& fileName);
|
||||
void modifyDicomTags(SeriesReaderTypeExport::DictionaryArrayRawPointer dicArray);
|
||||
// void modifyDicomTags(SeriesReaderTypeExport::DictionaryArrayRawPointer dicArray);
|
||||
void caculateExportTotalCount();
|
||||
|
||||
private:
|
||||
@@ -111,10 +111,10 @@ private:
|
||||
int exportedNumber;//the exported image index
|
||||
|
||||
//itk vtk releated objects
|
||||
ImageIOTypeExport::Pointer m_gdcmIOExport;
|
||||
SeriesReaderTypeExport::Pointer m_itkSeriesReaderExport;
|
||||
ConnectorTypeExport::Pointer m_itkConnectorExport;
|
||||
InputNamesGeneratorTypeExport::Pointer m_inputNamesExport;
|
||||
// ImageIOTypeExport::Pointer m_gdcmIOExport;
|
||||
// SeriesReaderTypeExport::Pointer m_itkSeriesReaderExport;
|
||||
// ConnectorTypeExport::Pointer m_itkConnectorExport;
|
||||
// InputNamesGeneratorTypeExport::Pointer m_inputNamesExport;
|
||||
vtkSmartPointer<vtkRenderWindow> m_glrenWinExport;
|
||||
vtkSmartPointer<infinitiViewer> m_imageViewerExport;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user