// Default global options
this->SetNumberOfRequiredInputs(1);
ResetDirections();
- AddDirection(2);
- AddDirection(1);
- AddDirection(0);
}
//--------------------------------------------------------------------
//----------------------------------------
typename InternalImageType::Pointer output = inputCaster->GetOutput();
for (unsigned int i=0; i<m_Directions.size();i++) {
- DD(i);
//----------------------------------------
// Fill the holes of a mask in 2D
//----------------------------------------
}
// Join to a 3D image
- std::cout<<"Joining the slices..."<<std::endl;
joinFilter->Update();
// Permute the axes to reset to orientation
output->SetOrigin(input->GetOrigin());
}
- writeImage<InternalImageType>(output, "toto.mhd");
-
// Cast
- DD("cast");
typedef itk::CastImageFilter<InternalImageType,ImageType> OutputCastImageFilterType;
typename OutputCastImageFilterType::Pointer outputCaster =OutputCastImageFilterType::New();
outputCaster->SetInput(output);
outputCaster->Update();
// Output
- DD("Graft");
this->GraftOutput(outputCaster->GetOutput());
}
//--------------------------------------------------------------------
void clitk::FillMaskGenericFilter<ArgsInfoType>::InitializeImageType()
{
ADD_IMAGE_TYPE(Dim, uchar);
+ ADD_IMAGE_TYPE(Dim, short);
// ADD_IMAGE_TYPE(Dim, int);
// ADD_IMAGE_TYPE(Dim, float);
}