[Insight-users] how to read and browse Cardiac Dicom Image (Time series Image)?

charfeddine amir charfeddine_amir at yahoo.fr
Wed Jan 25 11:19:17 EST 2006


 Hi all
 
 i've write an application  that read  Cardiac Image Dicom files (Time series image), but i can only visualize the first image in the file.
 Each series (study) contains 8 Dicom file, each Dicom file contains multi 2D  Cardiac Image (between 1 to  40 image stored in the same Dicom file).
 I read the Dicom file with the  itk::GDCMImageIO, and visualize it in VTK, but i visualize only the first image, i didn't know how to do to browse within all the 2D image.
 this is a fragment of the code:
 
       
  // read the Dicom Directory (contains many Dicom files)
  char* chooserName = fl_dir_chooser("select a dicom directory", 0, 0);

  // Store the filename
  strcpy( m_InputImageDirectoryname, chooserName );
  reader = ReaderType::New();
  dicomIO = ImageIOType::New();
  dicomIO->SetMaxSizeLoadEntry(0xffff);
  nameGenerator = NamesGeneratorType::New();
  reader->SetImageIO( dicomIO );
  nameGenerator->SetUseSeriesDetails( true );
  nameGenerator->SetDirectory( m_InputImageDirectoryname );

  seriesUID = nameGenerator->GetSeriesUIDs();
  //we take the first series we find in the directory
  seriesIdentifier = seriesUID.begin()->c_str();
     
  fileNames = nameGenerator->GetFileNames( seriesIdentifier );
  
  //we will count the number of Dicom file that belongs to that serie
  FileNamesBegin = fileNames.begin();
  FileNamesItr = fileNames.end();
  FileNamesEnd = fileNames.end();
    
    ListCardinal=0;
    ListPosition=1;
    while( FileNamesItr != FileNamesBegin )
    {
     ListCardinal++;
     FileNamesItr--;
    }
  rescaler = RescaleFilterType::New();
  rescaler->SetOutputMinimum(   0 );
  rescaler->SetOutputMaximum( 255 );
  reader->SetFileName( FileNamesItr->c_str() );

  try
      {
    rescaler->SetInput( reader->GetOutput() );
    reader->Update();
    m_InputImage = reader->GetOutput();
    m_InputImage->SetRequestedRegionToLargestPossibleRegion();
    
  // Create the ITK pipeline (NB: pipeline not yet executed)
    this->CreateITKPipeline();

  // Create the input image VTK pipeline
    this->CreateInputImageWindow();


 
 any comment will be welcome 
 thx
 Amir
 

		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060125/aa89ab80/attachment.htm


More information about the Insight-users mailing list