#include <iostream>
#include <stdlib.h>
int main ( int argc, char* argv[] ) {
if ( argc < 3 ) {
std::cerr << "Usage: " << argv[0] << " <input_directory> <output_file>\n";
return 1;
}
std::cout << "Reading Dicom directory: " << argv[1] << std::endl;
std::vector<unsigned int> size = image.
GetSize();
std::cout << "Image size: " << size[0] << " " << size[1] << " " << size[2] << std::endl;
std::cout << "Writing " << argv[2] << std::endl;
return 0;
}
static std::vector< std::string > GetGDCMSeriesFileNames(const std::string &directory, const std::string &seriesID="", bool useSeriesDetails=false, bool recursive=false, bool loadSequences=false)
Generate a sequence of filenames from a directory with a DICOM data set and a series ID.
SITKIO_EXPORT void WriteImage(const Image &image, const std::string &fileName, bool useCompression=false, int compressionLevel=-1)
WriteImage is a procedural interface to the ImageFileWriter. class which is convenient for many image...