[Insight-users] utilization of itkMRFImageFilter
jbehar at messel.emse.fr
jbehar at messel.emse.fr
Tue Jul 13 06:58:12 EDT 2010
Hello ITK community,
I have a question about about the itkMRFImageFilter. I have segmented
the human heart using the kmeans (Step 1) as well as another pipeline
in order to isolate the heart from the other organs/artifacts that
have been segmented with the heart... (Step 2)
I would like to refine the initial classification by introducing
spacial coherence (between Step 1 and Step 2). In order to do so, I
tried to use the example "ScalarImageMarkovRandomField1.cxx" with two
images. The first "image.dicom" is a DICOM image which corresponds to
a slice of a volume (CT) and the second label.png is the result of the
segmentation after applying the itkScalarImageKmeansImageFilter.
I also give the initial means (we took 7 clusters): -3024 / 185.926 /
-689.681 / -480.271 / 50.6863 / -107.3 /423.254.
Those means are returned using kmeansFilter->GetFinalMeans()
Moreover I have add this piece of code at the begining of the Markov
example in order to process dicom images:
...
typedef itk::GDCMImageIO ImageIOType; //*
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName( inputImageFileName );
ImageIOType::Pointer gdcmImageIO = ImageIOType::New(); //*
reader->SetImageIO( gdcmImageIO ); //*
try //*
{
reader->Update();
}
catch (itk::ExceptionObject & e)
{
std::cerr << "exception in file reader " << std::endl;
std::cerr << e << std::endl;
return EXIT_FAILURE;
}
...
And it does not produce the expected result...
If someone can give me a clue on how to use this filter,
Thanks for your help,
Joachim B.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Insight-users
mailing list