Jonas Teuwen
2017-07-31 19:55:40 UTC
Hi all,
I have 3D images on which I apply a collection of filters slice-by-slice. I
discovered the 'SliceBySliceImageFilter'.
The 2D filter contains things such as, after I read the 2D images:
typedef itk::FlatStructuringElement< Dimension >
StructuringElementType;
StructuringElementType::RadiusType radius;
radius.Fill( radiusValue );
StructuringElementType structuringElement =
StructuringElementType::Annulus(radius, outerRadius, false, false);
typedef itk::GrayscaleDilateImageFilter< FloatImageType, ImageType,
StructuringElementType > GrayscaleDilateImageFilterType;
GrayscaleDilateImageFilterType::Pointer dilateFilter =
GrayscaleDilateImageFilterType::New();
dilateFilter->SetInput( reader ->GetOutput() );
dilateFilter->SetKernel( structuringElement );
//dilateOutput = dilateFilter->GetOutput();
typedef itk::MinimumImageFilter <ImageType>
MinimumImageFilterType;
MinimumImageFilterType::Pointer minimumImageFilter
= MinimumImageFilterType::New ();
minimumImageFilter->SetInput(0, reader->GetOutput());
minimumImageFilter->SetInput(1, dilateFilter->GetOutput());
minimumImageFilter->Update();
then I have the output in minimumImageFilter->GetOutput();
However, when I apply SliceBySlice Image filter, my reader is the one of a
3D image, but the minimum filter also uses the reader->GetOutput() which
has to be in 2D.
How do approach this problem?
Best,
Jonas
I have 3D images on which I apply a collection of filters slice-by-slice. I
discovered the 'SliceBySliceImageFilter'.
The 2D filter contains things such as, after I read the 2D images:
typedef itk::FlatStructuringElement< Dimension >
StructuringElementType;
StructuringElementType::RadiusType radius;
radius.Fill( radiusValue );
StructuringElementType structuringElement =
StructuringElementType::Annulus(radius, outerRadius, false, false);
typedef itk::GrayscaleDilateImageFilter< FloatImageType, ImageType,
StructuringElementType > GrayscaleDilateImageFilterType;
GrayscaleDilateImageFilterType::Pointer dilateFilter =
GrayscaleDilateImageFilterType::New();
dilateFilter->SetInput( reader ->GetOutput() );
dilateFilter->SetKernel( structuringElement );
//dilateOutput = dilateFilter->GetOutput();
typedef itk::MinimumImageFilter <ImageType>
MinimumImageFilterType;
MinimumImageFilterType::Pointer minimumImageFilter
= MinimumImageFilterType::New ();
minimumImageFilter->SetInput(0, reader->GetOutput());
minimumImageFilter->SetInput(1, dilateFilter->GetOutput());
minimumImageFilter->Update();
then I have the output in minimumImageFilter->GetOutput();
However, when I apply SliceBySlice Image filter, my reader is the one of a
3D image, but the minimum filter also uses the reader->GetOutput() which
has to be in 2D.
How do approach this problem?
Best,
Jonas