<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML con formato previo Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLconformatoprevioCar
        {mso-style-name:"HTML con formato previo Car";
        mso-style-priority:99;
        mso-style-link:"HTML con formato previo";
        font-family:"Courier New";
        mso-fareast-language:ES;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ES link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>Hi to all ITK users!,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>I want to read a Series of DICOM image to convert them into a 3D image.<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;border-style:initial;border-color:initial;background-image:initial;background-attachment:initial;background-origin: initial;background-clip: initial;word-wrap: break-word;orphans: 2;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span lang=EN-US style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>I follow the example in the documentation: " Examples/IO/DicomSeriesReadImageWrite2.cxx" .<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;border-style:initial;border-color:initial;background-image:initial;background-attachment:initial;background-origin: initial;background-clip: initial;word-wrap: break-word;orphans: 2;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span lang=EN-US style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>I get the following error in debug mode while execution:<o:p></o:p></span></p><p class=MsoNormal style='line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.5pt;font-family:"Consolas","serif";color:red;border:none windowtext 1.0pt;padding:0cm;background:#EEEEEE;mso-fareast-language:ES'>" Debug Assertion Failed ! . Vector Iterator not derefencable"</span><span lang=EN-US style='font-size:10.5pt;font-family:"Consolas","serif";color:red;mso-fareast-language:ES'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>The code is the below ( I also send the files attached to the e-mail for easy checking), first the header:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:blue'>#ifndef</span><span style='font-size:10.0pt;font-family:"Courier New"'> Reg_mono3D_H<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:blue'>#define</span><span style='font-size:10.0pt;font-family:"Courier New"'> Reg_mono3D_H<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:green'>// Antonio Gómez Barquero ( GTTS-UPCT)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>// @: agb1@alu.upct.es<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>// 25/11/2011<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>// reg mono 3D header<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><iostream><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><stdio.h><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><stdlib.h><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"math.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"itkImage.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"fftw3.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>// for reading DICOM IMAGES<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"itkGDCMImageIO.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"itkGDCMSeriesFileNames.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"itkImageSeriesReader.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"itkImageFileWriter.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>using</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>namespace</span> std;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>class</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> Reg_mono_3D<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>{<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>// Variables<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>public</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>typedef</span> <span style='color:blue'>double</span> PixelType;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>typedef</span> itk::Image< PixelType, 3 > ImageType; <span style='color:green'>// 3D image<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:green'>// Instancia el tipo del lector de series<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>typedef</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> itk::ImageSeriesReader< ImageType > ReaderType;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:blue'>typedef</span><span style='font-size:10.0pt;font-family:"Courier New"'> itk::GDCMImageIO ImageIOType; <span style='color:green'>// para el funcionamiento interno del formato DICOM<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>typedef</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> itk::GDCMSeriesFileNames NamesGeneratorType; <span style='color:green'>//for using additional DICOM information to distinguish unique volumes<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>//within the directory<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>typedef</span> std::vector< std::string > SeriesIdContainer; <span style='color:green'>// para los ID-SERIES de las imagenes DICOM<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> </span><span style='font-size:10.0pt;font-family:"Courier New";color:blue'>typedef</span><span style='font-size:10.0pt;font-family:"Courier New"'> std::vector< std::string > FileNamesContainer; <span style='color:green'>// para los nombres de los archivos asociados a las series de imagenes<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> Reg_mono_3D::Reg_mono_3D(); <span style='color:green'>// Constructor<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> ~Reg_mono_3D(<span style='color:blue'>void</span>); <span style='color:green'>// Destructor<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>void</span> ejecuta_programa();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>};<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#endif</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>//<o:p></o:p></span></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>And the 'cpp' file :<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"Reg_mono_3D.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><iostream><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><limits><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><stdio.h><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><stdlib.h><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'><string.h><o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"fftw3.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#include</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#A31515'>"math.h"<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:#A31515'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:green'>// Antonio Gómez Barquero ( GTTS-UPCT)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>// @: agb1@alu.upct.es<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>// 25/11/2011<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'>// reg mono 3D <o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:green'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>using</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>namespace</span> std;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>#define</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> PI 3.14159265<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>Reg_mono_3D::Reg_mono_3D()<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>{<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>Reg_mono_3D::~Reg_mono_3D(<span style='color:blue'>void</span>)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>{<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:blue'>int</span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> main()<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>{<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> cout<<<span style='color:#A31515'>" REGISTRO MONOMODAL EN 3D [GTTS-UPCT]"</span><<endl;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> </span><span style='font-size:10.0pt;font-family:"Courier New"'>Reg_mono_3D reg;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> reg.ejecuta_programa();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:blue'>void</span><span style='font-size:10.0pt;font-family:"Courier New"'> Reg_mono_3D::ejecuta_programa(){<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>// Reading a 2D DICOM Series and Writing a Volume -- HACER UN MÉTODO CUANDO FUNCIONE<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'> </span><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>ReaderType::Pointer reader = ReaderType::New();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> ImageIOType::Pointer dicomIO = ImageIOType::New(); <span style='color:green'>//This object is the one that is aware of the internal intricacies of the DICOM format.<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> reader->SetImageIO( dicomIO );<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-indent:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>nameGenerator->SetUseSeriesDetails( true ); <o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> nameGenerator->SetDirectory( <span style='color:#A31515'>"C:\\Documents and Settings\\GTTS\\Mis documentos\\Visual Studio 2008\\Projects\\Reg_mono3D\\Reg_mono3D\\DICOM_SERIES\\T\\"</span>);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>//The GDCMSeriesFileNames object first identifies the list of DICOM series that are present in<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>//the given directory. We receive that list in a reference to a container of strings<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>const</span> SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> SeriesIdContainer::const_iterator seriesItr = seriesUID.begin();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> SeriesIdContainer::const_iterator seriesEnd = seriesUID.end();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>while</span>( seriesItr != seriesEnd )<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> {<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> std::cout << seriesItr->c_str() << std::endl;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> seriesItr++;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> }<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> std::string seriesIdentifier;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> seriesIdentifier = seriesUID.begin()->c_str();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>//We pass the series identifier to the name generator and ask for all the filenames associated to<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:green'>//that series. This list is returned in a container of strings by the GetFileNames() method<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> FileNamesContainer fileNames;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> fileNames = nameGenerator->GetFileNames( seriesIdentifier );<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> reader->SetFileNames( fileNames );<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>try<o:p></o:p></span></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> {<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> reader->Update();<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> }<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:blue'>catch</span> (itk::ExceptionObject &ex)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> {<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> cout << ex << std::endl;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> }<o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:35.4pt;text-autospace:none'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New"'>} <span style='color:green'>//fin ejecuta programa<o:p></o:p></span></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>Thanks for the help!!!<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;line-height:13.5pt;background:white;vertical-align:baseline;border-style:initial;border-color:initial;background-image:initial;background-attachment:initial;background-origin: initial;background-clip: initial;word-wrap: break-word;orphans: 2;widows: 2;-webkit-text-size-adjust: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Arial","sans-serif";color:black'>Antonio Gómez Barquero</span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p><p class=MsoNormal><span lang=ES-TRAD style='font-size:8.0pt;mso-fareast-language:ES'>Ingeniero de Telecomunicaciones -Becario Investigador asociado a Actividades de I+D+I <o:p></o:p></span></p><p class=MsoNormal><span lang=ES-TRAD style='font-size:8.0pt;mso-fareast-language:ES'>GTTS ( Grupo de Tratamiento y Teoría de la Señal)[ </span><span style='font-size:8.0pt;mso-fareast-language:ES'><a href="http://gtts.upct.es/"><span style='color:blue'>http://gtts.upct.es/</span></a></span><span lang=ES-TRAD style='font-size:8.0pt;mso-fareast-language:ES'>]<o:p></o:p></span></p><p class=MsoNormal><span lang=ES-TRAD style='font-size:8.0pt;mso-fareast-language:ES'>UPCT (Universidad Politécnica de Cartagena)[ </span><span style='font-size:8.0pt;mso-fareast-language:ES'><a href="http://www.upct.es/"><span style='color:blue'>http://www.upct.es/</span></a>]</span><span lang=ES-TRAD style='font-size:8.0pt;mso-fareast-language:ES'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>