Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
merge(feat/Landmarks): into dev
Browse files Browse the repository at this point in the history
Added new ::fwData::Landmarks (see #4)
Replaced the adaptor ImageLandmark by SLandmarks (see #6)
Added new editor for landmarks (see #5)
Updated the configuration to use the new landmarks in VRRender (see #7)


See merge request !32
  • Loading branch information
Flavien Bridault committed Mar 9, 2017
2 parents 5acc183 + 46d5b6d commit d230231
Show file tree
Hide file tree
Showing 62 changed files with 5,713 additions and 839 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<config filter="true" renderer="default" picker="negatodefault" />
</adaptor>

<adaptor id="landmarksNegato" class="::visuVTKAdaptor::ImageLandmarks" objectId="imageKey">
<adaptor id="landmarksNegato" class="::visuVTKAdaptor::SLandmarks" objectId="imageKey">
<config renderer="default" picker="negatodefault" />
</adaptor>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<config filter="true" renderer="default" picker="negatodefault" />
</adaptor>

<adaptor id="landmarksNegato" class="::visuVTKAdaptor::ImageLandmarks" objectId="imageKey">
<adaptor id="landmarksNegato" class="::visuVTKAdaptor::SLandmarks" objectId="imageKey">
<config renderer="default" picker="negatodefault" />
</adaptor>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set( REQUIREMENTS
guiQt
uiMeasurement
uiMeasurementQt
ctrlCamp
ctrlSelection
uiImageQt
uiVisu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
<parameters>
<param name="WID_PARENT" />
<param name="image" />
<param name="landmarks" />
<param name="orientation" default="axial" /> <!-- axial, frontal, sagittal -->
<param name="patient_name" default="" />
<param name="IMAGE_LOCATIONS" default="" />
<param name="CrossTypeChannel" default="crossTypeChannel" />
<param name="PickingChannel" default="pickingChannel" />
</parameters>
<config>

<object uid="${image}" type="::fwData::Image" src="ref" />
<object uid="${landmarks}" type="::fwData::Landmarks" src="ref" />

<service uid="mainView" type="::gui::view::SDefaultView">
<gui>
Expand Down Expand Up @@ -48,6 +51,7 @@
<!-- Generic Scene Negato -->
<service uid="negato" type="::fwRenderVTK::SRender" autoConnect="yes">
<in key="imageKey" uid="${image}" />
<in key="landmarksKey" uid="${landmarks}" />
<scene>
<picker id="negatodefault" vtkclass="fwVtkCellPicker" />

Expand All @@ -61,6 +65,10 @@
<config renderer="default" style="InteractorStyle2DForNegato" />
</adaptor>

<adaptor id="pickerInteractor" uid="pickerInteractor" class="::visuVTKAdaptor::PickerInteractor" objectId="self" >
<config renderer="default" picker="negatodefault" event="MOUSE_LEFT_UP"/>
</adaptor>

<adaptor id="MPRNegato" uid="MPRNegato" class="::visuVTKAdaptor::NegatoMPR" objectId="imageKey">
<config renderer="default" picker="negatodefault" mode="2d" slices="1" sliceIndex="${orientation}" />
</adaptor>
Expand All @@ -80,7 +88,7 @@
<config filter="true" renderer="default" picker="negatodefault" />
</adaptor>

<adaptor id="landmarksNegato" class="::visuVTKAdaptor::ImageLandmarks" objectId="imageKey">
<adaptor id="landmarksNegato" class="::visuVTKAdaptor::SLandmarks" objectId="landmarksKey">
<config renderer="default" picker="negatodefault" />
</adaptor>

Expand All @@ -101,6 +109,10 @@
<proxy channel="${CrossTypeChannel}" waitForKey="imageKey">
<slot>MPRNegato/setCrossScale</slot>
</proxy>

<proxy channel="${PickingChannel}" >
<signal>pickerInteractor/picked</signal>
</proxy>
</scene>
</service>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<parameters>
<param name="WID_PARENT" />
<param name="image" />
<param name="landmarks" />
<param name="selectedTFKey" />
<param name="TFSelections" />
<param name="patient_name" default="" />
Expand All @@ -13,6 +14,7 @@

<object uid="${image}" type="::fwData::Image" src="ref" />
<object uid="${TFSelections}" type="::fwData::Composite" src="ref" />
<object uid="${landmarks}" type="::fwData::Landmarks" src="ref" />

<service uid="mainView" type="::gui::view::SDefaultView">
<gui>
Expand Down Expand Up @@ -50,6 +52,7 @@
<!-- Generic Scene Negato -->
<service uid="negato" type="::fwRenderVTK::SRender" autoConnect="yes">
<in key="imageKey" uid="${image}" />
<in key="landmarksKey" uid="${landmarks}" />
<inout key="TFSelections" uid="${TFSelections}" />
<scene>

Expand Down Expand Up @@ -77,7 +80,7 @@
<config filter="true" renderer="default" picker="negatodefault" />
</adaptor>

<adaptor id="landmarksNegato" class="::visuVTKAdaptor::ImageLandmarks" objectId="imageKey">
<adaptor id="landmarksNegato" class="::visuVTKAdaptor::SLandmarks" objectId="landmarksKey">
<config renderer="default" picker="negatodefault" />
</adaptor>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@
<param name="SERIESDB" />
<param name="AS_UID" />
<param name="image" />
<param name="landmarks" />
<param name="advancedLandmarksEditor" default="yes" />
</parameters>
<config>
<object uid="${SERIESDB}" type="::fwMedData::SeriesDB" src="ref" />
<object uid="${AS_UID}" type="::fwMedData::ActivitySeries" src="ref" />
<object uid="${image}" type="::fwData::Image" src="ref" />
<object uid="${landmarks}" type="::fwData::Landmarks" src="ref" />

<service uid="mainView" type="::gui::view::SDefaultView">
<gui>
<layout type="::fwGui::CardinalLayoutManager">
<view caption="Negato1" align="center" />
<view caption="Negato2" align="right" />
<view caption="Negato3" align="right" />
<view align="left" visible="false" />
</layout>
<toolBar />
</gui>
Expand All @@ -26,18 +30,17 @@
<view wid="view_negato1" />
<view wid="view_negato2" />
<view wid="view_negato3" />
<view sid="landmarksEditor" start="yes" />
</registry>
</service>

<service uid="toolBar" type="::gui::aspect::SDefaultToolBar">
<gui>
<layout>
<menuItem name="New landmark" icon="@BUNDLE_PREFIX@/media_0-1/icons/Add-landmark.png" />
<menuItem name="Remove landmark" icon="@BUNDLE_PREFIX@/media_0-1/icons/Remove-landmark.png" />
<menuItem name="Load landmark" icon="@BUNDLE_PREFIX@/media_0-1/icons/Load-landmark.png" />
<menuItem name="Save landmark" icon="@BUNDLE_PREFIX@/media_0-1/icons/Save-landmark.png" />
<menuItem name="Focus landmark" icon="@BUNDLE_PREFIX@/media_0-1/icons/Find-landmark.png" />
<menuItem name="Hide/Show landmark" icon="@BUNDLE_PREFIX@/media_0-1/icons/View-landmark.png" />
<menuItem name="Display Landmarks editor" icon="@BUNDLE_PREFIX@/media_0-1/icons/View-landmark.png" style="check" />
<separator />
<menuItem name="Add distance" icon="@BUNDLE_PREFIX@/media_0-1/icons/distance.png" />
<menuItem name="Remove distance" icon="@BUNDLE_PREFIX@/media_0-1/icons/RemoveDistance.png" />
Expand All @@ -51,12 +54,10 @@
</layout>
</gui>
<registry>
<menuItem sid="ActionNewLandmark" start="yes" />
<menuItem sid="ActionRemoveLandmark" start="yes" />
<menuItem sid="ActionLoadLandmark" start="yes" />
<menuItem sid="ActionSaveLandmark" start="yes" />
<menuItem sid="ActionFocusLandmark" start="yes" />
<menuItem sid="ActionHideLandmark" start="yes" />
<menuItem sid="ActionSFocusLandmark" start="yes" />
<menuItem sid="ActionEditLandmark" start="yes" />
<menuItem sid="ActionAddDistance" start="yes" />
<menuItem sid="ActionRemoveDistance" start="yes" />
<menuItem sid="ActionHideDistance" start="yes" />
Expand All @@ -70,53 +71,75 @@
<service uid="cfgNegato1" type="::fwServices::SConfigController">
<appConfig id="2DNegato" />
<inout key="image" uid="${image}" />
<inout key="landmarks" uid="${landmarks}" />
<parameter replace="WID_PARENT" uid="view_negato1" />
<parameter replace="CrossTypeChannel" uid="crossTypeChannel" />
<parameter replace="PickingChannel" uid="pickerChannel" />
<parameter replace="orientation" by="axial" />
</service>

<service uid="cfgNegato2" type="::fwServices::SConfigController">
<appConfig id="2DNegato" />
<inout key="image" uid="${image}" />
<inout key="landmarks" uid="${landmarks}" />
<parameter replace="WID_PARENT" uid="view_negato2" />
<parameter replace="CrossTypeChannel" uid="crossTypeChannel" />
<parameter replace="PickingChannel" uid="pickerChannel" />
<parameter replace="orientation" by="frontal" />
</service>

<service uid="cfgNegato3" type="::fwServices::SConfigController">
<appConfig id="2DNegato" />
<inout key="image" uid="${image}" />
<inout key="landmarks" uid="${landmarks}" />
<parameter replace="WID_PARENT" uid="view_negato3" />
<parameter replace="CrossTypeChannel" uid="crossTypeChannel" />
<parameter replace="PickingChannel" uid="pickerChannel" />
<parameter replace="orientation" by="sagittal" />
</service>

<service uid="extractLandmarks" type="::ctrlCamp::SCopy" >
<in key="source" uid="${image}">
<extract from="@fields.m_landmarksId" />
</in>
<inout key="target" uid="${landmarks}"/>
</service>

<service uid="ActionExportActivity" type="::uiMedData::action::SExportSeries" autoConnect="yes">
<inout key="seriesDB" uid="${SERIESDB}" />
<inout key="series" uid="${AS_UID}" />
</service>

<service uid="landmarksEditor" type="::uiMeasurementQt::editor::SLandmarks" autoConnect="yes">
<inout key="landmarks" uid="${landmarks}" />
<advanced>${advancedLandmarksEditor}</advanced>
</service>

<service uid="MedicalImageSrv" type="::ctrlSelection::MedicalImageSrv" autoConnect="yes">
<inout key="image" uid="${image}" />
</service>

<service uid="ActionFocusLandmark" type="::uiMeasurement::action::FocusLandmark" >
<in key="image" uid="${image}" />
</service>
<service uid="ActionNewLandmark" type="::uiMeasurement::action::AddLandmark" >
<service uid="ActionSFocusLandmark" type="::uiMeasurement::action::SFocusLandmark" >
<in key="landmarks" uid="${landmarks}" autoConnect="yes" />
<inout key="image" uid="${image}" />
</service>
<service uid="ActionRemoveLandmark" type="::uiMeasurement::action::RemoveLandmark" >
<in key="image" uid="${image}" />
</service>
<service uid="ActionLoadLandmark" type="::uiMeasurement::action::LoadLandmark" >
<inout key="image" uid="${image}" />

<service uid="ActionLoadLandmark" type="::gui::action::SSlotCaller" >
<slots>
<slot>LoadLandmark/update</slot>
</slots>
</service>
<service uid="ActionSaveLandmark" type="::uiMeasurement::action::SaveLandmark" >
<in key="image" uid="${image}" />

<service uid="ActionSaveLandmark" type="::gui::action::SSlotCaller" >
<slots>
<slot>SaveLandmark/update</slot>
</slots>
</service>
<service uid="ActionHideLandmark" type="::uiMeasurement::action::ShowLandmark" autoConnect="yes" >
<in key="image" uid="${image}" />

<service uid="ActionEditLandmark" type="::gui::action::SBooleanSlotCaller">
<slots>
<slot>landmarksEditor/setVisible</slot>
</slots>
</service>
<service uid="ActionAddDistance" type="::uiMeasurement::action::AddDistance" >
<in key="image" uid="${image}" />
Expand All @@ -127,6 +150,23 @@
<service uid="ActionHideDistance" type="::uiMeasurement::action::ShowDistance" autoConnect="yes" >
<in key="image" uid="${image}" />
</service>

<service uid="LoadLandmark" type="::uiIO::editor::SIOSelector" >
<inout key="data" uid="${landmarks}" />
<type mode="reader" />
<selection mode="include" />
<addSelection service="::ioAtoms::SReader" />
<config id="LandmarksAtomsConfig" service="::ioAtoms::SReader" />
</service>

<service uid="SaveLandmark" type="::uiIO::editor::SIOSelector" >
<inout key="data" uid="${landmarks}" />
<type mode="writer" />
<selection mode="include" />
<addSelection service="::ioAtoms::SWriter" />
<config id="LandmarksAtomsConfig" service="::ioAtoms::SWriter" />
</service>

<service uid="ActionHideCross" type="::uiVisu::action::CrossTypeAction">
<in key="image" uid="${image}" />
<crossType>hide</crossType>
Expand All @@ -147,6 +187,10 @@
<signal>ActionShowFullCross/crossTypeModified</signal>
</connect>

<connect channel="pickerChannel">
<slot>landmarksEditor/addPickedPoint</slot>
</connect>


<!-- START AND STOP SERVICES -->
<start uid="mainView" />
Expand All @@ -156,5 +200,13 @@
<start uid="cfgNegato2" />
<start uid="cfgNegato3" />

<start uid="LoadLandmark" />
<start uid="SaveLandmark" />

<!-- start deferred -->
<start uid="extractLandmarks" />

<update uid="extractLandmarks" />

</config>
</extension>
6 changes: 5 additions & 1 deletion Bundles/LeafActivity/2DVisualizationActivity2/rc/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@
<requirement name="imageSeries" type="::fwMedData::ImageSeries" minOccurs="1" maxOccurs="1">
<desc>Image to display.</desc>
</requirement>
<requirement name="landmarks" type="::fwData::Landmarks" minOccurs="0" maxOccurs="0">
<desc>Landmarks to display.</desc>
</requirement>
</requirements>
<builder>::fwActivities::builder::ActivitySeries</builder>
<builder>::fwActivities::builder::ActivitySeriesInitData</builder>
<appConfig id="2DVisualization">
<parameters>
<parameter replace="image" uid="@values.imageSeries.image" />
<parameter replace="landmarks" uid="@values.landmarks" />
</parameters>
</appConfig>
</extension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<config filter="true" renderer="default" picker="negatodefault" />
</adaptor>

<adaptor id="landmarksNegato" class="::visuVTKAdaptor::ImageLandmarks" objectId="imageKey">
<adaptor id="landmarksNegato" class="::visuVTKAdaptor::SLandmarks" objectId="imageKey">
<config renderer="default" picker="negatodefault" />
</adaptor>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
<param name="WID_PARENT" />
<param name="imageComposite" />
<param name="modelSeries" />
<param name="landmarks" />
<param name="patient_name" default="" />
<param name="orientation" default="axial" /> <!-- axial, frontal, sagittal -->
<param name="ModelRepresentationChannel" />
<param name="ModelDisplayChannel" />
<param name="CrossTypeChannel" default="crossTypeChannel" />
<param name="PickingChannel" default="pickingChannel" />
<param name="Medical3DCamera" />
</parameters>
<config>
<object uid="${modelSeries}" type="::fwMedData::ModelSeries" src="ref" />
<object uid="${imageComposite}" type="::fwData::Composite" src="ref" />
<object uid="${landmarks}" type="::fwData::Landmarks" src="ref" />
<object uid="optionalInputImage" type="::fwData::Image" src="deferred" />

<service uid="mainView" type="::gui::view::SDefaultView">
Expand Down Expand Up @@ -75,6 +78,7 @@
<service uid="negato" type="::fwRenderVTK::SRender" autoConnect="yes">
<in key="modelSeriesKey" uid="${modelSeries}" />
<in key="imageKey" uid="optionalInputImage" optional="yes" />
<in key="landmarksKey" uid="${landmarks}" optional="yes" />
<scene>

<picker id="negatodefault" vtkclass="fwVtkCellPicker" />
Expand All @@ -93,6 +97,10 @@
<config renderer="default" style="InteractorStyle3DForNegato" />
</adaptor>

<adaptor id="pickerInteractor" uid="pickerInteractor" class="::visuVTKAdaptor::PickerInteractor" objectId="self" >
<config renderer="default" picker="negatodefault" event="MOUSE_LEFT_UP"/>
</adaptor>

<adaptor id="medicalCamera" uid="${Medical3DCamera}" class="::visuVTKAdaptor::Medical3DCamera" objectId="self">
<config renderer="default" sliceIndex="${orientation}" resetAtStart="yes" />
</adaptor>
Expand All @@ -113,7 +121,7 @@
<config filter="true" renderer="default" picker="negatodefault" />
</adaptor>

<adaptor id="landmarksNegato" class="::visuVTKAdaptor::ImageLandmarks" objectId="imageKey">
<adaptor id="landmarksNegato" class="::visuVTKAdaptor::SLandmarks" objectId="landmarksKey">
<config renderer="default" picker="negatodefault" />
</adaptor>

Expand All @@ -128,6 +136,10 @@
<slot>modelSeries/showReconstructions</slot>
</proxy>

<proxy channel="${PickingChannel}" >
<signal>pickerInteractor/picked</signal>
</proxy>

<connect>
<signal>snapshotNegatoEditor/snapped</signal>
<slot>snapshotUID/snap</slot>
Expand Down
Loading

0 comments on commit d230231

Please sign in to comment.