[Insight-users] How to separate real CT volume from scout
    Li, Wen 
    WLi at childrensnational.org
       
    Mon Dec 17 16:01:25 EST 2012
    
    
  
Hi itk users,
I use itk ImageSeriesReader to read dicom images, the set up is pretty simple.
But I find out that the reader only takes in the scout image of CT, not the real volume.
And it shows only 1 file in the dicom directory.
Below is my code. Can anyone help me to set up the reader to read in the real volume?
I am sure the directory has both the scout and volume images.
  //read the input series
  ImageIOType::Pointer gdcmIO = ImageIOType::New();
  InputNamesGeneratorType::Pointer inputNames = InputNamesGeneratorType::New();
  inputNames->SetInputDirectory(argv[1]);
  const ReaderType::FileNamesContainer & filenames = 
       inputNames->GetInputFileNames();
  //print out file names
  unsigned int numberOfFilenames =  filenames.size();
  std::cout<<"there are "<<numberOfFilenames<<" files in the dir."<<std::endl;
  ReaderType::Pointer reader = ReaderType::New();
  reader->SetImageIO(gdcmIO);
  reader->SetFileNames(filenames);
  reader->Update();
Thank you in advance.
Wen
Postdoctoral Fellow
Bioengineering, Sheikh Zayed Institute
Children's National Medical Center
111 Michigan Ave. NW
Washington DC, 20010
Email: wli at cnmc.org
Phone: 202-476-1268
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121217/5a681dc2/attachment.htm>
    
    
More information about the Insight-users
mailing list