[vtkusers] Error message about vtk

Xiaopeng Yang yxp233 at postech.ac.kr
Wed Nov 3 20:06:44 EDT 2010


Hello,

 

Let me explain my program and problem. My program is used for medical image segmentation, including data loading, denoising, and segmentation by ITK, visualization by VTK, interface by QT.

 

Till data loading and denoising, it works normally. However, once I click segmentation button after the denoising phase, the crash occur: error in allocating memory.

 

If I skip the denoising phase and run segmentation right after the data loading, then there is no crash. Please help me. Thank you!

 

Error message:

Untitled.png

 

Code:

//connect vtk to itk

template <typename ITK_Exporter, typename VTK_Importer>

void ConnectPipelines(ITK_Exporter exporter, VTK_Importer* importer)

{

…

}

//Paramter definiation

#define N_SEEDS 11

 typedef    float    InputPixelType;

typedef    float    OutputPixelType;

…

SimpleView::SimpleView() 

{

  this->ui = new Ui_SimpleView;

this->ui->setupUi(this);

  // Set up action signals and slots

connect(this->ui->actionOpen, SIGNAL(triggered()), this, SLOT(slotOpen())); 

connect(this->ui->pushButton_14, SIGNAL(clicked()), this, SLOT(slotContour()));

};

void SimpleView::slotOpen()

{

    …

reader->Update();

//Diffusion filter

…

filter->Update();

}

void SimpleView::slotContour() {

…

//fast marching

  gradientMagnitude->SetInput( filter->GetOutput() ); //use the filter output from diffusion denoising phase as input

  sigmoid->SetInput( gradientMagnitude->GetOutput() );

  fastMarching->SetInput( sigmoid->GetOutput() );

  thresholder1->SetInput( fastMarching->GetOutput() );

//define connection between ITK and VTK

…

//visualization by vtkImageviewer2

…

}

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101104/93c50bef/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 11363 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101104/93c50bef/attachment.jpeg>


More information about the vtkusers mailing list