<!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&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; DictionaryType;<br>
const std::vector&lt;DictionaryType*&gt;* &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dictArray<br>
<br>
for(int i=0;i&lt;nameGenerator-&gt;GetFileNames().size();i++){<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //Check if there are enough MetaDataDictionaries in the
MetaDataDictionaryArray.<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //This may not be the case, if the image from the original
Dicom serie has been resampled e.g.<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(i&gt;=dictArray-&gt;size()){<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const DictionaryType* dict = dictArray-&gt;at(i-1);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DictionaryType nDict = DictionaryType(*dict);&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //copy
constructor<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; //now, how to append the new value???<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
dictArray-&gt;push_back(reinterpret_cast&lt;DictionaryType&amp;&gt;(nDict));
&nbsp;&nbsp;&nbsp; //doesn't work <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; .....<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>