[Insight-users] program crash with output->Allocate()

Xabier Artaechevarria Artieda xabiarta at unav.es
Mon Apr 7 11:13:29 EDT 2008


Hi Stefan,
I tried downsampling the image and it works now. It seems that I was  
using too much memory.
Thanks a lot for your help.
Best regards,
Xabi

-- 
Xabier Artaechevarria
Cancer Imaging Laboratory
Centre for Applied Medical Research
www.cima.es



Stefan Klein <stefan at isi.uu.nl> ha escrito:

> 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



----------------------------------------------------------------
Este mensaje ha sido enviado desde https://webmail.unav.es



More information about the Insight-users mailing list