1 #ifndef DICOMIOMANAGER_H 2 #define DICOMIOMANAGER_H 4 #include "itkGDCMImageIO.h" 5 #include "itkGDCMSeriesFileNames.h" 15 inline bool IsDicom(
const std::string fileNameToCheck)
18 reader.SetFileName(fileNameToCheck.c_str());
19 return reader.CanRead();
28 typedef itk::GDCMSeriesFileNames NamesGeneratorType;
29 typedef itk::GDCMImageIO ImageIOType;
30 typedef std::vector<std::string> FileNamesContainer;
45 static bool IsDicom(std::string path);
48 static bool CanReadFile(std::string path, itk::ImageIOBase::Pointer &imageIO);
55 template <
class TInputImage>
60 typename T::Pointer m_image3d;
63 #include "DicomIOManager.hxx" 64 #endif // DICOMIOMANAGER_H static bool IsDicom(std::string path)
check if file is dicom
Definition: DicomIOManager.hxx:284
void SetDirectoryPath(std::string path)
set the input directory containing dicom series
Definition: DicomIOManager.hxx:18
static bool CanReadFile(std::string path, itk::ImageIOBase::Pointer &imageIO)
check if file can be read or not and return the base imageIO if readable
Definition: DicomIOManager.hxx:290
Definition: DicomIOManager.h:24
T::Pointer GetITKImage()
get the read dicom data as 3D float ITK image
Definition: DicomIOManager.hxx:308
bool LoadDicom()
load dicom data
Definition: DicomIOManager.hxx:23
T::Pointer ConvertImage3DToFloatImage3D(typename TInputImage::Pointer image)
helper to write itk image
Definition: DicomIOManager.hxx:298