Hi Amjad,
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.
Cyril
On 05/04/2016 11:04 AM, AMJAD N wrote:
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
_______________________________________________
Rtk-users mailing list
[email protected]
http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________
Rtk-users mailing list
[email protected]
http://public.kitware.com/mailman/listinfo/rtk-users