<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi once again,<br>
<br>
now that I solved the CT dicom value ranges problem (thanks to<br>
Mathieu and Wilfred), I already have a new problem.<br>
<br>
After I have resampled an Image (more slices) which comes from a serie
of<br>
dicom files, I want to write it back to a dicom serie.<br>
<br>
Therefore, I need to append some new MetaDataDictionary entries to the
MetaDataDictionaryArray<br>
(via std::Vector::push_back()).<br>
<br>
Unfortunately, I have some problems to do this. <br>
Also I think, it is perhaps a simple task, but there is a typecasting
problem which I couldn't solve<br>
up to this point.<br>
<br>
My code is as follows (just a few lines):<br>
<big><br>
typedef itk::MetaDataDictionary DictionaryType;<br>
const std::vector<DictionaryType*>* dictArray<br>
<br>
for(int i=0;i<nameGenerator->GetFileNames().size();i++){<br>
<br>
//Check if there are enough MetaDataDictionaries in the
MetaDataDictionaryArray.<br>
//This may not be the case, if the image from the original
Dicom serie has been resampled e.g.<br>
<br>
if(i>=dictArray->size()){<br>
const DictionaryType* dict = dictArray->at(i-1);<br>
DictionaryType nDict = DictionaryType(*dict); //copy
constructor<br>
<br>
//now, how to append the new value???<br>
dictArray->push_back(reinterpret_cast<DictionaryType&>(nDict));
//doesn't work <br>
}<br>
.....<br>
<br>
I hope, somebody may help me here too, I think it should be not to
difficult.<br>
<br>
<br>
Regards,<br>
Markus<br>
</big>
</body>
</html>