[Insight-users] program crash with output->Allocate()
Stefan Klein
stefan at isi.uu.nl
Mon Apr 7 11:17:31 EDT 2008
Hi Xabi,
Have you tried putting a try-catch block around the call to
DeleteImageFilter->Update() ? Maybe it gives information about the cause of
the memory allocation failure.
Do you have enough memory on your windows pc to allocate the memory?
Kind regards,
Stefan.
At 16:54 7-4-2008, Xabier Artaechevarria Artieda wrote:
>Hi all,
>When I call Allocate() for an image pointer my program crashes under
>Windows, compiled with Visual Studio 2003.
>It worked fine under Linux. Anybody any clue, please?
>Below, the code piece where the program crashes, just when I call
>Allocate(). I checked the input image and it not zero or anything like
>that.
>Thanks,
>Xabi
>
>template< class TInputImage, class TOutputImage >
>void
>DeleteImageFilter< TInputImage, TOutputImage >
>::GenerateData()
>{
> // Get the input and output pointers
> InputImageConstPointer inputPtr = this->GetInput();
> OutputImagePointer outputPtr = this->GetOutput();
> std::cout << "Allocate memory!" << std::endl;
> // Allocate the output
> outputPtr->SetRegions( inputPtr->GetLargestPossibleRegion() );
> std::cout << "Region got" << std::endl;
> outputPtr->Allocate();
> std::cout << "Before getting here program crashes" << std::endl;
> ...
>
>--
>Xabier Artaechevarria
>Cancer Imaging Laboratory
>Centre for Applied Medical Research
>www.cima.es
>
>
>
>
>
>
>----------------------------------------------------------------
>Este mensaje ha sido enviado desde https://webmail.unav.es
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080407/b2a8734e/attachment.htm>
More information about the Insight-users
mailing list