<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I am trying to do something seemingly simple : read in a 3D DICOM volume acquired in coronal orientation, reslice in the sagittal plane, and write the resulting resliced data, with updated DICOM headers out, but am running into problems... There are two problems using the code pasted below : 1) I get something that looks like sagitally reformatted data if I write the whole data set as a single 3D DICOM object, but the metadata is not preserved and the slice locations look screwy, 2) If I try to output a set of 2D images (uncommenting the appropriate lines below), I get a strange error : <div><br></div><div><div>exception in ImageSeriesWriter </div><div><br></div><div>itk::ExceptionObject (0xeaf480)</div><div>Location: "void itk::ImageSeriesWriter<TInputImage, TOutputImage>::GenerateData() [with TInputImage = main(int, char* const*)::OutputType, TOutputImage = main(int, char* const*)::OutputType]" </div><div>File: /usr/local/include/itk/IO/itkImageSeriesWriter.txx</div><div>Line: 315</div><div>Description: itk::ERROR: ImageSeriesWriter(0xea7010): The number of filenames passed is 256 but 1 were expected </div><div><br></div><div>Does anyone have a simple functioning driver program that does this sort of reslicing/output of DICOM data or any suggestions on where I'm going wrong?</div><div><br></div><div>Thanks,</div><div><br></div><div>Matthias</div><div><br><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"> </span>// set up ITK DICOM image series reader</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">typedef</span> <span style="color: #5c2699">itk</span>::<span style="color: #5c2699">OrientedImage</span><<span style="color: #aa0d91">short</span>,<span style="color: #1c00cf">3</span>><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #5c2699">InputType</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">typedef</span> <span style="color: #5c2699">itk</span>::<span style="color: #5c2699">OrientedImage</span><<span style="color: #aa0d91">short</span>,<span style="color: #1c00cf">3</span>><span class="Apple-tab-span" style="white-space:pre">        </span><span style="color: #5c2699">OutputType</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(92, 38, 153); "><span style="color: #000000"> </span>itk<span style="color: #000000">::</span>ImageSeriesReader<span style="color: #000000"><</span>InputType<span style="color: #000000">>::</span>Pointer<span style="color: #000000"> reader = </span>itk<span style="color: #000000">::</span>ImageSeriesReader<span style="color: #000000"><</span>InputType<span style="color: #000000">>::</span><span style="color: #2e0d6e">New</span><span style="color: #000000">();</span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cout</span> << <span style="color: #c41a16">"Loading files for time point "</span> << frameIndex << <span style="color: #c41a16">" : "</span> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> << currentFrameFilenameList.<span style="color: #2e0d6e">front</span>() << <span style="color: #c41a16">" - "</span> << currentFrameFilenameList.<span style="color: #2e0d6e">back</span>()</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> << <span style="color: #c41a16">"..."</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> reader-><span style="color: #2e0d6e">SetFileNames</span>(currentFrameFilenameList);</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> </p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">try</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> reader-><span style="color: #2e0d6e">Update</span>();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> }</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">catch</span> (<span style="color: #5c2699">itk</span>::<span style="color: #5c2699">ExceptionObject</span>& <span style="color: #5c2699">e</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cerr</span> << <span style="color: #c41a16">"exception in ImageSeriesReader "</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cerr</span> << <span style="color: #5c2699">e</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #007400">//throw;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">return</span> -<span style="color: #1c00cf">1</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> }</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cout</span> << <span style="color: #c41a16">"Read size : "</span> << reader-><span style="color: #2e0d6e">GetOutput</span>()-><span style="color: #2e0d6e">GetLargestPossibleRegion</span>().<span style="color: #2e0d6e">GetSize</span>() << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #007400">// get DICOM metadata</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">const</span> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">vector</span><<span style="color: #5c2699">itk</span>::<span style="color: #5c2699">MetaDataDictionary</span>*>&<span class="Apple-tab-span" style="white-space:pre">        </span>current_dict_array = *(reader-><span style="color: #2e0d6e">GetMetaDataDictionaryArray</span>());</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">const</span> <span style="color: #5c2699">itk</span>::<span style="color: #5c2699">MetaDataDictionary</span>& dict = *(current_dict_array.<span style="color: #2e0d6e">back</span>());</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cout</span> << <span style="color: #c41a16">"loaded "</span> << currentFrameFilenameList.<span style="color: #2e0d6e">size</span>() << <span style="color: #c41a16">" files in "</span> << bench.<span style="color: #26474b">seconds</span>() << <span style="color: #c41a16">" seconds"</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #007400">// reslice data</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(92, 38, 153); "><span style="color: #000000"> </span>itk<span style="color: #000000">::</span>OrientImageFilter<span style="color: #000000"><</span>InputType<span style="color: #000000">,</span>OutputType<span style="color: #000000">>::</span>Pointer<span style="color: #000000"> orienter = </span>itk<span style="color: #000000">::</span>OrientImageFilter<span style="color: #000000"><</span>InputType<span style="color: #000000">,</span>OutputType<span style="color: #000000">>::</span><span style="color: #2e0d6e">New</span><span style="color: #000000">();</span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> orienter-><span style="color: #2e0d6e">UseImageDirectionOn</span>();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(46, 13, 110); "><span style="color: #000000"> orienter-></span>SetDesiredCoordinateOrientation<span style="color: #000000">(</span><span style="color: #5c2699">itk</span><span style="color: #000000">::SpatialOrientation::</span>ITK_COORDINATE_ORIENTATION_PSL<span style="color: #000000">); </span><span style="color: #007400">// sagittal orientation</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> orienter-><span style="color: #2e0d6e">SetInput</span>(reader-><span style="color: #2e0d6e">GetOutput</span>());</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">try</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> orienter-><span style="color: #2e0d6e">Update</span>();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> }</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">catch</span> (<span style="color: #5c2699">itk</span>::<span style="color: #5c2699">ExceptionObject</span>& <span style="color: #5c2699">e</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cerr</span> << <span style="color: #c41a16">"exception in OrientImageFilter "</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cerr</span> << <span style="color: #5c2699">e</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #007400">//throw;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">return</span> -<span style="color: #1c00cf">1</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> }</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cout</span> << <span style="color: #c41a16">"Oriented size : "</span> << orienter-><span style="color: #2e0d6e">GetOutput</span>()-><span style="color: #2e0d6e">GetLargestPossibleRegion</span>().<span style="color: #2e0d6e">GetSize</span>() << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">typedef</span> <span style="color: #5c2699">itk</span>::<span style="color: #5c2699">OrientedImage</span><<span style="color: #aa0d91">short</span>,<span style="color: #1c00cf">2</span>> OutputType2D;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// itk::ImageSeriesWriter<OutputType,OutputType2D>::Pointer writer = itk::ImageSeriesWriter<OutputType,OutputType2D>::New();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(92, 38, 153); "><span style="color: #000000"> </span>itk<span style="color: #000000">::</span>ImageSeriesWriter<span style="color: #000000"><</span>OutputType<span style="color: #000000">,</span>OutputType<span style="color: #000000">>::</span>Pointer<span style="color: #000000"> writer = </span>itk<span style="color: #000000">::</span>ImageSeriesWriter<span style="color: #000000"><</span>OutputType<span style="color: #000000">,</span>OutputType<span style="color: #000000">>::</span><span style="color: #2e0d6e">New</span><span style="color: #000000">();</span></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> writer-><span style="color: #2e0d6e">SetInput</span>(orienter-><span style="color: #2e0d6e">GetOutput</span>());</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">typedef</span> <span style="color: #5c2699">itk</span>::<span style="color: #5c2699">GDCMImageIO</span> ImageIOType;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> ImageIOType::<span style="color: #5c2699">Pointer</span> gdcmImageIO = ImageIOType::<span style="color: #2e0d6e">New</span>();</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> gdcmImageIO-><span style="color: #2e0d6e">KeepOriginalUIDOn</span>();</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> writer-><span style="color: #2e0d6e">SetImageIO</span>(gdcmImageIO);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> writer-><span style="color: #2e0d6e">SetMetaDataDictionary</span>(dict);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// writer->SetMetaDataDictionaryArray(current_dict_array);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"> </span>// generate output filenames</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">vector</span><<span style="color: #5c2699">std</span>::<span style="color: #5c2699">string</span>><span class="Apple-tab-span" style="white-space:pre">        </span>outputFilenames;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(196, 26, 22); "><span style="color: #000000"> outputFilenames.</span><span style="color: #2e0d6e">push_back</span><span style="color: #000000">(</span>"/Users/matthiasschabel/Temporary/IMTEST.dcm"<span style="color: #000000">);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// const OutputType::SizeType sz = orienter->GetOutput()->GetLargestPossibleRegion().GetSize();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">//</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// for (int sliceIndex=0;sliceIndex<sz[2];++sliceIndex)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// std::stringstream sstr;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// sstr << "/Users/matthiasschabel/Temporary/IMTEST-" </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// << std::setw(4) << std::setfill('0') << frameIndex</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// << "-"</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// << std::setw(4) << std::setfill('0') << sliceIndex</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// << ".dcm";</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// outputFilenames.push_back(sstr.str());</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// std::cout << sstr.str() << std::endl;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); ">// }</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"><span class="Apple-tab-span" style="white-space:pre">        </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> writer-><span style="color: #2e0d6e">SetFileNames</span>(outputFilenames);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">try</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> writer-><span style="color: #2e0d6e">Update</span>();</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> }</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">catch</span> (<span style="color: #5c2699">itk</span>::<span style="color: #5c2699">ExceptionObject</span>& <span style="color: #5c2699">e</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cerr</span> << <span style="color: #c41a16">"exception in ImageSeriesWriter "</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cerr</span> << <span style="color: #5c2699">e</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>;</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> <br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #007400">//throw dicom::Exception();</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #aa0d91">return</span> -<span style="color: #1c00cf">1</span>;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> }</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> }</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco; min-height: 14.0px"> </p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> <span style="color: #5c2699">std</span>::<span style="color: #5c2699">cout</span> << <span style="color: #c41a16">"Processing for study "</span> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> << lastName << <span style="color: #c41a16">","</span> << firstName << <span style="color: #c41a16">" "</span> << dateString </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> << <span style="color: #c41a16">" successfully completed..."</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span> << <span style="color: #5c2699">std</span>::<span style="color: #5c2699">endl</span>; </div><div><br></div></div></div></div></body></html>