[Rtk-users] Reconstructed Slice save as tiff
AMJAD N
amjad.n.cet at gmail.com
Wed May 4 05:04:28 EDT 2016
Hi all,
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.
My code is shown below.
typedef itk::StreamingImageFilter<FloatImageType, FloatImageType>
StreamerType;
StreamerType::Pointer streamerBP = StreamerType::New();
streamerBP->SetInput(feldkampCUDA->GetOutput());
streamerBP->SetNumberOfStreamDivisions(8);
typedef itk::Image< float, 2 > Image2DType;
typedef itk::ImageSeriesWriter< FloatImageType, Image2DType > WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetInput(streamerBP->GetOutput());
typedef itk::NumericSeriesFileNames NameGeneratorType;
NameGeneratorType::Pointer nameGenerator = NameGeneratorType::New();
nameGenerator->SetSeriesFormat("Reconstructed_%06d.tif");
nameGenerator->SetStartIndex(0);
nameGenerator->SetEndIndex(sizeOutput[2] - 1); // sizeOutput[2] is the
Z-axis value of //reconstructed volume
nameGenerator->SetIncrementIndex(1);
writer->SetFileNames(nameGenerator->GetFileNames());
writer->SetUseCompression(true);
writer->Update();
PS: My reconstruction works fine.
Thanks and Regards
AMJAD N
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20160504/4385a60b/attachment-0009.html>
More information about the Rtk-users
mailing list