77 typedef itk::GDCMSeriesFileNames NamesGeneratorType;
78 NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();
79 nameGenerator->SetUseSeriesDetails(
true );
80 nameGenerator->SetDirectory( path );
82 typedef itk::GDCMSeriesFileNames::SeriesUIDContainerType SeriesIdContainer;
83 const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs();
85 if (! seriesUID.empty() )
87 return nameGenerator->GetFileNames( *(seriesUID.begin()) );
89 return std::vector<std::string>();
118 const std::string path = testPath +
"samples/dicomSample";
124 typename Image3D::ITKImagePointer dgtal_itk = image.getITKImagePointer();
126 typedef itk::Image<PixelType, 3> ItkImage;
127 typedef itk::ImageSeriesReader<ItkImage> ItkReader;
128 typename ItkReader::Pointer reader = ItkReader::New();
129 reader->SetFileNames( fileNames );
133 typename ItkImage::Pointer itk = reader->GetOutput();
135 const bool ok1 = ( dgtal_itk->GetSpacing() == itk->GetSpacing() );
136 const bool ok2 = ( dgtal_itk->GetOrigin() == itk->GetOrigin() );
137 const bool ok3 = ( dgtal_itk->GetDirection() == itk->GetDirection() );
138 return ok1 && ok2 && ok3;