<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font face="Times New Roman,sans-serif" color="#000000"><div>I tried to write the following code :</div><div><br></div><div><br></div><div>/////////////////// Begin Dicom Writer</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ReaderType::Pointer reader = ReaderType::New();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>ImageIOType::Pointer gdcmIO = ImageIOType::New();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>NamesGeneratorType::Pointer namesGenerator = NamesGeneratorType::New();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>itksys::SystemTools::MakeDirectory( "slic" );</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>SeriesWriterType::Pointer seriesWriter = SeriesWriterType::New();</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>seriesWriter->SetInput( reader->GetOutput() );</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>seriesWriter->SetImageIO( gdcmIO );</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>namesGenerator->SetOutputDirectory("slic");</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>seriesWriter->SetFileNames( namesGenerator->GetOutputFileNames());</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>seriesWriter->SetMetaDataDictionaryArray( reader->GetMetaDataDictionaryArray() );</div><div><br></div><div> ////////////////// End Dicom Writer</div></font><div><br></div>Some errors appear :<div><br></div><div>c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxx(184): error C2248: 'itk::Image<TPixel,VImageDimension>::~Image' : cannot access protected member declared in class 'itk::Image<TPixel,VImageDimension>'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> C:/ITK 4.8.1/Source/Modules/Core/Common/include\itkImage.h(279) : see declaration of 'itk::Image<TPixel,VImageDimension>::~Image'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2>c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxx(188): error C2248: 'itk::Image<TPixel,VImageDimension>::Image' : cannot access protected member declared in class 'itk::Image<TPixel,VImageDimension>'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> C:/ITK 4.8.1/Source/Modules/Core/Common/include\itkImage.h(276) : see declaration of 'itk::Image<TPixel,VImageDimension>::Image'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2>c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxx(188): error C2248: 'itk::Image<TPixel,VImageDimension>::~Image' : cannot access protected member declared in class 'itk::Image<TPixel,VImageDimension>'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> C:/ITK 4.8.1/Source/Modules/Core/Common/include\itkImage.h(279) : see declaration of 'itk::Image<TPixel,VImageDimension>::~Image'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2>c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxx(213): error C2248: 'itk::Image<TPixel,VImageDimension>::~Image' : cannot access protected member declared in class 'itk::Image<TPixel,VImageDimension>'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> C:/ITK 4.8.1/Source/Modules/Core/Common/include\itkImage.h(294) : compiler has generated 'itk::Image<TPixel,VImageDimension>::~Image' here</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> c:\itk 4.8.1\source\modules\core\common\include\itkImportImageContainer.hxx(209) : while compiling class template member function 'void itk::ImportImageContainer<TElementIdentifier,TElement>::DeallocateManagedMemory(void)'</div><div>2> with</div><div>2> [</div><div>2> TElementIdentifier=unsigned long,</div><div>2> TElement=itk::Image<InputPixelType,2></div><div>2> ]</div><div>2>c:\itk 4.8.1\source\modules\core\common\include\itkImage.hxx(151): error C2248: 'itk::Image<TPixel,VImageDimension>::Image' : cannot access protected member declared in class 'itk::Image<TPixel,VImageDimension>'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> C:/ITK 4.8.1/Source/Modules/Core/Common/include\itkImage.h(276) : see declaration of 'itk::Image<TPixel,VImageDimension>::Image'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> c:\itk 4.8.1\source\modules\core\common\include\itkImage.hxx(148) : while compiling class template member function 'unsigned int itk::Image<TPixel,VImageDimension>::GetNumberOfComponentsPerPixel(void) const'</div><div>2> with</div><div>2> [</div><div>2> TPixel=OutputImageType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2>c:\itk 4.8.1\source\modules\core\common\include\itkImage.hxx(151): error C2248: 'itk::Image<TPixel,VImageDimension>::~Image' : cannot access protected member declared in class 'itk::Image<TPixel,VImageDimension>'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ]</div><div>2> C:/ITK 4.8.1/Source/Modules/Core/Common/include\itkImage.h(279) : see declaration of 'itk::Image<TPixel,VImageDimension>::~Image'</div><div>2> with</div><div>2> [</div><div>2> TPixel=InputPixelType,</div><div>2> VImageDimension=2</div><div>2> ] <br><br><font size="3" face="Garamond">Abdelkhalek Bakkari</font><div><span style="line-height:14px;"><font size="3" face="Garamond">Ph.D candidate in Computer Science</font></span></div><div><span style="line-height:20.82666778564453px;background-color:rgb(255, 255, 255);"><font face="Garamond" size="3">Institute of Applied Computer Science</font></span></div><div><span style="line-height:18.399999618530273px;"><font face="Garamond" size="3">Lodz University of Technology, Poland</font></span></div><div><span style="line-height:18.399999618530273px;"><font face="Garamond" size="3"><br></font></span></div><div><br></div><br><br><div><hr id="stopSpelling">From: kiran.j88@gmail.com<br>Date: Wed, 16 Mar 2016 10:27:51 +0000<br>Subject: Re: [ITK-users] Saving results .dcm files<br>To: bakkari.abdelkhalek@hotmail.fr; insight-users@itk.org<br><br><div dir="ltr">Hi Abdelkhalek,<div><br></div><div>Examples can be found in Chapter 1 of Book 2 of the ITK Software guide:</div><div><a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>See page 340 of the pdf.</div><div><br></div><div>You can find the full source code for the examples on the ITK Doxygen pages, e.g.:</div><div><a href="http://www.itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadSeriesWrite_8cxx-example.html" target="_blank">http://www.itk.org/Doxygen/html/Examples_2IO_2DicomSeriesReadSeriesWrite_8cxx-example.html</a></div><div><br></div><div>And there are more examples on the ITK wiki, e.g.:<br><a href="http://itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM" target="_blank">http://itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM</a></div><div><br></div><div>Regards,</div><div>Kiran<br><br></div><br><div class="ecxgmail_quote"><div dir="ltr">On Wed, 16 Mar 2016 at 10:19 Abdelkhalek Bakkari <<a href="mailto:bakkari.abdelkhalek@hotmail.fr" target="_blank">bakkari.abdelkhalek@hotmail.fr</a>> wrote:<br></div><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr"><font face="Times New Roman,sans-serif" size="1" style="font-size:8pt;" color="#000000"><br></font>Hi !<div><br></div><div>I am looking for saving the results of ITK as .dcm files for a 3D image.</div><div>Any help ! Any suggestion ! please.</div><div><br></div><div>Best regards,</div><div><br><font size="3" face="Garamond">Abdelkhalek Bakkari</font><div><span style="line-height:14px;"><font size="3" face="Garamond">Ph.D candidate in Computer Science</font></span></div><div><span style="line-height:20.82666778564453px;background-color:rgb(255,255,255);"><font face="Garamond" size="3">Institute of Applied Computer Science</font></span></div><div><span style="line-height:18.399999618530273px;"><font face="Garamond" size="3">Lodz University of Technology, Poland</font></span></div><div><span style="line-height:18.399999618530273px;"><font face="Garamond" size="3"><br></font></span></div><div><br></div></div> </div></div>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
</blockquote></div></div></div></div> </div></body>
</html>