Hello,
I am trying to implement a median filter for dicom pictures. It is
orientated at the RegionGrowing tutorial, did i forget anything or is
a DataTreeNode wrong at that point? Why is the region of the image
wrong?
I am getting the following error messages:
QRealMutexPrivate::unlock(), error calling ReleaseMutex
Error code 288 - Es wurde versucht, einen Mutex freizugeben,
der nicht im Besitz des Aufrufers war.
MITK MainApp caught an exception:
..\..\..\source\Code\Common\itkDataObject.cxx:
397:
Requested region is (at least partially) outside the largest possible region.
My code:
void QmitkAutomaticSegmentation::StartButtonClicked()
{
...
AccessByItk( image, AutomaticSegmentation );
...
}
template < typename TPixel, unsigned int VImageDimension >
void QmitkAutomaticSegmentation::AutomaticSegmentation( itk::Image<
TPixel, VImageDimension >* itkImage )
{
typedef itk::Image< TPixel, VImageDimension > InputImageType; // Image type
typedef itk::Image< TPixel, VImageDimension > OutputImageType;
typedef typename InputImageType::IndexType IndexType;
typedef itk::MedianImageFilter<InputImageType, OutputImageType > FilterType;
FilterType::Pointer filter = FilterType::New();
InputImageType::SizeType indexRadius;
indexRadius[0] = 1; // radius along x
indexRadius[1] = 1; // radius along y
indexRadius[2] = 0; // radius along z
filter->SetRadius( indexRadius );
filter ->GenerateInputRequestedRegion();
filter->SetInput( itkImage ); //aufrufen des Filters
filter->Update();
mitk::Image::Pointer resultImage = mitk::ImportItkImage(
filter->GetOutput() );
mitk::DataTreeNode::Pointer newNode = mitk::DataTreeNode::New();
newNode->SetData( resultImage );
mitk::DataTreeNodeFactory::SetDefaultImageProperties( newNode );
mitk::DataStorage::GetInstance()->Add( newNode );
mitk::RenderingManager::GetInstance()->RequestUpdateAll();
}
Thanks and best regards,
Juliane
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users