+void ImageUndoRedo::DrawUR(ImageInfoUR* imageInfo, const bool& undo) {
+ VTKImageDataPointerType img;
+ if (undo) {
+ img = imageInfo->GetUndoImage();
+ } //fi
+ else {
+ img = imageInfo->GetRedoImage();
+ } //else
+ RegionSType region = imageInfo->GetImageMManager()->GetModifiedRegion();
+ if (img != NULL) {
+ for (int i = region.minX, x = 0; i <= region.maxX; i++, x++) {
+ for (int j = region.minY, y = 0; j <= region.maxY; j++, y++) {
+ for (int k = region.minZ, z = 0; k <= region.maxZ; k++, z++) {
+ float value = img->GetScalarComponentAsFloat(x, y, z, 0);
+ this->m_CurrentImage->SetScalarComponentFromFloat(i, j, k,
+ 0, value);
+ } //rof
+ } //rof
+ } //rof
+ this->m_CurrentImage->Modified();
+ }
+ this->m_ImagesDeque->ManageMemory();