Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
GUI for slices interpolation. More...
#include <QmitkSlicesInterpolator.h>
Public Slots | |
virtual void | setEnabled (bool) |
void | EnableInterpolation (bool) |
void | Enable3DInterpolation (bool) |
void | FinishInterpolation (mitk::SliceNavigationController *slicer=NULL) |
Signals | |
void | SignalRememberContourPositions (bool) |
void | SignalShowMarkerNodes (bool) |
Public Member Functions | |
QmitkSlicesInterpolator (QWidget *parent=0, const char *name=0) | |
void | Initialize (mitk::ToolManager *toolManager, const QList< mitk::SliceNavigationController * > &controllers) |
void | Uninitialize () |
virtual | ~QmitkSlicesInterpolator () |
void | SetDataStorage (mitk::DataStorage::Pointer storage) |
mitk::DataStorage * | GetDataStorage () |
void | OnToolManagerWorkingDataModified () |
void | OnToolManagerReferenceDataModified () |
void | OnTimeChanged (itk::Object *sender, const itk::EventObject &) |
void | OnSliceChanged (itk::Object *sender, const itk::EventObject &) |
void | OnSliceNavigationControllerDeleted (const itk::Object *sender, const itk::EventObject &) |
void | OnInterpolationInfoChanged (const itk::EventObject &) |
void | OnSurfaceInterpolationInfoChanged (const itk::EventObject &) |
void | Show3DInterpolationResult (bool) |
Set the visibility of the 3d interpolation. More... | |
Protected Slots | |
void | OnAcceptInterpolationClicked () |
void | OnAcceptAllInterpolationsClicked () |
void | OnAccept3DInterpolationClicked () |
void | OnReinit3DInterpolation () |
void | OnSuggestPlaneClicked () |
void | OnAcceptAllPopupActivated (QAction *action) |
void | OnInterpolationActivated (bool) |
void | On3DInterpolationActivated (bool) |
void | OnInterpolationMethodChanged (int index) |
void | On2DInterpolationEnabled (bool) |
void | On3DInterpolationEnabled (bool) |
void | OnInterpolationDisabled (bool) |
void | OnShowMarkers (bool) |
void | Run3DInterpolation () |
void | RunPlaneSuggestion () |
void | OnSurfaceInterpolationFinished () |
void | StartUpdateInterpolationTimer () |
void | StopUpdateInterpolationTimer () |
void | ChangeSurfaceColor () |
Protected Member Functions | |
const std::map< QAction *, mitk::SliceNavigationController * > | createActionToSliceDimension () |
void | AcceptAllInterpolations (mitk::SliceNavigationController *slicer) |
bool | TranslateAndInterpolateChangedSlice (const itk::EventObject &e, mitk::SliceNavigationController *slicer) |
void | Interpolate (mitk::PlaneGeometry *plane, unsigned int timeStep, mitk::SliceNavigationController *slicer) |
void | UpdateVisibleSuggestion () |
void | SetCurrentContourListID () |
Protected Attributes | |
std::map< QAction *, mitk::SliceNavigationController * > | ACTION_TO_SLICEDIMENSION |
GUI for slices interpolation.
There is a separate page describing the general design of QmitkInteractiveSegmentation: QmitkInteractiveSegmentationTechnicalPage
While mitk::SegmentationInterpolation does the bookkeeping of interpolation (keeping track of which slices contain how much segmentation) and the algorithmic work, QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently visible. It triggers generation of interpolation suggestions and also triggers acception of suggestions.
Last contributor:
Definition at line 80 of file QmitkSlicesInterpolator.h.
QmitkSlicesInterpolator::QmitkSlicesInterpolator | ( | QWidget * | parent = 0 , |
const char * | name = 0 |
||
) |
Definition at line 73 of file QmitkSlicesInterpolator.cpp.
References ChangeSurfaceColor(), mitk::CoreObjectFactory::GetInstance(), mitk::BaseRenderer::GetInstance(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::BoolProperty::New(), mitk::IntProperty::New(), mitk::FloatProperty::New(), mitk::VtkRepresentationProperty::New(), mitk::New(), mitk::StringProperty::New(), mitk::LevelWindowProperty::New(), mitk::ColorProperty::New(), mitk::DataNode::New(), mitk::BaseDataSource::New(), OnAccept3DInterpolationClicked(), OnAcceptAllInterpolationsClicked(), OnAcceptInterpolationClicked(), OnInterpolationInfoChanged(), OnInterpolationMethodChanged(), OnReinit3DInterpolation(), OnShowMarkers(), OnSuggestPlaneClicked(), OnSurfaceInterpolationFinished(), OnSurfaceInterpolationInfoChanged(), SignalShowMarkerNodes(), StartUpdateInterpolationTimer(), StopUpdateInterpolationTimer(), and SURFACE_COLOR_RGB.
|
virtual |
Definition at line 316 of file QmitkSlicesInterpolator.cpp.
References Uninitialize().
|
protected |
Definition at line 673 of file QmitkSlicesInterpolator.cpp.
References mitk::ProgressBar::AddStepsToDo(), mitk::PlaneGeometry::Clone(), mitk::SegTool2D::DetermineAffectedImageSlice(), mitk::DiffImageApplier::ExecuteOperation(), mitk::PixelType::GetBpe(), mitk::SliceNavigationController::GetCurrentPlaneGeometry(), mitk::UndoController::GetCurrentUndoModel(), mitk::ImageWriteAccessor::GetData(), mitk::Image::GetDimension(), mitk::Image::GetImageDescriptor(), mitk::ProgressBar::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::DiffImageApplier::GetInstanceForUndo(), mitk::Stepper::GetPos(), mitk::SlicedData::GetSlicedGeometry(), mitk::BaseController::GetTime(), mitk::UndoStackItem::IncCurrGroupEventId(), mitk::UndoStackItem::IncCurrObjectEventId(), mitk::BaseGeometry::IndexToWorld(), mitk::ImageTimeSelector::New(), mitk::New(), mitk::ExtractSliceFilter::New(), mitk::Image::New(), mitk::OpTEST, mitk::ProgressBar::Progress(), mitk::RenderingManager::RequestUpdateAll(), mitk::ApplyDiffImageOperation::SetFactor(), mitk::UndoModel::SetOperationEvent(), and mitk::BaseGeometry::WorldToIndex().
Referenced by FinishInterpolation(), and OnAcceptAllPopupActivated().
|
protectedslot |
Definition at line 1085 of file QmitkSlicesInterpolator.cpp.
References mitk::BaseRenderer::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::ColorProperty::New(), mitk::RenderingManager::RequestUpdate(), and SURFACE_COLOR_RGB.
Referenced by QmitkSlicesInterpolator().
|
protected |
Definition at line 62 of file QmitkSlicesInterpolator.cpp.
References mitk::SliceNavigationController::GetViewDirectionAsString().
Referenced by Initialize().
|
slot |
Definition at line 1193 of file QmitkSlicesInterpolator.cpp.
References On3DInterpolationActivated().
|
slot |
Call this from the outside to enable/disable interpolation
Definition at line 1186 of file QmitkSlicesInterpolator.cpp.
References OnInterpolationActivated().
|
slot |
Call this from the outside to accept all interpolations
Definition at line 798 of file QmitkSlicesInterpolator.cpp.
References AcceptAllInterpolations(), and OnAcceptAllInterpolationsClicked().
mitk::DataStorage * QmitkSlicesInterpolator::GetDataStorage | ( | ) |
Definition at line 225 of file QmitkSlicesInterpolator.cpp.
Referenced by OnToolManagerWorkingDataModified().
void QmitkSlicesInterpolator::Initialize | ( | mitk::ToolManager * | toolManager, |
const QList< mitk::SliceNavigationController * > & | controllers | ||
) |
To be called once before real use.
Definition at line 237 of file QmitkSlicesInterpolator.cpp.
References ACTION_TO_SLICEDIMENSION, createActionToSliceDimension(), mitk::Stepper::GetPos(), mitk::BaseController::GetTime(), mitk::New(), OnSliceChanged(), OnSliceNavigationControllerDeleted(), OnTimeChanged(), OnToolManagerReferenceDataModified(), OnToolManagerWorkingDataModified(), and Uninitialize().
|
protected |
Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager) should be interpolated. The actual work is then done by our SegmentationInterpolation object.
Definition at line 565 of file QmitkSlicesInterpolator.cpp.
References mitk::SegTool2D::DetermineAffectedImageSlice(), and mitk::DataNode::GetData().
Referenced by TranslateAndInterpolateChangedSlice().
|
protectedslot |
Definition at line 373 of file QmitkSlicesInterpolator.cpp.
References OnInterpolationActivated().
|
protectedslot |
Definition at line 1103 of file QmitkSlicesInterpolator.cpp.
References mitk::DataNode::GetBoolProperty(), mitk::BaseRenderer::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::DataNode::IsVisible(), MITK_ERROR, mitk::BoolProperty::New(), mitk::NodePredicateAnd::New(), mitk::NodePredicateDataType::New(), mitk::NodePredicateProperty::New(), mitk::RenderingManager::RequestUpdateAll(), Run3DInterpolation(), and Show3DInterpolationResult().
Referenced by Enable3DInterpolation(), On3DInterpolationEnabled(), OnInterpolationDisabled(), and OnInterpolationMethodChanged().
|
protectedslot |
Definition at line 379 of file QmitkSlicesInterpolator.cpp.
References On3DInterpolationActivated().
|
protectedslot |
Definition at line 820 of file QmitkSlicesInterpolator.cpp.
References mitk::DataNode::GetColor(), mitk::PixelType::GetComponentType(), mitk::ImageAccessorBase::GetData(), mitk::DataNode::GetData(), mitk::RenderingManager::GetInstance(), mitk::DataNode::GetName(), mitk::Image::GetPixelType(), mitk::Stepper::GetPos(), mitk::BaseController::GetTime(), mitk::BoolProperty::New(), mitk::FloatProperty::New(), mitk::SurfaceToImageFilter::New(), mitk::DataNode::New(), mitk::RenderingManager::RequestUpdateAll(), mitk::Image::SetVolume(), and Show3DInterpolationResult().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 808 of file QmitkSlicesInterpolator.cpp.
References ACTION_TO_SLICEDIMENSION, and OnAcceptAllPopupActivated().
Referenced by FinishInterpolation(), and QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 989 of file QmitkSlicesInterpolator.cpp.
References AcceptAllInterpolations(), and ACTION_TO_SLICEDIMENSION.
Referenced by OnAcceptAllInterpolationsClicked().
|
protectedslot |
Reaction to button clicks.
Definition at line 638 of file QmitkSlicesInterpolator.cpp.
References mitk::SliceNavigationController::GetCurrentPlaneGeometry(), mitk::TimeGeometry::GetGeometryForTimeStep(), mitk::RenderingManager::GetInstance(), mitk::Stepper::GetPos(), mitk::BaseController::GetTime(), mitk::BaseData::GetTimeGeometry(), mitk::Image::GetVtkImageData(), mitk::New(), mitk::ExtractSliceFilter::New(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Called on activation/deactivation
Definition at line 1014 of file QmitkSlicesInterpolator.cpp.
References mitk::DataNode::GetData(), mitk::RenderingManager::GetInstance(), mitk::RenderingManager::RequestUpdateAll(), and UpdateVisibleSuggestion().
Referenced by EnableInterpolation(), On2DInterpolationEnabled(), OnInterpolationDisabled(), OnInterpolationMethodChanged(), and OnToolManagerWorkingDataModified().
|
protectedslot |
Definition at line 384 of file QmitkSlicesInterpolator.cpp.
References On3DInterpolationActivated(), OnInterpolationActivated(), and Show3DInterpolationResult().
void QmitkSlicesInterpolator::OnInterpolationInfoChanged | ( | const itk::EventObject & | ) |
Just public because it is called by itk::Commands. You should not need to call this.
Definition at line 1205 of file QmitkSlicesInterpolator.cpp.
References UpdateVisibleSuggestion().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 414 of file QmitkSlicesInterpolator.cpp.
References MITK_ERROR, On3DInterpolationActivated(), OnInterpolationActivated(), and Show3DInterpolationResult().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 965 of file QmitkSlicesInterpolator.cpp.
References mitk::SurfaceInterpolationController::GetInstance(), mitk::BoolProperty::New(), mitk::NodePredicateProperty::New(), and mitk::SurfaceInterpolationController::ReinitializeInterpolation().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 452 of file QmitkSlicesInterpolator.cpp.
References mitk::BoolProperty::New(), and mitk::NodePredicateProperty::New().
Referenced by QmitkSlicesInterpolator().
void QmitkSlicesInterpolator::OnSliceChanged | ( | itk::Object * | sender, |
const itk::EventObject & | e | ||
) |
Definition at line 516 of file QmitkSlicesInterpolator.cpp.
References mitk::SliceNavigationController::GetRenderer(), mitk::BaseRenderer::RequestUpdate(), and TranslateAndInterpolateChangedSlice().
Referenced by Initialize().
void QmitkSlicesInterpolator::OnSliceNavigationControllerDeleted | ( | const itk::Object * | sender, |
const itk::EventObject & | |||
) |
Definition at line 1317 of file QmitkSlicesInterpolator.cpp.
Referenced by Initialize().
|
protectedslot |
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 594 of file QmitkSlicesInterpolator.cpp.
References mitk::BaseRenderer::GetInstance(), mitk::SliceNavigationController::GetRenderer(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::DataNode::IsVisible(), mitk::BaseRenderer::RequestUpdate(), and Show3DInterpolationResult().
Referenced by QmitkSlicesInterpolator().
void QmitkSlicesInterpolator::OnSurfaceInterpolationInfoChanged | ( | const itk::EventObject & | ) |
Just public because it is called by itk::Commands. You should not need to call this.
Definition at line 1211 of file QmitkSlicesInterpolator.cpp.
References Run3DInterpolation().
Referenced by QmitkSlicesInterpolator().
void QmitkSlicesInterpolator::OnTimeChanged | ( | itk::Object * | sender, |
const itk::EventObject & | e | ||
) |
Definition at line 497 of file QmitkSlicesInterpolator.cpp.
References mitk::Stepper::GetPos(), mitk::BaseController::GetTime(), and mitk::SliceNavigationController::SendSlice().
Referenced by Initialize().
void QmitkSlicesInterpolator::OnToolManagerReferenceDataModified | ( | ) |
Just public because it is called by itk::Commands. You should not need to call this.
Definition at line 493 of file QmitkSlicesInterpolator.cpp.
Referenced by Initialize(), and Uninitialize().
void QmitkSlicesInterpolator::OnToolManagerWorkingDataModified | ( | ) |
Just public because it is called by itk::Commands. You should not need to call this.
Definition at line 464 of file QmitkSlicesInterpolator.cpp.
References GetDataStorage(), OnInterpolationActivated(), mitk::DataStorage::Remove(), and SetCurrentContourListID().
Referenced by Initialize(), and Uninitialize().
|
protectedslot |
Definition at line 1067 of file QmitkSlicesInterpolator.cpp.
Referenced by On3DInterpolationActivated(), OnSurfaceInterpolationInfoChanged(), and SetCurrentContourListID().
|
protectedslot |
|
protected |
Definition at line 1222 of file QmitkSlicesInterpolator.cpp.
References mitk::DataNode::GetBoolProperty(), mitk::DataNode::GetData(), mitk::BaseData::GetGeometry(), mitk::Stepper::GetPos(), mitk::BaseGeometry::GetSpacing(), mitk::BaseController::GetTime(), Run3DInterpolation(), and Show3DInterpolationResult().
Referenced by OnToolManagerWorkingDataModified().
void QmitkSlicesInterpolator::SetDataStorage | ( | mitk::DataStorage::Pointer | storage | ) |
Definition at line 200 of file QmitkSlicesInterpolator.cpp.
|
virtualslot |
External enableization...
Definition at line 347 of file QmitkSlicesInterpolator.cpp.
References Show3DInterpolationResult().
void QmitkSlicesInterpolator::Show3DInterpolationResult | ( | bool | status | ) |
Set the visibility of the 3d interpolation.
Definition at line 1289 of file QmitkSlicesInterpolator.cpp.
References mitk::BaseRenderer::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::BaseRenderer::GetRenderWindowByName(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by On3DInterpolationActivated(), OnAccept3DInterpolationClicked(), OnInterpolationDisabled(), OnInterpolationMethodChanged(), OnSurfaceInterpolationFinished(), SetCurrentContourListID(), and setEnabled().
|
signal |
|
signal |
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 1072 of file QmitkSlicesInterpolator.cpp.
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 1077 of file QmitkSlicesInterpolator.cpp.
References mitk::BaseRenderer::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::ColorProperty::New(), mitk::RenderingManager::RequestUpdate(), and SURFACE_COLOR_RGB.
Referenced by QmitkSlicesInterpolator().
|
protected |
Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController and calls Interpolate to further process this PlaneGeometry into an interpolation.
e | is a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController |
slice | the SliceNavigationController |
Definition at line 530 of file QmitkSlicesInterpolator.cpp.
References mitk::TimeGeometry::GetGeometryForTimeStep(), mitk::SlicedGeometry3D::GetPlaneGeometry(), and Interpolate().
Referenced by OnSliceChanged().
void QmitkSlicesInterpolator::Uninitialize | ( | ) |
Definition at line 292 of file QmitkSlicesInterpolator.cpp.
References ACTION_TO_SLICEDIMENSION, OnToolManagerReferenceDataModified(), and OnToolManagerWorkingDataModified().
Referenced by Initialize(), and ~QmitkSlicesInterpolator().
|
protected |
Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.
Definition at line 1200 of file QmitkSlicesInterpolator.cpp.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by OnInterpolationActivated(), and OnInterpolationInfoChanged().
|
protected |
Definition at line 206 of file QmitkSlicesInterpolator.h.
Referenced by Initialize(), OnAcceptAllInterpolationsClicked(), OnAcceptAllPopupActivated(), and Uninitialize().