From: Neerav P. <nee...@ho...> - 2008-06-23 22:00:43
|
Hi, I am trying to access the fields in a dicom sequence at the following location 0x300A, 0x0210 is the sequence. I have written the following, but it throws an error when calling sqsis->GetItem(i), throws a gdcm::Exception at memory location 0x0012e514. I am doing something incorrect here, any ideas? const gdcm::DataSet &ds = reader.GetFile().GetDataSet(); gdcm::Tag t1( 0x300A, 0x0210 ); float temp; if( ds.FindDataElement( t1 ) ) { const gdcm::DataElement &elem = ds.GetDataElement( t1 ); const gdcm::SequenceOfItems * sqsis = elem.GetSequenceOfItems(); for ( int i=0; i < sqsis->GetNumberOfItems(); i++ ) { const gdcm::Item &item = sqsis->GetItem(i); gdcm::Tag t2( 0x300A, 0x0228 ); gdcm::Attribute<0x300A, 0x0228> atr; atr.SetFromDataElement( item.GetDataElement( t2 ) ); temp = atr.GetValue(); } Thanks in advance Neerav _________________________________________________________________ Find hidden words, unscramble celebrity names, or try the ultimate crossword puzzle with Live Search Games. Play now! http://g.msn.ca/ca55/212 |