[Insight-users] How to read 3D dicom stored in a single dicom file

soheilghafurian soheilghafurian at yahoo.com
Thu Jun 20 17:54:22 EDT 2013


Hi all!

I have a video stored in one dicom file. The dimensions is 1024*1000*241. I
want to read it by ITK, but I can't. The code I'm using is as follows. Does
anyone know how to read this file which is a 3D dicom imaged in one single
dicom file?

Thanks
Soheil

typedef signed short DicomPixelType ;
typedef itk::Image < DicomPixelType , 2 > DicomImageType ;
typedef itk::Image < DicomPixelType , 3 > DicomVolumeType ;

...

typedef itk::ImageFileReader < DicomVolumeType > DicomVolumeReaderType ;

	DicomVolumeReaderType::Pointer reader = DicomVolumeReaderType::New() ;
	reader->SetFileName("Video.dcm" ) ;

	typedef itk::GDCMImageIO ImageIOType ;
	ImageIOType::Pointer gdcmImageIO = ImageIOType::New() ;
	reader->SetImageIO( gdcmImageIO ) ;

	try
	{
		reader->Update() ;
	}
	catch ( itk::ExceptionObject & err )
	{
		std::cerr << "ERROR: ExceptionObject caught !s" << std::endl; 
		std::cerr << err << std::endl; 
		return ;
	}



--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/How-to-read-3D-dicom-stored-in-a-single-dicom-file-tp7583352.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list