3
* $Id: volumecommand.cpp 3387 2011-02-23 09:33:54Z carlos $
6
* Copyright 2008-10 MetaEmotion S.L. All rights reserved.
7
* http://ginkgo-cadx.com
9
* This file is licensed under LGPL v3 license.
10
* See License.txt for details
18
#include "volumecommand.h"
19
#include "voiextractioncommand.h"
20
#include "../pipelines/volumepipeline.h"
22
MedicalViewer::Reconstruction::Volume::Commands::VolumeCommandParams::VolumeCommandParams(
23
const GnkPtr<TPipeline>& pipeline,
24
unsigned int datasetNum,
25
double reductionFactor,
29
) : Pipeline(pipeline), DataSetNum(datasetNum), ReductionFactor(reductionFactor), Window(window), Level(level), BlendType(blendType)
33
MedicalViewer::Reconstruction::Volume::Commands::VolumeCommandParams::~VolumeCommandParams()
37
//====================================================================
39
MedicalViewer::Reconstruction::Volume::Commands::VolumeCommand::VolumeCommand(VolumeCommandParams* pParams) : GNC::GCS::IComando(pParams, "VolumeReconstruction" )
41
m_pVolumeParams = pParams;
42
SetId(IDC_VOLUME_RECONSTRUCTION);
43
CancelaA(IDC_VOLUME_RECONSTRUCTION);
44
EsperaA(IDC_VOI_EXTRACTION);
47
MedicalViewer::Reconstruction::Volume::Commands::VolumeCommand::~VolumeCommand(void)
51
void MedicalViewer::Reconstruction::Volume::Commands::VolumeCommand::Execute()
54
m_pVolumeParams->Pipeline->SetDataSet(m_pVolumeParams->DataSetNum, m_pVolumeParams->ReductionFactor);
55
m_pVolumeParams->Pipeline->SetWindowLevel(m_pVolumeParams->Window, m_pVolumeParams->Level);
56
m_pVolumeParams->Pipeline->SetBlendingType(m_pVolumeParams->BlendType);
59
m_pVolumeParams->Pipeline->SetProgressNotifier(this);
60
m_pVolumeParams->Pipeline->Update();
61
m_pVolumeParams->Pipeline->SetProgressNotifier(NULL);
68
void MedicalViewer::Reconstruction::Volume::Commands::VolumeCommand::Update()
71
m_pVolumeParams->Pipeline->Enable(true);
72
m_pVolumeParams->Pipeline->Render();
75
void MedicalViewer::Reconstruction::Volume::Commands::VolumeCommand::OnAbort()
79
void MedicalViewer::Reconstruction::Volume::Commands::VolumeCommand::LiberarRecursos()
83
bool MedicalViewer::Reconstruction::Volume::Commands::VolumeCommand::NotifyReconstructionProgress(const std::string& text, float progress)
85
return NotificarProgreso(progress, text);