void ImageUndoRedo::Undo() {
ImageInfoUR* imageInfo = this->m_ImagesDeque->Undo();
if (imageInfo != NULL) {
- //this->SetRedoImage(imageInfo->GetImageMManager());
this->DrawUR(imageInfo, true);
this->UpdateUndoImage();
}
}
//virtual
void ImageUndoRedo::Redo() {
- /*ImageInfoUR* imageInfo = this->m_ImagesDeque->Redo();
- if (imageInfo != NULL)
- {
- this->DrawUR(imageInfo);
- }*/
+ ImageInfoUR* imageInfo = this->m_ImagesDeque->Redo();
+ if (imageInfo != NULL) {
+ this->DrawUR(imageInfo, false);
+ this->UpdateUndoImage();
+ }
}
void ImageUndoRedo::SetImage(VTKImageDataPointerType image) {
this->m_CurrentImage = image;
extract->SetVOI(region.minX, region.maxX, region.minY, region.maxY,
region.minZ, region.maxZ);
extract->SetSampleRate(1, 1, 1);
- extract->SetInput(this->m_UndoImage);
+ extract->SetInput(img);
VTKImageDataPointerType imgResult = extract->GetOutput();
imgResult->Update();
return (imgResult);