<html>
<body>
<font size=3>Hi Xabi,<br><br>
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.<br><br>
Do you have enough memory on your windows pc to allocate the
memory?<br><br>
Kind regards,<br>
Stefan.<br><br>
<br>
At 16:54 7-4-2008, Xabier Artaechevarria Artieda wrote:<br>
<blockquote type=cite class=cite cite>Hi all,<br>
When I call Allocate() for an image pointer my program crashes
under <br>
Windows, compiled with Visual Studio 2003.<br>
It worked fine under Linux. Anybody any clue, please?<br>
Below, the code piece where the program crashes, just when I call
<br>
Allocate(). I checked the input image and it not zero or anything
like <br>
that.<br>
Thanks,<br>
Xabi<br><br>
template< class TInputImage, class TOutputImage ><br>
void<br>
DeleteImageFilter< TInputImage, TOutputImage ><br>
::GenerateData()<br>
{<br>
// Get the input and output pointers<br>
InputImageConstPointer inputPtr =
this->GetInput();<br>
OutputImagePointer outputPtr =
this->GetOutput();<br>
std::cout << "Allocate memory!" <<
std::endl;<br>
// Allocate the output<br>
outputPtr->SetRegions( inputPtr->GetLargestPossibleRegion()
);<br>
std::cout << "Region got" <<
std::endl;<br>
outputPtr->Allocate();<br>
std::cout << "Before getting here program crashes"
<< std::endl;<br>
...<br><br>
-- <br>
Xabier Artaechevarria<br>
Cancer Imaging Laboratory<br>
Centre for Applied Medical Research<br>
<a href="http://www.cima.es/" eudora="autourl">www.cima.es</a><br><br>
<br><br>
<br><br>
<br>
----------------------------------------------------------------<br>
Este mensaje ha sido enviado desde
<a href="https://webmail.unav.es/" eudora="autourl">https://webmail.unav.es</a><br><br>
_______________________________________________<br>
Insight-users mailing list<br>
Insight-users@itk.org<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" eudora="autourl">http://www.itk.org/mailman/listinfo/insight-users</a></font></blockquote></body>
<br>
</html>