Medical Imaging Interaction Toolkit
2018.4.99-389bf124
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=nullptr) |
Signals | |
void | SignalRememberContourPositions (bool) |
void | SignalShowMarkerNodes (bool) |
Public Member Functions | |
QmitkSlicesInterpolator (QWidget *parent=nullptr, const char *name=nullptr) | |
void | Initialize (mitk::ToolManager *toolManager, const QList< mitk::SliceNavigationController *> &controllers) |
void | Uninitialize () |
~QmitkSlicesInterpolator () override | |
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.
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 72 of file QmitkSlicesInterpolator.h.
QmitkSlicesInterpolator::QmitkSlicesInterpolator | ( | QWidget * | parent = nullptr , |
const char * | name = nullptr |
||
) |
Definition at line 69 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::FeatureBasedEdgeDetectionFilter::New(), mitk::VtkRepresentationProperty::New(), mitk::PointCloudScoringFilter::New(), mitk::StringProperty::New(), mitk::LevelWindowProperty::New(), mitk::ColorProperty::New(), mitk::DataNode::New(), OnAccept3DInterpolationClicked(), OnAcceptAllInterpolationsClicked(), OnAcceptInterpolationClicked(), OnInterpolationInfoChanged(), OnInterpolationMethodChanged(), OnReinit3DInterpolation(), OnShowMarkers(), OnSuggestPlaneClicked(), OnSurfaceInterpolationFinished(), OnSurfaceInterpolationInfoChanged(), SignalShowMarkerNodes(), StartUpdateInterpolationTimer(), StopUpdateInterpolationTimer(), and SURFACE_COLOR_RGB.
|
override |
Definition at line 312 of file QmitkSlicesInterpolator.cpp.
References Uninitialize().
|
protected |
Definition at line 669 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::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 1084 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 58 of file QmitkSlicesInterpolator.cpp.
References mitk::SliceNavigationController::GetViewDirectionAsString().
Referenced by Initialize().
|
slot |
Definition at line 1192 of file QmitkSlicesInterpolator.cpp.
References On3DInterpolationActivated().
|
slot |
Call this from the outside to enable/disable interpolation
Definition at line 1185 of file QmitkSlicesInterpolator.cpp.
References OnInterpolationActivated().
|
slot |
Call this from the outside to accept all interpolations
Definition at line 794 of file QmitkSlicesInterpolator.cpp.
References AcceptAllInterpolations(), and OnAcceptAllInterpolationsClicked().
mitk::DataStorage * QmitkSlicesInterpolator::GetDataStorage | ( | ) |
Definition at line 221 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 233 of file QmitkSlicesInterpolator.cpp.
References ACTION_TO_SLICEDIMENSION, createActionToSliceDimension(), mitk::Stepper::GetPos(), mitk::BaseController::GetTime(), 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 561 of file QmitkSlicesInterpolator.cpp.
References mitk::SegTool2D::DetermineAffectedImageSlice(), and mitk::DataNode::GetData().
Referenced by TranslateAndInterpolateChangedSlice().
|
protectedslot |
Definition at line 369 of file QmitkSlicesInterpolator.cpp.
References OnInterpolationActivated().
|
protectedslot |
Definition at line 1102 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 375 of file QmitkSlicesInterpolator.cpp.
References On3DInterpolationActivated().
|
protectedslot |
Definition at line 816 of file QmitkSlicesInterpolator.cpp.
References mitk::ProgressBar::AddStepsToDo(), mitk::PlaneProposer::CreatePlaneInfo(), mitk::DataNode::GetColor(), mitk::PixelType::GetComponentType(), mitk::ImageAccessorBase::GetData(), mitk::DataNode::GetData(), mitk::SurfaceInterpolationController::GetDistanceImageSpacing(), mitk::ProgressBar::GetInstance(), mitk::SurfaceInterpolationController::GetInstance(), mitk::BaseRenderer::GetInstance(), mitk::RenderingManager::GetInstance(), mitk::DataNode::GetName(), mitk::Image::GetPixelType(), mitk::Stepper::GetPos(), mitk::BaseRenderer::GetRenderWindowByName(), mitk::BaseController::GetTime(), MITK_ERROR, mitk::BoolProperty::New(), mitk::FloatProperty::New(), mitk::UnstructuredGrid::New(), mitk::SurfaceToImageFilter::New(), mitk::UnstructuredGridClusteringFilter::New(), mitk::DataNode::New(), mitk::ProgressBar::Progress(), mitk::RenderingManager::RequestUpdateAll(), RunPlaneSuggestion(), mitk::PlaneProposer::SetSliceNavigationController(), mitk::PlaneProposer::SetUnstructuredGrids(), mitk::PlaneProposer::SetUseDistances(), mitk::Image::SetVolume(), and Show3DInterpolationResult().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 804 of file QmitkSlicesInterpolator.cpp.
References ACTION_TO_SLICEDIMENSION, and OnAcceptAllPopupActivated().
Referenced by FinishInterpolation(), and QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 988 of file QmitkSlicesInterpolator.cpp.
References AcceptAllInterpolations(), and ACTION_TO_SLICEDIMENSION.
Referenced by OnAcceptAllInterpolationsClicked().
|
protectedslot |
Reaction to button clicks.
Definition at line 634 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::ExtractSliceFilter::New(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Called on activation/deactivation
Definition at line 1013 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 380 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 1204 of file QmitkSlicesInterpolator.cpp.
References UpdateVisibleSuggestion().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 410 of file QmitkSlicesInterpolator.cpp.
References MITK_ERROR, On3DInterpolationActivated(), OnInterpolationActivated(), and Show3DInterpolationResult().
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 961 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 448 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 512 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 1316 of file QmitkSlicesInterpolator.cpp.
Referenced by Initialize().
|
protectedslot |
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 590 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 1210 of file QmitkSlicesInterpolator.cpp.
References Run3DInterpolation().
Referenced by QmitkSlicesInterpolator().
void QmitkSlicesInterpolator::OnTimeChanged | ( | itk::Object * | sender, |
const itk::EventObject & | e | ||
) |
Definition at line 493 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 489 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 460 of file QmitkSlicesInterpolator.cpp.
References GetDataStorage(), OnInterpolationActivated(), mitk::DataStorage::Remove(), and SetCurrentContourListID().
Referenced by Initialize(), and Uninitialize().
|
protectedslot |
Definition at line 1066 of file QmitkSlicesInterpolator.cpp.
Referenced by On3DInterpolationActivated(), OnSurfaceInterpolationInfoChanged(), and SetCurrentContourListID().
|
protectedslot |
Referenced by OnAccept3DInterpolationClicked().
|
protected |
Definition at line 1221 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 196 of file QmitkSlicesInterpolator.cpp.
|
virtualslot |
External enableization...
Definition at line 343 of file QmitkSlicesInterpolator.cpp.
References Show3DInterpolationResult().
void QmitkSlicesInterpolator::Show3DInterpolationResult | ( | bool | status | ) |
Set the visibility of the 3d interpolation.
Definition at line 1288 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 1071 of file QmitkSlicesInterpolator.cpp.
Referenced by QmitkSlicesInterpolator().
|
protectedslot |
Definition at line 1076 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 526 of file QmitkSlicesInterpolator.cpp.
References mitk::TimeGeometry::GetGeometryForTimeStep(), mitk::SlicedGeometry3D::GetPlaneGeometry(), and Interpolate().
Referenced by OnSliceChanged().
void QmitkSlicesInterpolator::Uninitialize | ( | ) |
Definition at line 288 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 1199 of file QmitkSlicesInterpolator.cpp.
References mitk::RenderingManager::GetInstance(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by OnInterpolationActivated(), and OnInterpolationInfoChanged().
|
protected |
Definition at line 198 of file QmitkSlicesInterpolator.h.
Referenced by Initialize(), OnAcceptAllInterpolationsClicked(), OnAcceptAllPopupActivated(), and Uninitialize().