Hello, i changed Update() to UpdateLargestPossibleRegion(); which didn´t improve anything. then i put the regionGrowing methode into my new functionality.
i then realized that the regionGrowing functionality in my MainApp isn´t working either. So I tried the precompiled mitk Version which is doing fine. The differences between the two seemd to be in the file import. my mitk version uses a slice number of the image and the precompiled mitk version uses a series as input for the same dicom-file. could their be an error expecting a 2d image and getting a 3d image? Error message: ..\..\mitk\Core\Rendering\mitkImageMapper2D.cpp:401 assertion failure 'input->GetTimeSlicedGeometry() == inputTimeGeometry' I am now compiling a new version of mitk, but i am afraid it will not help, anyone any idea? Best regards, Juliane Quoting Samuel Silva <[email protected]>: > Hello! > > I am having a very similar issue although I am trying to use a simple > threshold filter. Just to add to the discussion, in my case I added a > new node to the Data Tree using the original image ("pure" MITK, before > calling AccessByItk) and it worked well. The problem only occurs when an > Image imported from ITK is used. In my case, if I remove the line > > newNode->SetData( resultImage ); > > > the exception disappears. So I guess it has something to do with the > conversion from ITK to MITK? Something that happens when rendering? > > Best regards, > Sam > > [email protected] wrote: >> 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 >> > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users > ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
