Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Marc SCHWEITZER
sight
Commits
80b76b19
Commit
80b76b19
authored
Jun 28, 2017
by
Flavien BRIDAULT
Browse files
merge(dev): release 11.0.7
parents
89a90ce5
e84e0fe6
Changes
74
Hide whitespace changes
Inline
Side-by-side
Bundles/LeafIO/ioDicom/src/ioDicom/SFilterSelectionEditor.cpp
View file @
80b76b19
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -21,6 +21,8 @@
#include
<fwServices/macros.hpp>
#include
<boost/foreach.hpp>
#include
<QGridLayout>
#include
<QHBoxLayout>
#include
<QLabel>
...
...
@@ -28,8 +30,6 @@
#include
<QSignalMapper>
#include
<QVBoxLayout>
#include
<boost/foreach.hpp>
namespace
ioDicom
{
...
...
@@ -76,10 +76,9 @@ void SFilterSelectionEditor::starting() throw(::fwTools::Failed)
::
fwGui
::
IGuiContainerSrv
::
create
();
::
fwGuiQt
::
container
::
QtContainer
::
sptr
qtContainer
=
fwGuiQt
::
container
::
QtContainer
::
dynamicCast
(
getContainer
());
QWidget
*
const
container
=
qtContainer
->
getQtContainer
();
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
();
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
();
mainLayout
->
setAlignment
(
Qt
::
AlignTop
);
c
ontainer
->
setLayout
(
mainLayout
);
qtC
ontainer
->
setLayout
(
mainLayout
);
// Size policy
QSizePolicy
policy
(
QSizePolicy
::
Maximum
,
QSizePolicy
::
Preferred
);
...
...
@@ -88,7 +87,7 @@ void SFilterSelectionEditor::starting() throw(::fwTools::Failed)
QHBoxLayout
*
topLayout
=
new
QHBoxLayout
();
QWidget
*
topWidget
=
new
QWidget
();
topWidget
->
setLayout
(
topLayout
);
topLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
topLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
mainLayout
->
addWidget
(
topWidget
);
// Available filter list
...
...
@@ -116,7 +115,7 @@ void SFilterSelectionEditor::starting() throw(::fwTools::Failed)
QWidget
*
applyWidget
=
new
QWidget
();
applyWidget
->
setLayout
(
applyLayout
);
applyWidget
->
setSizePolicy
(
policy
);
applyLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
applyLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
m_forcedApplyCheckBox
=
new
QCheckBox
(
"Ignore errors"
);
applyLayout
->
addWidget
(
m_forcedApplyCheckBox
);
mainLayout
->
addWidget
(
applyWidget
,
0
,
Qt
::
AlignRight
);
...
...
@@ -125,14 +124,14 @@ void SFilterSelectionEditor::starting() throw(::fwTools::Failed)
QHBoxLayout
*
bottomLayout
=
new
QHBoxLayout
();
QWidget
*
bottomWidget
=
new
QWidget
();
bottomWidget
->
setLayout
(
bottomLayout
);
bottomLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
bottomLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
mainLayout
->
addWidget
(
bottomWidget
);
QHBoxLayout
*
buttonLayout
=
new
QHBoxLayout
();
QWidget
*
buttonWidget
=
new
QWidget
();
buttonWidget
->
setLayout
(
buttonLayout
);
buttonWidget
->
setSizePolicy
(
policy
);
buttonLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
buttonLayout
->
setContentsMargins
(
QMargins
(
0
,
0
,
0
,
0
));
// Apply filters button
m_applyFiltersButton
=
new
QPushButton
(
QIcon
(
QString
(
BUNDLE_PREFIX
)
+
"/media_0-1/icons/Apply.svg"
),
...
...
@@ -198,7 +197,6 @@ void SFilterSelectionEditor::fillAvailableFilters()
{
unsigned
int
index
=
0
;
std
::
vector
<
::
fwDicomIOFilter
::
IFilter
::
sptr
>
sortedFilters
;
for
(
const
std
::
string
&
key
:
::
fwDicomIOFilter
::
registry
::
get
()
->
getFactoryKeys
())
{
...
...
@@ -247,8 +245,7 @@ void SFilterSelectionEditor::stopping() throw(::fwTools::Failed)
QObject
::
disconnect
(
m_selectedFilterListWidget
,
SIGNAL
(
customContextMenuRequested
(
const
QPoint
&
)),
this
,
SLOT
(
showContextMenuForSelectedFilter
(
const
QPoint
&
)));
this
->
getContainer
()
->
clean
();
this
->::
fwGui
::
IGuiContainerSrv
::
destroy
();
this
->
destroy
();
}
//------------------------------------------------------------------------------
...
...
@@ -295,7 +292,7 @@ void SFilterSelectionEditor::addFilter(int filterTypeIndex, int position)
m_selectedFilterListWidget
->
setCurrentRow
(
position
);
// Update apply button
m_applyFiltersButton
->
setEnabled
(
m_selectedFilterListWidget
->
count
()
>
0
);
m_applyFiltersButton
->
setEnabled
(
m_selectedFilterListWidget
->
count
()
>
0
);
}
//------------------------------------------------------------------------------
...
...
@@ -481,7 +478,6 @@ void SFilterSelectionEditor::applyFilters()
// Notify
sDBhelper
.
notify
();
}
//------------------------------------------------------------------------------
...
...
Bundles/LeafIO/ioDicom/src/ioDicom/SSliceIndexDicomEditor.cpp
View file @
80b76b19
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -40,16 +40,16 @@
#include
<fwTools/System.hpp>
#include
<QApplication>
#include
<QComboBox>
#include
<QHBoxLayout>
#include
<QMouseEvent>
#include
<boost/asio/placeholders.hpp>
#include
<boost/filesystem/fstream.hpp>
#include
<boost/filesystem/operations.hpp>
#include
<boost/foreach.hpp>
#include
<QApplication>
#include
<QComboBox>
#include
<QHBoxLayout>
#include
<QMouseEvent>
#include
<iterator>
namespace
ioDicom
...
...
@@ -83,7 +83,7 @@ void SSliceIndexDicomEditor::configuring() throw(::fwTools::Failed)
::
fwRuntime
::
ConfigurationElement
::
sptr
config
=
m_configuration
->
findConfigurationElement
(
"config"
);
SLM_ASSERT
(
"The service ::ioDicom::SSliceIndexDicomEditor must have "
"a
\"
config
\"
element."
,
config
);
"a
\"
config
\"
element."
,
config
);
bool
success
;
...
...
@@ -115,9 +115,7 @@ void SSliceIndexDicomEditor::starting() throw(::fwTools::Failed)
::
fwGui
::
IGuiContainerSrv
::
create
();
::
fwGuiQt
::
container
::
QtContainer
::
sptr
qtContainer
=
fwGuiQt
::
container
::
QtContainer
::
dynamicCast
(
getContainer
());
QWidget
*
const
container
=
qtContainer
->
getQtContainer
();
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
container
->
setLayout
(
layout
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
::
fwMedData
::
DicomSeries
::
csptr
dicomSeries
=
this
->
getInput
<
::
fwMedData
::
DicomSeries
>
(
"series"
);
SLM_ASSERT
(
"DicomSeries should not be null !"
,
dicomSeries
);
...
...
@@ -125,13 +123,13 @@ void SSliceIndexDicomEditor::starting() throw(::fwTools::Failed)
// Slider
m_sliceIndexSlider
=
new
QSlider
(
Qt
::
Horizontal
);
layout
->
addWidget
(
m_sliceIndexSlider
,
1
);
layout
->
addWidget
(
m_sliceIndexSlider
,
1
);
m_sliceIndexSlider
->
setRange
(
0
,
static_cast
<
int
>
(
m_numberOfSlices
-
1
));
m_sliceIndexSlider
->
setValue
(
static_cast
<
int
>
(
m_numberOfSlices
/
2
));
// Line Edit
m_sliceIndexLineEdit
=
new
QLineEdit
();
layout
->
addWidget
(
m_sliceIndexLineEdit
,
0
);
layout
->
addWidget
(
m_sliceIndexLineEdit
,
0
);
m_sliceIndexLineEdit
->
setReadOnly
(
true
);
m_sliceIndexLineEdit
->
setMaximumWidth
(
80
);
...
...
@@ -139,6 +137,7 @@ void SSliceIndexDicomEditor::starting() throw(::fwTools::Failed)
ss
<<
m_sliceIndexSlider
->
value
()
<<
" / "
<<
(
m_numberOfSlices
-
1
);
m_sliceIndexLineEdit
->
setText
(
std
::
string
(
ss
.
str
()).
c_str
());
qtContainer
->
setLayout
(
layout
);
// Connect the signals
QObject
::
connect
(
m_sliceIndexSlider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
changeSliceIndex
(
int
)));
...
...
@@ -149,7 +148,6 @@ void SSliceIndexDicomEditor::starting() throw(::fwTools::Failed)
// Create reader
::
fwServices
::
registry
::
ServiceFactory
::
sptr
srvFactory
=
::
fwServices
::
registry
::
ServiceFactory
::
getDefault
();
::
io
::
IReader
::
sptr
dicomReader
;
dicomReader
=
::
io
::
IReader
::
dynamicCast
(
srvFactory
->
create
(
m_dicomReaderType
));
SLM_ASSERT
(
"Unable to create a reader of type:
\"
"
+
m_dicomReaderType
+
"
\"
in "
...
...
@@ -200,8 +198,7 @@ void SSliceIndexDicomEditor::stopping() throw(::fwTools::Failed)
// Disconnect the signals
QObject
::
disconnect
(
m_sliceIndexSlider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
changeSliceIndex
(
int
)));
this
->
getContainer
()
->
clean
();
this
->::
fwGui
::
IGuiContainerSrv
::
destroy
();
this
->
destroy
();
}
//------------------------------------------------------------------------------
...
...
@@ -284,7 +281,6 @@ void SSliceIndexDicomEditor::readImage(std::size_t selectedSliceIndex)
SLM_INFO
(
"Create "
+
tmpPath
.
string
());
::
boost
::
filesystem
::
create_directories
(
tmpPath
);
SLM_ASSERT
(
"Dicom data shall be available before reading them."
,
dicomSeries
->
getDicomAvailability
()
!=
::
fwMedData
::
DicomSeries
::
NONE
||
dicomSeries
->
isInstanceAvailable
(
selectedSliceIndex
));
...
...
Bundles/LeafIO/ioPacs/src/ioPacs/SPacsConfigurationEditor.cpp
View file @
80b76b19
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -9,18 +9,22 @@
#include
<fwCom/Signal.hpp>
#include
<fwCom/Signal.hxx>
#include
<fwCom/Signals.hpp>
#include
<fwPacsIO/exceptions/Base.hpp>
#include
<fwGui/dialog/MessageDialog.hpp>
#include
<fwGuiQt/container/QtContainer.hpp>
#include
<fwPacsIO/exceptions/Base.hpp>
#include
<fwServices/macros.hpp>
#include
<boost/foreach.hpp>
#include
<QGridLayout>
#include
<QHBoxLayout>
#include
<QLabel>
#include
<QVBoxLayout>
#include
<boost/foreach.hpp>
namespace
ioPacs
{
...
...
@@ -55,51 +59,48 @@ void SPacsConfigurationEditor::starting() throw(::fwTools::Failed)
this
->
getObject
<
::
fwPacsIO
::
data
::
PacsConfiguration
>
();
SLM_ASSERT
(
"Pacs configuration object should not be null."
,
pacsConfiguration
);
::
fwGui
::
IGuiContainerSrv
::
create
();
::
fwGuiQt
::
container
::
QtContainer
::
sptr
qtContainer
=
fwGuiQt
::
container
::
QtContainer
::
dynamicCast
(
getContainer
());
QWidget
*
const
container
=
qtContainer
->
getQtContainer
();
QGridLayout
*
gridLayout
=
new
QGridLayout
();
container
->
setLayout
(
gridLayout
);
QGridLayout
*
gridLayout
=
new
QGridLayout
();
// Local application title
m_localApplicationTitleWidget
=
new
QLineEdit
();
m_localApplicationTitleWidget
->
setText
(
pacsConfiguration
->
getLocalApplicationTitle
().
c_str
());
gridLayout
->
addWidget
(
new
QLabel
(
"Local application title:"
),
0
,
0
);
gridLayout
->
addWidget
(
m_localApplicationTitleWidget
,
0
,
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Local application title:"
),
0
,
0
);
gridLayout
->
addWidget
(
m_localApplicationTitleWidget
,
0
,
1
);
// Pacs host name
m_pacsHostNameWidget
=
new
QLineEdit
();
m_pacsHostNameWidget
->
setText
(
pacsConfiguration
->
getPacsHostName
().
c_str
());
gridLayout
->
addWidget
(
new
QLabel
(
"Pacs host name:"
),
2
,
0
);
gridLayout
->
addWidget
(
m_pacsHostNameWidget
,
2
,
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Pacs host name:"
),
2
,
0
);
gridLayout
->
addWidget
(
m_pacsHostNameWidget
,
2
,
1
);
// Pacs application title
m_pacsApplicationTitleWidget
=
new
QLineEdit
();
m_pacsApplicationTitleWidget
->
setText
(
pacsConfiguration
->
getPacsApplicationTitle
().
c_str
());
gridLayout
->
addWidget
(
new
QLabel
(
"Pacs application title:"
),
3
,
0
);
gridLayout
->
addWidget
(
m_pacsApplicationTitleWidget
,
3
,
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Pacs application title:"
),
3
,
0
);
gridLayout
->
addWidget
(
m_pacsApplicationTitleWidget
,
3
,
1
);
// Pacs application port
m_pacsApplicationPortWidget
=
new
QSpinBox
();
m_pacsApplicationPortWidget
->
setRange
(
0
,
65535
);
m_pacsApplicationPortWidget
->
setRange
(
0
,
65535
);
m_pacsApplicationPortWidget
->
setValue
(
pacsConfiguration
->
getPacsApplicationPort
());
gridLayout
->
addWidget
(
new
QLabel
(
"Pacs application port:"
),
4
,
0
);
gridLayout
->
addWidget
(
m_pacsApplicationPortWidget
,
4
,
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Pacs application port:"
),
4
,
0
);
gridLayout
->
addWidget
(
m_pacsApplicationPortWidget
,
4
,
1
);
// Move application title
m_moveApplicationTitleWidget
=
new
QLineEdit
();
m_moveApplicationTitleWidget
->
setText
(
pacsConfiguration
->
getMoveApplicationTitle
().
c_str
());
gridLayout
->
addWidget
(
new
QLabel
(
"Move application title:"
),
5
,
0
);
gridLayout
->
addWidget
(
m_moveApplicationTitleWidget
,
5
,
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Move application title:"
),
5
,
0
);
gridLayout
->
addWidget
(
m_moveApplicationTitleWidget
,
5
,
1
);
// Move application port
m_moveApplicationPortWidget
=
new
QSpinBox
();
m_moveApplicationPortWidget
->
setRange
(
0
,
65535
);
m_moveApplicationPortWidget
->
setRange
(
0
,
65535
);
m_moveApplicationPortWidget
->
setValue
(
pacsConfiguration
->
getMoveApplicationPort
());
gridLayout
->
addWidget
(
new
QLabel
(
"Move application port:"
),
6
,
0
);
gridLayout
->
addWidget
(
m_moveApplicationPortWidget
,
6
,
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Move application port:"
),
6
,
0
);
gridLayout
->
addWidget
(
m_moveApplicationPortWidget
,
6
,
1
);
// Retrieve method
m_retrieveMethodWidget
=
new
QComboBox
();
...
...
@@ -107,12 +108,14 @@ void SPacsConfigurationEditor::starting() throw(::fwTools::Failed)
m_retrieveMethodWidget
->
addItem
(
"Get"
);
m_retrieveMethodWidget
->
setCurrentIndex
(
(
pacsConfiguration
->
getRetrieveMethod
()
==
::
fwPacsIO
::
data
::
PacsConfiguration
::
MOVE_RETRIEVE_METHOD
)
?
0
:
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Retrieve method:"
),
7
,
0
);
gridLayout
->
addWidget
(
m_retrieveMethodWidget
,
7
,
1
);
gridLayout
->
addWidget
(
new
QLabel
(
"Retrieve method:"
),
7
,
0
);
gridLayout
->
addWidget
(
m_retrieveMethodWidget
,
7
,
1
);
// Test button
m_pingPacsButtonWidget
=
new
QPushButton
(
"Ping Pacs"
);
gridLayout
->
addWidget
(
m_pingPacsButtonWidget
,
8
,
0
,
1
,
2
);
gridLayout
->
addWidget
(
m_pingPacsButtonWidget
,
8
,
0
,
1
,
2
);
qtContainer
->
setLayout
(
gridLayout
);
// Connect the signals
QObject
::
connect
(
m_pingPacsButtonWidget
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
pingPacs
()));
...
...
@@ -153,8 +156,7 @@ void SPacsConfigurationEditor::stopping() throw(::fwTools::Failed)
QObject
::
disconnect
(
m_retrieveMethodWidget
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
retrieveMethodChanged
(
int
)));
this
->
getContainer
()
->
clean
();
this
->::
fwGui
::
IGuiContainerSrv
::
destroy
();
this
->
destroy
();
}
//------------------------------------------------------------------------------
...
...
@@ -285,7 +287,6 @@ void SPacsConfigurationEditor::moveApplicationTitleChanged()
//------------------------------------------------------------------------------
void
SPacsConfigurationEditor
::
moveApplicationPortChanged
(
int
value
)
{
::
fwPacsIO
::
data
::
PacsConfiguration
::
sptr
pacsConfiguration
=
...
...
@@ -302,7 +303,7 @@ void SPacsConfigurationEditor::retrieveMethodChanged(int index)
::
fwPacsIO
::
data
::
PacsConfiguration
::
sptr
pacsConfiguration
=
this
->
getObject
<
::
fwPacsIO
::
data
::
PacsConfiguration
>
();
pacsConfiguration
->
setRetrieveMethod
(
(
index
==
(
index
==
0
)
?
(
::
fwPacsIO
::
data
::
PacsConfiguration
::
MOVE_RETRIEVE_METHOD
)
:
(
::
fwPacsIO
::
data
::
PacsConfiguration
::
GET_RETRIEVE_METHOD
));
...
...
Bundles/LeafIO/ioPacs/src/ioPacs/SQueryEditor.cpp
View file @
80b76b19
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -19,15 +19,15 @@
#include
<fwServices/macros.hpp>
#include
<QGridLayout>
#include
<QHBoxLayout>
#include
<QLabel>
#include
<boost/filesystem/operations.hpp>
#include
<boost/foreach.hpp>
#include
<dcmtk/dcmnet/scu.h>
#include
<QGridLayout>
#include
<QHBoxLayout>
#include
<QLabel>
namespace
ioPacs
{
...
...
@@ -66,17 +66,14 @@ void SQueryEditor::starting() throw(::fwTools::Failed)
::
fwGui
::
IGuiContainerSrv
::
create
();
::
fwGuiQt
::
container
::
QtContainer
::
sptr
qtContainer
=
fwGuiQt
::
container
::
QtContainer
::
dynamicCast
(
getContainer
());
QWidget
*
const
container
=
qtContainer
->
getQtContainer
();
// Main Widget
QGridLayout
*
layout
=
new
QGridLayout
();
container
->
setLayout
(
layout
);
m_patientNameLineEdit
=
new
QLineEdit
();
m_patientNameQueryButton
=
new
QPushButton
(
"Send"
);
layout
->
addWidget
(
new
QLabel
(
"Patient name:"
),
0
,
0
);
layout
->
addWidget
(
m_patientNameLineEdit
,
0
,
1
);
layout
->
addWidget
(
m_patientNameQueryButton
,
0
,
2
);
layout
->
addWidget
(
new
QLabel
(
"Patient name:"
),
0
,
0
);
layout
->
addWidget
(
m_patientNameLineEdit
,
0
,
1
);
layout
->
addWidget
(
m_patientNameQueryButton
,
0
,
2
);
m_beginStudyDateEdit
=
new
QDateEdit
();
m_beginStudyDateEdit
->
setDate
(
QDate
::
currentDate
());
...
...
@@ -86,13 +83,14 @@ void SQueryEditor::starting() throw(::fwTools::Failed)
m_endStudyDateEdit
->
setDisplayFormat
(
"dd.MM.yyyy"
);
m_studyDateQueryButton
=
new
QPushButton
(
"Send"
);
QHBoxLayout
*
dateLayout
=
new
QHBoxLayout
();
layout
->
addWidget
(
new
QLabel
(
"Study date:"
),
1
,
0
);
layout
->
addLayout
(
dateLayout
,
1
,
1
);
layout
->
addWidget
(
m_studyDateQueryButton
,
1
,
2
);
layout
->
addWidget
(
new
QLabel
(
"Study date:"
),
1
,
0
);
layout
->
addLayout
(
dateLayout
,
1
,
1
);
layout
->
addWidget
(
m_studyDateQueryButton
,
1
,
2
);
dateLayout
->
addWidget
(
m_beginStudyDateEdit
);
dateLayout
->
addWidget
(
m_endStudyDateEdit
);
//Set layout
c
ontainer
->
setLayout
(
layout
);
qtC
ontainer
->
setLayout
(
layout
);
// Connect the signals
QObject
::
connect
(
m_patientNameLineEdit
,
SIGNAL
(
returnPressed
()),
this
,
SLOT
(
queryPatientName
()));
...
...
@@ -122,8 +120,7 @@ void SQueryEditor::stopping() throw(::fwTools::Failed)
QObject
::
disconnect
(
m_beginStudyDateEdit
,
SIGNAL
(
dateChanged
(
QDate
)),
this
,
SLOT
(
queryStudyDate
()));
QObject
::
disconnect
(
m_endStudyDateEdit
,
SIGNAL
(
dateChanged
(
QDate
)),
this
,
SLOT
(
queryStudyDate
()));
this
->
getContainer
()
->
clean
();
this
->::
fwGui
::
IGuiContainerSrv
::
destroy
();
this
->
destroy
();
}
//------------------------------------------------------------------------------
...
...
Bundles/LeafIO/ioPacs/src/ioPacs/SSliceIndexDicomPullerEditor.cpp
View file @
80b76b19
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -42,16 +42,16 @@
#include
<fwTools/System.hpp>
#include
<QApplication>
#include
<QComboBox>
#include
<QHBoxLayout>
#include
<QMouseEvent>
#include
<boost/asio/placeholders.hpp>
#include
<boost/filesystem/fstream.hpp>
#include
<boost/filesystem/operations.hpp>
#include
<boost/foreach.hpp>
#include
<QApplication>
#include
<QComboBox>
#include
<QHBoxLayout>
#include
<QMouseEvent>
#include
<iterator>
namespace
ioPacs
...
...
@@ -97,7 +97,7 @@ void SSliceIndexDicomPullerEditor::configuring() throw(::fwTools::Failed)
::
fwRuntime
::
ConfigurationElement
::
sptr
config
=
m_configuration
->
findConfigurationElement
(
"config"
);
SLM_ASSERT
(
"The service ::ioPacs::SPacsConfigurationInitializer must have "
"a
\"
config
\"
element."
,
config
);
"a
\"
config
\"
element."
,
config
);
bool
success
;
...
...
@@ -132,9 +132,7 @@ void SSliceIndexDicomPullerEditor::starting() throw(::fwTools::Failed)
::
fwGui
::
IGuiContainerSrv
::
create
();
::
fwGuiQt
::
container
::
QtContainer
::
sptr
qtContainer
=
fwGuiQt
::
container
::
QtContainer
::
dynamicCast
(
getContainer
());
QWidget
*
const
container
=
qtContainer
->
getQtContainer
();
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
container
->
setLayout
(
layout
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
();
::
fwMedData
::
DicomSeries
::
csptr
dicomSeries
=
this
->
getInOut
<
::
fwMedData
::
DicomSeries
>
(
"series"
);
SLM_ASSERT
(
"DicomSeries should not be null !"
,
dicomSeries
);
...
...
@@ -142,13 +140,13 @@ void SSliceIndexDicomPullerEditor::starting() throw(::fwTools::Failed)
// Slider
m_sliceIndexSlider
=
new
QSlider
(
Qt
::
Horizontal
);
layout
->
addWidget
(
m_sliceIndexSlider
,
1
);
layout
->
addWidget
(
m_sliceIndexSlider
,
1
);
m_sliceIndexSlider
->
setRange
(
0
,
static_cast
<
unsigned
int
>
(
m_numberOfSlices
-
1
));
m_sliceIndexSlider
->
setValue
(
static_cast
<
unsigned
int
>
(
m_numberOfSlices
/
2
));
// Line Edit
m_sliceIndexLineEdit
=
new
QLineEdit
();
layout
->
addWidget
(
m_sliceIndexLineEdit
,
0
);
layout
->
addWidget
(
m_sliceIndexLineEdit
,
0
);
m_sliceIndexLineEdit
->
setReadOnly
(
true
);
m_sliceIndexLineEdit
->
setMaximumWidth
(
80
);
...
...
@@ -156,6 +154,7 @@ void SSliceIndexDicomPullerEditor::starting() throw(::fwTools::Failed)
ss
<<
m_sliceIndexSlider
->
value
()
<<
" / "
<<
(
m_numberOfSlices
-
1
);
m_sliceIndexLineEdit
->
setText
(
std
::
string
(
ss
.
str
()).
c_str
());
qtContainer
->
setLayout
(
layout
);
// Connect the signals
QObject
::
connect
(
m_sliceIndexSlider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
changeSliceIndex
(
int
)));
...
...
@@ -166,7 +165,6 @@ void SSliceIndexDicomPullerEditor::starting() throw(::fwTools::Failed)
// Create reader
::
fwServices
::
registry
::
ServiceFactory
::
sptr
srvFactory
=
::
fwServices
::
registry
::
ServiceFactory
::
getDefault
();
::
io
::
IReader
::
sptr
dicomReader
;
dicomReader
=
::
io
::
IReader
::
dynamicCast
(
srvFactory
->
create
(
m_dicomReaderType
));
SLM_ASSERT
(
"Unable to create a reader of type:
\"
"
+
m_dicomReaderType
+
"
\"
in "
...
...
@@ -225,8 +223,7 @@ void SSliceIndexDicomPullerEditor::stopping() throw(::fwTools::Failed)
// Disconnect the signals
QObject
::
disconnect
(
m_sliceIndexSlider
,
SIGNAL
(
valueChanged
(
int
)),
this
,
SLOT
(
changeSliceIndex
(
int
)));
this
->
getContainer
()
->
clean
();
this
->::
fwGui
::
IGuiContainerSrv
::
destroy
();
this
->
destroy
();
}
//------------------------------------------------------------------------------
...
...
@@ -300,7 +297,6 @@ void SSliceIndexDicomPullerEditor::readImage(std::size_t selectedSliceIndex)
SLM_INFO
(
"Create "
+
tmpPath
.
string
());
::
boost
::
filesystem
::
create_directories
(
tmpPath
);
SLM_ASSERT
(
"Dicom data shall be available before reading them."
,
dicomSeries
->
getDicomAvailability
()
!=
::
fwMedData
::
DicomSeries
::
NONE
||
dicomSeries
->
isInstanceAvailable
(
selectedSliceIndex
));
...
...
Bundles/LeafIO/ioVTK/src/ioVTK/SSeriesDBReader.cpp
View file @
80b76b19
/* ***** BEGIN LICENSE BLOCK *****
* FW4SPL - Copyright (C) IRCAD, 2009-201
6
.
* FW4SPL - Copyright (C) IRCAD, 2009-201
7
.
* Distributed under the terms of the GNU Lesser General Public License (LGPL) as
* published by the Free Software Foundation.
* ****** END LICENSE BLOCK ****** */
...
...
@@ -62,11 +62,11 @@ void SSeriesDBReader::configureWithIHM()
dialogFile
.
setDefaultLocation
(
::
fwData
::
location
::
Folder
::
New
(
_sDefaultPath
)
);
dialogFile
.
setType
(
::
fwGui
::
dialog
::
ILocationDialog
::
MULTI_FILES
);
dialogFile
.
setTitle
(
"Choose vtk files to load Series"
);
dialogFile
.
addFilter
(
"Vtk"
,
"*.vtk *.vti *.mhd *.vtu"
);
dialogFile
.
addFilter
(
"Vtk files"
,
"*.vtk"
);
dialogFile
.
addFilter
(
"Vti files"
,
"*.vti"
);
dialogFile
.
addFilter
(
"Vtu files"
,
"*.vtu"
);
dialogFile
.
addFilter
(
"MetaImage files"
,
"*.mhd"
);
dialogFile
.
addFilter
(
"Vtk"
,
"*.vtk *.vti *.mhd *.vtu"
);
dialogFile
.
addFilter
(
"Vtk files"
,
"*.vtk"
);
dialogFile
.
addFilter
(
"Vti files"
,
"*.vti"
);
dialogFile
.
addFilter
(
"Vtu files"
,
"*.vtu"
);
dialogFile
.
addFilter
(
"MetaImage files"
,
"*.mhd"
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
READ
);
dialogFile
.
setOption
(
::
fwGui
::
dialog
::
ILocationDialog
::
FILE_MUST_EXIST
);
...
...
@@ -162,11 +162,21 @@ void SSeriesDBReader::updating() throw(::fwTools::Failed)
this
->
loadSeriesDB
(
this
->
getFiles
(),
localSeriesDB
);
::
fwMedDataTools
::
helper
::
SeriesDB
sDBhelper
(
seriesDB
);
::
fwMedDataTools
::
helper
::
SeriesDB
sdbHelper
(
seriesDB
);
sdbHelper
.
clear
();
// Notify removal.
sdbHelper
.
notify
();
::
fwData
::
mt
::
ObjectWriteLock
lock
(
seriesDB
);
sDBhelper
.
merge
(
localSeriesDB
);
sDBhelper
.
notify
();
{
::
fwData
::
mt
::
ObjectWriteLock
lock
(
seriesDB
);
seriesDB
->
shallowCopy
(
localSeriesDB
);
}
::
fwMedData
::
SeriesDB
::
ContainerType
addedSeries
=
seriesDB
->
getContainer
();
auto
sig
=
seriesDB
->
signal
<
::
fwMedData
::
SeriesDB
::
AddedSeriesSignalType
>
(
::
fwMedData
::
SeriesDB
::
s_ADDED_SERIES_SIG
);
sig
->
asyncEmit
(
addedSeries
);
cursor
.
setDefaultCursor
();
}
...
...
@@ -174,5 +184,4 @@ void SSeriesDBReader::updating() throw(::fwTools::Failed)
//------------------------------------------------------------------------------
}
// namespace ioVtk
Bundles/LeafRegistration/basicRegistration/include/basicRegistration/SPointListRegistration.hpp
View file @
80b76b19
...
...
@@ -20,6 +20,8 @@ namespace basicRegistration
* @brief Register a point list against a reference point list. Each point in the list to register is matched
* with a point in the reference list according to its label.
* The output is a transformation matrix.
* @section Signals Signals
* - \b errorComputed(double): emitted when registration error is computed.
* @section Slots Slots
* - \b changeMode(std::string, std::string): called when registration mode is changed.
* Three modes are available : RIGID, SIMILARITY or AFFINE
...
...
@@ -51,6 +53,14 @@ public:
BASICREGISTRATION_API
static
const
::
fwCom
::
Slots
::
SlotKeyType
s_CHANGE_MODE
;
///@}
/**
* @name Signals API
* @{
*/
/// Emitted when registration error is computed
typedef
::
fwCom
::
Signal
<
void
(
double
)
>
ErrorComputedSignalType
;
///@}
BASICREGISTRATION_API
SPointListRegistration
();
BASICREGISTRATION_API
virtual
~
SPointListRegistration
();
...
...