[Insight-users] Danielsson DistanceMap - Unable to allocate memory for image

Malsoaz James jmalsoaz at yahoo.fr
Tue Feb 23 09:26:51 EST 2010


Same problem with SignedMaurerDistanceMapImageFilter.

Thank you anyway for the idea.

--- En date de : Mar 23.2.10, Nick Tustison <ntustison at wustl.edu> a écrit :

De: Nick Tustison <ntustison at wustl.edu>
Objet: Re: [Insight-users] Danielsson DistanceMap - Unable to allocate  memory for image
À: "Malsoaz James" <jmalsoaz at yahoo.fr>
Cc: insight-users at itk.org
Date: Mardi 23 février 2010, 13h37

Hi James
Have you tried Maurer's distance transform?
http://www.itk.org/Doxygen/html/classitk_1_1SignedMaurerDistanceMapImageFilter.html


Nick

On Tue, Feb 23, 2010 at 7:44 AM, Malsoaz James <jmalsoaz at yahoo.fr> wrote:


Hi,

I'm using the DanielssonDistanceMapImageFilter on 3D volume. Unfortunately, I'm experiencing troubles when the 3D volume is too big and I get this error: "Unable to allocate memory for image".



Here is the code that I'm using:
typedef itk::Image<unsigned char, 3> ImageType3D
typedef itk::DanielssonDistanceMapImageFilter<ImageType3D, ImageType3D> FilterType;


    FilterType::Pointer filter = FilterType::New();

    typedef itk::RescaleIntensityImageFilter<ImageType3D, ImageType3D> RescalerType;
    RescalerType::Pointer scaler = RescalerType::New();
    filter->SetInput(itkImporter->GetOutput());


    scaler->SetInput( filter->GetOutput()
 );
    scaler->SetOutputMaximum(255);
    scaler->SetOutputMinimum(0);
   try

    {
    scaler->Update();
    }
     catch( itk::ExceptionObject & err )
    {
        std::cerr << "ExceptionObject caught !" << std::endl;
        std::cerr << err << std::endl;


    }


It works great when the dimension volume are 512*512*100. But when I have volume with big dimensions (ie 512*512*350), I get the error.

Is there a solution for this problem ? Certainly I can't compute the distance map using this filter on big volumes because of memory issues.



Can I use something else to compute the distanceMap ?

By the way, my final goal with the DistanceMap is to use it in a registration process. 
Indeed, I have CT images and a list of points obtained by a navigation system during a surgery. I would
 like to do the registration to find the transformation between the "real" points on the patient and the surface on my volume (this volume has been compute with the CT images).
Certainly, ITK offers good solution for such registration needs. Have you any idea?



Thank you for you help.
Best
James







      
_____________________________________

Powered by www.kitware.com



Visit other Kitware open-source projects at

http://www.kitware.com/opensource/opensource.html



Kitware offers ITK Training Courses, for more information visit:

http://www.kitware.com/products/protraining.html



Please keep messages on-topic and check the ITK FAQ at:

http://www.itk.org/Wiki/ITK_FAQ



Follow this link to subscribe/unsubscribe:

http://www.itk.org/mailman/listinfo/insight-users







      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100223/cad88ff7/attachment.htm>


More information about the Insight-users mailing list