[Insight-users] PAR/REC to DICOM
Pelt, R.F.P. van
R.F.P.v.Pelt at tue.nl
Sat Mar 14 11:13:49 EDT 2009
Dear all,
I'm trying to convert a set of Philips PAR/REC files to a dicom.
However, I get this error message from itk::PhilipsRECImageIO
Description: PhilipsRECImageIOSetupSliceIndex:
imageTypesScanSequenceIndex.size() != parParam.num_slice_repetitions
Does anyone know what the problem is here? How can I resolve this?
Thanks in advance.
Regards,
Roy
typedef unsigned short InputPixelType;
typedef unsigned short OutputPixelType;
const unsigned int Dimension = 3;
typedef itk::Image< InputPixelType, Dimension > InputImage;
typedef itk::Image< OutputPixelType, Dimension > OutputImage;
typedef itk::ImageFileReader< InputImage > Reader;
typedef itk::ImageFileWriter< OutputImage > Writer;
itk::PhilipsRECImageIOFactory::RegisterOneFactory();
itk::PhilipsRECImageIO::Pointer parRecIO =
itk::PhilipsRECImageIO::New();
Reader::Pointer reader = Reader::New();
Writer::Pointer writer = Writer::New();
reader->SetFileName( inputFilename );
reader->SetImageIO(parRecIO);
writer->SetFileName( outputFilename );
writer->SetInput(reader->GetOutput());
writer->Update();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090314/ce1f1b8a/attachment.htm>
More information about the Insight-users
mailing list