<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Amjad,<br>
    <br>
    You can use an ITK extract filter to extract a region that
    corresponds to one of your slices (along the axis you want). The 
    output of the extract filter will be 3D, so you will need to cast it
    into a 2D images using an ITK cast filter. <br>
    <br>
    Cyril<br>
    <br>
    <div class="moz-cite-prefix">On 05/04/2016 11:04 AM, AMJAD N wrote:<br>
    </div>
    <blockquote
cite="mid:CAHq1iukV+sVz0wHHMrKz+nn8w0NTkZmqOSsufn8rtkHM96mZXQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div dir="ltr">Hi all,
        <div><br>
        </div>
        <div>I have wrote code for saving output volume stack as *.tiff.
          Currently I am getting output of XY axis. What should I do in
          order to get the other axes. </div>
        <div>My code is shown below.</div>
        <div><br>
        </div>
        <div>
          <div>        typedef
            itk::StreamingImageFilter<FloatImageType,
            FloatImageType> StreamerType;</div>
          <div><span class="" style="white-space:pre">  </span>StreamerType::Pointer
            streamerBP = StreamerType::New();</div>
          <div><span class="" style="white-space:pre">  </span>streamerBP->SetInput(feldkampCUDA->GetOutput());</div>
          <div><span class="" style="white-space:pre">  </span>streamerBP->SetNumberOfStreamDivisions(8);</div>
          <div><br>
          </div>
          <div><span class="" style="white-space:pre">  </span>typedef
            itk::Image< float, 2 >     Image2DType;</div>
          <div><span class="" style="white-space:pre">  </span>typedef
            itk::ImageSeriesWriter< FloatImageType, Image2DType >
            WriterType;</div>
          <div><span class="" style="white-space:pre">  </span>WriterType::Pointer
            writer = WriterType::New();</div>
          <div><span class="" style="white-space:pre">  </span>writer->SetInput(streamerBP->GetOutput());</div>
          <div><br>
          </div>
          <div><span class="" style="white-space:pre">  </span>typedef
            itk::NumericSeriesFileNames    NameGeneratorType;</div>
          <div><span class="" style="white-space:pre">  </span>NameGeneratorType::Pointer
            nameGenerator = NameGeneratorType::New();</div>
          <div><span class="" style="white-space:pre">  </span>nameGenerator->SetSeriesFormat("Reconstructed_%06d.tif");</div>
          <div><span class="" style="white-space:pre">  </span>nameGenerator->SetStartIndex(0);</div>
          <div><span class="" style="white-space:pre">  </span>nameGenerator->SetEndIndex(sizeOutput[2]
            - 1); // sizeOutput[2] is the Z-axis value of
            //reconstructed volume</div>
          <div><span class="" style="white-space:pre">  </span>nameGenerator->SetIncrementIndex(1);</div>
          <div><span class="" style="white-space:pre">  </span>writer->SetFileNames(nameGenerator->GetFileNames());</div>
          <div><span class="" style="white-space:pre">  </span>writer->SetUseCompression(true);</div>
          <div><span class="" style="white-space:pre">  </span>writer->Update();</div>
        </div>
        <div><br>
        </div>
        <div>PS: My reconstruction works fine.</div>
        <div><br>
        </div>
        <div>Thanks and Regards</div>
        <div><br>
        </div>
        <div>AMJAD N</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Rtk-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a>
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/rtk-users">http://public.kitware.com/mailman/listinfo/rtk-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>