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

Xabier Artaechevarria Artieda xabiarta at unav.es
Mon Apr 7 10:54:59 EDT 2008


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



More information about the Insight-users mailing list