[Insight-users] RegionGrowingSegmentation
suresh
suresh " <suresh_kb at rediffmail . com
28 Aug 2002 13:32:02 -0000
Hi Luis,
Hi Sayan,
Thanks for your help. I'm working the Segmentation problem using
the RegionGrowingSegmentation example sugggested by Luis.
But unfortunately what i'm getting as result is just a blank
image.
My input is a MRI of 122 slices.Whats could be the problem with my
code.?? pleae help me with this.
Also i would like to know about the following parameters of
GradientAnisotropicDiffusionImageFilterType.
1. ConductanceParameter
2. TimeStep
what is their significance? How does they effect the Segmentation
process?
please help me.
thanks
suresh
###################################
// template instantiations
typedef float InternalPixelType;
typedef itk::Image<InternalPixelType,Dimension>
InternalImageType;
typedef itk::GradientAnisotropicDiffusionImageFilter<
InternalImageType,
InternalImageType >
GradientAnisotropicDiffusionImageFilterType;
typedef itk::ConfidenceConnectedImageFilter<
InternalImageType,
InternalImageType >
ConfidenceConnectedImageFilterType;
typedef itk::CastImageFilter<
ImageType,
InternalImageType > CastImageFilterType;
typedef itk::CastImageFilter<
InternalImageType,
InternalImageType > NullImageFilterType;
// object declarations
GradientAnisotropicDiffusionImageFilterType::Pointer
m_GradientAnisotropicDiffusionImageFilter;
ConfidenceConnectedImageFilterType::Pointer
m_ConfidenceConnectedImageFilter;
CastImageFilterType::Pointer m_CastImageFilter;
NullImageFilterType::Pointer m_NullImageFilter;
ProgressUpdate(10, "Started1 ", (CString)VolumeName);
ImagePointer pImage_In = BufferToImage(mask);
try{
m_CastImageFilter = CastImageFilterType::New();
m_CastImageFilter->SetInput( pImage_In);
m_GradientAnisotropicDiffusionImageFilter =
GradientAnisotropicDiffusionImageFilterType::New();
m_GradientAnisotropicDiffusionImageFilter->SetInput(
m_CastImageFilter->GetOutput() );
m_GradientAnisotropicDiffusionImageFilter->Update();
m_NullImageFilter = NullImageFilterType::New();
m_NullImageFilter->SetInput(
m_GradientAnisotropicDiffusionImageFilter->GetOutput() );
m_ConfidenceConnectedImageFilter =
ConfidenceConnectedImageFilterType::New();
m_ConfidenceConnectedImageFilter->SetInput(
m_NullImageFilter->GetOutput() );
typedef ConfidenceConnectedImageFilterType::IndexType
IndexType;
IndexType seed;
seed[0] = 100;
seed[1] = 150;
seed[2] = 0;
m_ConfidenceConnectedImageFilter->SetSeed( seed );
m_GradientAnisotropicDiffusionImageFilter->SetIterations(10);
m_GradientAnisotropicDiffusionImageFilter->SetTimeStep(20);
m_GradientAnisotropicDiffusionImageFilter->SetConductanceParameter(100);
m_ConfidenceConnectedImageFilter->SetMultiplier( 2.5);
m_ConfidenceConnectedImageFilter->SetNumberOfIterations( 5);
m_ConfidenceConnectedImageFilter->Update();
InternalImageType::Pointer outImage =
m_ConfidenceConnectedImageFilter->GetOutput();
mask->Mem = outImage->GetBufferPointer();
}catch(itk::ExceptionObject &Eo){
AfxMessageBox(Eo.GetDescription());
}