[Insight-users] Incorrect frame increment pointer

Madiha Shahab madiha.shahab at technologyorbit.com
Mon Jun 8 12:49:04 EDT 2009


Hi All,this is urgent please reply to it as soon as possible.
Extracting the header info, Im getting the Frame Increment counter as such:


(0028|0009) Frame Increment Pointer = GABjEA==


The pdf described that the values of Frame Increment Pointer shall have the
enumerated values of the Frame vector tags for eg., for: 00181063 (Frame
Time) or 00181065 (Frame Time Vector), etc.


What I got from the info in the pdf regarding this is that the Frame
Increment Pointer points to the tags that should be referred to for the
Frame time of multi frame images. I tried different ways to access this
value first via using a string* to store the address of the location coming
in the "value" of this tag but its not working like that, since
GetValueFromTag takes the value paramater as a reference so its not taking a
pointer there. Then i tried iterating in while reading the header info via
itk::MetaDataObjectBase::Pointer or via MetaDataObject (see the code given
below), but i got no where with results. Either it produces a pointer that
doesnt exist for that tag or its treating the tag value as a string. I need
help on how to treat it as a MetaDataObject to access its contents like they
are being accessed normally through the dictionary iterators?


DictionaryType::ConstIterator itr = dictionary.Begin();
DictionaryType::ConstIterator end = dictionary.End();

while( itr != end )
{

if(tagkey == "0028|0009" )
{
itk::MetaDataObjectBase::Pointer  entryIn = itr->second;

typedef itk::MetaDataObject< itk::MetaDataObjectBase > MetaDataObjectType;
MetaDataObjectType::Pointer entryvalueIn = dynamic_cast<MetaDataObjectType
*>( entryIn.GetPointer() ) ;

if(!entryvalueIn)
{
    cout<<endl<<endl<<"entryvalueIn FALSE"<<endl;
}

MetaDataStringType::Pointer stringIn = dynamic_cast<MetaDataStringType
*>(entryvalueIn.GetPointer());

if(stringIn)
{
    //doesn't go in here either
    cout<<endl<<endl<<"Tagvalue:
"<<stringIn->GetMetaDataObjectValue()<<endl<<endl;
}


}//if tagkey == "0028|0009" end

itr++;

}//while end

-- 
MADIHA SHAHAB
Software Engineer.
Technology Orbit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090608/908f4071/attachment.htm>


More information about the Insight-users mailing list