Logo Search packages:      
Sourcecode: gdcm version File versions  Download package

bool gdcm::Tag::ReadFromCommaSeparatedString ( const char *  str  ) 

Read from a comma separated string. This is a highly user oriented function, the string should be formated as: 1234,5678 to specify the tag (0x1234,0x5678) The notation comes from the DICOM standard, and is handy to use from a command line program

Definition at line 22 of file gdcmTag.cxx.

References SetElement(), and SetGroup().

Referenced by gdcm::TagPath::ConstructFromString().

    {
    unsigned int group = 0, element = 0;
    if( sscanf(str, "%04x,%04x", &group , &element) != 2 )
      {
      gdcmDebugMacro( "Problem reading the Tag: " << str );
      return false;
      }
    SetGroup( group );
    SetElement( element );
    return true;
    }


Generated by  Doxygen 1.6.0   Back to index