|
@@ -23,34 +23,37 @@
|
|
|
|
|
|
#include <stdexcept>
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
void DumpAll(const QtSoapType& type, int indent=0)
|
|
|
{
|
|
|
if(indent==0)
|
|
|
- {
|
|
|
+ {
|
|
|
QString s;
|
|
|
s = "Dumping: " + type.typeName() + " " + type.name().name() + " " + type.value().toString();
|
|
|
qDebug() << s;
|
|
|
indent = 4;
|
|
|
- }
|
|
|
+ }
|
|
|
for (int i = 0; i < type.count() ; i++)
|
|
|
- {
|
|
|
+ {
|
|
|
QString s;
|
|
|
s = QString(indent, ' ') + type[i].typeName() + " " + type[i].name().name() + " Value: " + type[i].value().toString();
|
|
|
qDebug() << s;
|
|
|
if(type[i].count()>0)
|
|
|
DumpAll(type[i], indent+4);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
void DumpQtSoapType(const QtSoapType& sstruct)
|
|
|
{
|
|
|
qDebug() << "Dumping: " << sstruct.typeName() << " " << sstruct.name().name();
|
|
|
for (int i = 0; i < sstruct.count() ; i++)
|
|
|
- {
|
|
|
+ {
|
|
|
qDebug() << sstruct[i].typeName() << " " << sstruct[i].name().name();
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapRectangle::ctkDicomSoapRectangle(const QString& name,const QRect& rect)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
|
{
|
|
@@ -64,6 +67,7 @@ ctkDicomSoapRectangle::ctkDicomSoapRectangle(const QString& name,const QRect& re
|
|
|
rect.y()));
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
QRect ctkDicomSoapRectangle::getQRect(const QtSoapType& type)
|
|
|
{
|
|
|
return QRect (type["RefPointX"].value().toInt(),
|
|
@@ -72,16 +76,18 @@ QRect ctkDicomSoapRectangle::getQRect(const QtSoapType& type)
|
|
|
type["Height"].value().toInt());
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapState::ctkDicomSoapState(const QString& name, ctkDicomAppHosting::State s )
|
|
|
: QtSoapSimpleType(QtSoapQName(name), toStringValue(s))
|
|
|
{}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::State ctkDicomSoapState::getState(const QtSoapType& type)
|
|
|
{
|
|
|
return fromString( type.value().toString() );
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::State ctkDicomSoapState::fromString(const QString& string)
|
|
|
{
|
|
|
if (string == "IDLE") return ctkDicomAppHosting::IDLE;
|
|
@@ -94,29 +100,30 @@ ctkDicomAppHosting::State ctkDicomSoapState::fromString(const QString& string)
|
|
|
return ctkDicomAppHosting::EXIT;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
QString ctkDicomSoapState::toStringValue(ctkDicomAppHosting::State state)
|
|
|
{
|
|
|
switch(state)
|
|
|
- {
|
|
|
- case ctkDicomAppHosting::IDLE:
|
|
|
- return "IDLE";
|
|
|
- case ctkDicomAppHosting::INPROGRESS:
|
|
|
- return "INPROGRESS";
|
|
|
- case ctkDicomAppHosting::COMPLETED:
|
|
|
- return "COMPLETED";
|
|
|
- case ctkDicomAppHosting::SUSPENDED:
|
|
|
- return "SUSPENDED";
|
|
|
- case ctkDicomAppHosting::CANCELED:
|
|
|
- return "CANCELED";
|
|
|
- case ctkDicomAppHosting::EXIT:
|
|
|
- return "EXIT";
|
|
|
- default:
|
|
|
- throw std::runtime_error( "Invalid value for state" );
|
|
|
-
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
+ {
|
|
|
+ case ctkDicomAppHosting::IDLE:
|
|
|
+ return "IDLE";
|
|
|
+ case ctkDicomAppHosting::INPROGRESS:
|
|
|
+ return "INPROGRESS";
|
|
|
+ case ctkDicomAppHosting::COMPLETED:
|
|
|
+ return "COMPLETED";
|
|
|
+ case ctkDicomAppHosting::SUSPENDED:
|
|
|
+ return "SUSPENDED";
|
|
|
+ case ctkDicomAppHosting::CANCELED:
|
|
|
+ return "CANCELED";
|
|
|
+ case ctkDicomAppHosting::EXIT:
|
|
|
+ return "EXIT";
|
|
|
+ default:
|
|
|
+ throw std::runtime_error( "Invalid value for state" );
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapStatus::ctkDicomSoapStatus(const QString& name,
|
|
|
const ctkDicomAppHosting::Status& s)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -134,6 +141,7 @@ ctkDicomSoapStatus::ctkDicomSoapStatus(const QString& name,
|
|
|
s.codeMeaning) );
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::Status ctkDicomSoapStatus::getStatus(const QtSoapType& type)
|
|
|
{
|
|
|
ctkDicomAppHosting::Status s;
|
|
@@ -149,27 +157,29 @@ ctkDicomAppHosting::Status ctkDicomSoapStatus::getStatus(const QtSoapType& type)
|
|
|
return s;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapUID::ctkDicomSoapUID(const QString& name, const QString& uid)
|
|
|
: QtSoapSimpleType(QtSoapQName(name), uid)
|
|
|
{}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
QString ctkDicomSoapUID::getUID(const QtSoapType& type)
|
|
|
{
|
|
|
return type.value().toString();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapBool::ctkDicomSoapBool(const QString& name, bool boolean)
|
|
|
: QtSoapSimpleType(QtSoapQName(name), boolean, 0)
|
|
|
{}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
bool ctkDicomSoapBool::getBool(const QtSoapType& type)
|
|
|
{
|
|
|
return type.value().toBool();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapArrayOfStringType::ctkDicomSoapArrayOfStringType(const QString& typeName,
|
|
|
const QString& name, const QStringList& array)
|
|
|
// : QtSoapArray(QtSoapQName(name), QtSoapType::String, array.size())
|
|
@@ -177,23 +187,25 @@ ctkDicomSoapArrayOfStringType::ctkDicomSoapArrayOfStringType(const QString& type
|
|
|
{
|
|
|
for (QStringList::ConstIterator it = array.constBegin();
|
|
|
it < array.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
this->insert(new QtSoapSimpleType(QtSoapQName(typeName),*it));
|
|
|
// this->append(new QtSoapSimpleType(QtSoapQName(typeName),*it));
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
QStringList ctkDicomSoapArrayOfStringType::getArray(const QtSoapType& array)
|
|
|
{
|
|
|
QStringList list;
|
|
|
for (int i = 0; i < array.count() ; i++)
|
|
|
- {
|
|
|
+ {
|
|
|
const QString str = array[i].value().toString();
|
|
|
list << str;
|
|
|
- }
|
|
|
+ }
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapUUID::ctkDicomSoapUUID(const QString& name, const QUuid& uuid)
|
|
|
// : QtSoapArray(QtSoapQName(name), QtSoapType::String, array.size())
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -203,6 +215,7 @@ ctkDicomSoapUUID::ctkDicomSoapUUID(const QString& name, const QUuid& uuid)
|
|
|
this->insert(new QtSoapSimpleType(QtSoapQName("uuid"),uuidstring));
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
QUuid ctkDicomSoapUUID::getUuid(const QtSoapType& type)
|
|
|
{
|
|
|
QUuid uuid;
|
|
@@ -213,30 +226,32 @@ QUuid ctkDicomSoapUUID::getUuid(const QtSoapType& type)
|
|
|
return uuid;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapArrayOfUUIDS::ctkDicomSoapArrayOfUUIDS(const QString& name, const QList<QUuid>& array)
|
|
|
// : QtSoapArray(QtSoapQName(name), QtSoapType::String, array.size())
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
|
{
|
|
|
for (QList<QUuid>::ConstIterator it = array.constBegin();
|
|
|
it < array.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
QString uuidstring((*it).toString());
|
|
|
uuidstring.remove(0,1).chop(1);
|
|
|
this->insert(new ctkDicomSoapUUID("uuid",uuidstring));
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
QList<QUuid> ctkDicomSoapArrayOfUUIDS::getArray(const QtSoapType& array)
|
|
|
{
|
|
|
QList<QUuid> list;
|
|
|
- for (int i = 0; i < array.count() ; i++)
|
|
|
- {
|
|
|
+ for (int i = 0; i < array.count(); i++)
|
|
|
+ {
|
|
|
list << QUuid(array[i].value().toString());
|
|
|
- }
|
|
|
+ }
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapObjectDescriptor::ctkDicomSoapObjectDescriptor(const QString& name,
|
|
|
const ctkDicomAppHosting::ObjectDescriptor& od)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -257,6 +272,7 @@ ctkDicomSoapObjectDescriptor::ctkDicomSoapObjectDescriptor(const QString& name,
|
|
|
od.modality) );
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::ObjectDescriptor ctkDicomSoapObjectDescriptor::getObjectDescriptor(const QtSoapType& type)
|
|
|
{
|
|
|
ctkDicomAppHosting::ObjectDescriptor od;
|
|
@@ -272,10 +288,12 @@ ctkDicomAppHosting::ObjectDescriptor ctkDicomSoapObjectDescriptor::getObjectDesc
|
|
|
return od;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapArrayOfObjectDescriptors::ctkDicomSoapArrayOfObjectDescriptors(const QString& name,
|
|
|
const ctkDicomAppHosting::ArrayOfObjectDescriptors& ods)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
|
{
|
|
|
+ Q_UNUSED(ods);
|
|
|
qCritical() << "ctkDicomSoapArrayOfObjectDescriptors not yet implemented";
|
|
|
//this->insert(new QtSoapSimpleType(QtSoapQName("uuid"),
|
|
|
// od.descriptorUUID) );
|
|
@@ -293,18 +311,20 @@ ctkDicomSoapArrayOfObjectDescriptors::ctkDicomSoapArrayOfObjectDescriptors(const
|
|
|
// od.modality) );
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::ArrayOfObjectDescriptors ctkDicomSoapArrayOfObjectDescriptors::getArrayOfObjectDescriptors(const QtSoapType& type)
|
|
|
{
|
|
|
ctkDicomAppHosting::ArrayOfObjectDescriptors list;
|
|
|
for (int i = 0; i < type.count() ; i++)
|
|
|
- {
|
|
|
+ {
|
|
|
const ctkDicomAppHosting::ObjectDescriptor od =
|
|
|
ctkDicomSoapObjectDescriptor::getObjectDescriptor(type[i]);
|
|
|
list.append(od);
|
|
|
- }
|
|
|
+ }
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapSeries::ctkDicomSoapSeries(const QString& name,
|
|
|
const ctkDicomAppHosting::Series& s)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -316,27 +336,28 @@ ctkDicomSoapSeries::ctkDicomSoapSeries(const QString& name,
|
|
|
|
|
|
for (ctkDicomAppHosting::ArrayOfObjectDescriptors::ConstIterator it = s.objectDescriptors.constBegin();
|
|
|
it < s.objectDescriptors.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
odescriptors->append(new ctkDicomSoapObjectDescriptor("objectDescriptor",*it));
|
|
|
- }
|
|
|
+ }
|
|
|
this->insert(odescriptors);
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::Series ctkDicomSoapSeries::getSeries(const QtSoapType& type)
|
|
|
{
|
|
|
ctkDicomAppHosting::Series s;
|
|
|
const QtSoapType* ttype = &type;
|
|
|
if(type.name().name()=="item")
|
|
|
- {
|
|
|
+ {
|
|
|
ttype = &(type["item"]);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
s.seriesUID = (*ttype)["seriesUID"].value().toString();
|
|
|
s.objectDescriptors = ctkDicomSoapArrayOfObjectDescriptors::getArrayOfObjectDescriptors((*ttype)["objectDescriptors"]);
|
|
|
return s;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapStudy::ctkDicomSoapStudy(const QString& name,
|
|
|
const ctkDicomAppHosting::Study& s)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -348,9 +369,9 @@ ctkDicomSoapStudy::ctkDicomSoapStudy(const QString& name,
|
|
|
|
|
|
for (ctkDicomAppHosting::ArrayOfObjectDescriptors::ConstIterator it = s.objectDescriptors.constBegin();
|
|
|
it < s.objectDescriptors.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
odescriptors->append(new ctkDicomSoapObjectDescriptor("ObjectDescriptor", *it));
|
|
|
- }
|
|
|
+ }
|
|
|
this->insert(odescriptors);
|
|
|
|
|
|
QtSoapArray* series = new QtSoapArray(QtSoapQName("Series"), QtSoapType::Other,
|
|
@@ -358,21 +379,22 @@ ctkDicomSoapStudy::ctkDicomSoapStudy(const QString& name,
|
|
|
|
|
|
for (QList<ctkDicomAppHosting::Series>::ConstIterator it = s.series.constBegin();
|
|
|
it < s.series.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
series->append(new ctkDicomSoapSeries("Series",*it));
|
|
|
- }
|
|
|
+ }
|
|
|
this->insert(series);
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::Study ctkDicomSoapStudy::getStudy(const QtSoapType& type)
|
|
|
{
|
|
|
ctkDicomAppHosting::Study s;
|
|
|
|
|
|
const QtSoapType* ttype = &type;
|
|
|
- if(type.name().name()=="item")
|
|
|
- {
|
|
|
+ if(type.name().name() == "item")
|
|
|
+ {
|
|
|
ttype = &(type["item"]);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
s.studyUID = (*ttype)["StudyUID"].value().toString();
|
|
|
s.objectDescriptors = ctkDicomSoapArrayOfObjectDescriptors::getArrayOfObjectDescriptors((*ttype)["objectDescriptors"]);
|
|
@@ -380,17 +402,17 @@ ctkDicomAppHosting::Study ctkDicomSoapStudy::getStudy(const QtSoapType& type)
|
|
|
QList<ctkDicomAppHosting::Series> listSeries;
|
|
|
const QtSoapType& seriesArray = (*ttype)["Series"];
|
|
|
for (int i = 0; i < seriesArray.count() ; i++)
|
|
|
- {
|
|
|
+ {
|
|
|
const ctkDicomAppHosting::Series series =
|
|
|
ctkDicomSoapSeries::getSeries(seriesArray[i]);
|
|
|
listSeries.append(series);
|
|
|
- }
|
|
|
+ }
|
|
|
s.series = listSeries;
|
|
|
|
|
|
return s;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapPatient::ctkDicomSoapPatient(const QString& name,
|
|
|
const ctkDicomAppHosting::Patient& p)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -410,9 +432,9 @@ ctkDicomSoapPatient::ctkDicomSoapPatient(const QString& name,
|
|
|
|
|
|
for (ctkDicomAppHosting::ArrayOfObjectDescriptors::ConstIterator it = p.objectDescriptors.constBegin();
|
|
|
it < p.objectDescriptors.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
odescriptors->append(new ctkDicomSoapObjectDescriptor("ObjectDescriptor",*it));
|
|
|
- }
|
|
|
+ }
|
|
|
this->insert(odescriptors);
|
|
|
|
|
|
QtSoapArray* study = new QtSoapArray(QtSoapQName("Studies"), QtSoapType::Other,
|
|
@@ -420,19 +442,20 @@ ctkDicomSoapPatient::ctkDicomSoapPatient(const QString& name,
|
|
|
|
|
|
for (QList<ctkDicomAppHosting::Study>::ConstIterator it = p.studies.constBegin();
|
|
|
it < p.studies.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
study->append(new ctkDicomSoapStudy("Study",*it));
|
|
|
- }
|
|
|
+ }
|
|
|
this->insert(study);
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::Patient ctkDicomSoapPatient::getPatient(const QtSoapType& type)
|
|
|
{
|
|
|
const QtSoapType* ttype = &type;
|
|
|
- if(type.name().name()=="item")
|
|
|
- {
|
|
|
+ if(type.name().name() == "item")
|
|
|
+ {
|
|
|
ttype = &(type["item"]);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
ctkDicomAppHosting::Patient p;
|
|
|
|
|
@@ -447,16 +470,16 @@ ctkDicomAppHosting::Patient ctkDicomSoapPatient::getPatient(const QtSoapType& ty
|
|
|
QList<ctkDicomAppHosting::Study> listPatient;
|
|
|
const QtSoapType& studiesArray = (*ttype)["Studies"];
|
|
|
for (int i = 0; i < studiesArray.count() ; i++)
|
|
|
- {
|
|
|
+ {
|
|
|
const ctkDicomAppHosting::Study study =
|
|
|
ctkDicomSoapStudy::getStudy(studiesArray[i]);
|
|
|
listPatient.append(study);
|
|
|
- }
|
|
|
+ }
|
|
|
p.studies = listPatient;
|
|
|
return p;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapAvailableData::ctkDicomSoapAvailableData(const QString& name,
|
|
|
const ctkDicomAppHosting::AvailableData& ad)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -466,38 +489,40 @@ ctkDicomSoapAvailableData::ctkDicomSoapAvailableData(const QString& name,
|
|
|
|
|
|
for (ctkDicomAppHosting::ArrayOfObjectDescriptors::ConstIterator it = ad.objectDescriptors.constBegin();
|
|
|
it < ad.objectDescriptors.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
odescriptors->append(new ctkDicomSoapObjectDescriptor("objectDescriptor",*it));
|
|
|
- }
|
|
|
+ }
|
|
|
this->insert(odescriptors);
|
|
|
|
|
|
QtSoapArray* patient = new QtSoapArray(QtSoapQName("patients") ,QtSoapType::Other,
|
|
|
ad.patients.size());
|
|
|
|
|
|
for (QList<ctkDicomAppHosting::Patient>::ConstIterator it = ad.patients.constBegin();
|
|
|
- it < ad.patients.constEnd(); it++){
|
|
|
+ it < ad.patients.constEnd(); it++)
|
|
|
+ {
|
|
|
patient->append(new ctkDicomSoapPatient("patient",*it));
|
|
|
- }
|
|
|
+ }
|
|
|
this->insert(patient);
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::AvailableData ctkDicomSoapAvailableData::getAvailableData (const QtSoapType& type)
|
|
|
{
|
|
|
ctkDicomAppHosting::AvailableData ad;
|
|
|
|
|
|
//const QtSoapStruct& avData = static_cast<const QtSoapStruct&> (type);
|
|
|
//for (int i = 0; i < avData.count() ; i++)
|
|
|
- //{
|
|
|
+ // {
|
|
|
// qDebug() << avData[i].typeName() << " " << avData[i].name().name();
|
|
|
- //}
|
|
|
+ // }
|
|
|
|
|
|
ctkDicomAppHosting::ArrayOfObjectDescriptors list;
|
|
|
|
|
|
//const QtSoapType& inputType = type["objectDescriptors"];
|
|
|
//if(inputType.isValid()==false)
|
|
|
- //{
|
|
|
+ // {
|
|
|
// qCritical() << " NotifyDataAvailable: availableData not valid. " << inputType.errorString();
|
|
|
- //}
|
|
|
+ // }
|
|
|
//qDebug() << inputType.typeName() << " " << inputType.name().name();
|
|
|
|
|
|
ad.objectDescriptors = ctkDicomSoapArrayOfObjectDescriptors::getArrayOfObjectDescriptors(type["objectDescriptors"]);
|
|
@@ -505,17 +530,17 @@ ctkDicomAppHosting::AvailableData ctkDicomSoapAvailableData::getAvailableData (c
|
|
|
QList<ctkDicomAppHosting::Patient> listPatients;
|
|
|
const QtSoapType& patientsArray = type["patients"];
|
|
|
for (int i = 0; i < patientsArray.count() ; i++)
|
|
|
- {
|
|
|
+ {
|
|
|
const ctkDicomAppHosting::Patient patient =
|
|
|
ctkDicomSoapPatient::getPatient(patientsArray[i]);
|
|
|
listPatients.append(patient);
|
|
|
- }
|
|
|
+ }
|
|
|
ad.patients = listPatients;
|
|
|
|
|
|
return ad;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapObjectLocator::ctkDicomSoapObjectLocator(const QString& name,
|
|
|
const ctkDicomAppHosting::ObjectLocator& ol)
|
|
|
: QtSoapStruct(QtSoapQName(name))
|
|
@@ -539,6 +564,7 @@ ctkDicomSoapObjectLocator::ctkDicomSoapObjectLocator(const QString& name,
|
|
|
ol.URI) );
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomAppHosting::ObjectLocator ctkDicomSoapObjectLocator::getObjectLocator(const QtSoapType& type)
|
|
|
{
|
|
|
ctkDicomAppHosting::ObjectLocator ol;
|
|
@@ -556,28 +582,29 @@ ctkDicomAppHosting::ObjectLocator ctkDicomSoapObjectLocator::getObjectLocator(co
|
|
|
return ol;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//----------------------------------------------------------------------------
|
|
|
ctkDicomSoapArrayOfObjectLocators::ctkDicomSoapArrayOfObjectLocators(
|
|
|
const QString& name, const QList<ctkDicomAppHosting::ObjectLocator>& array)
|
|
|
: QtSoapArray(QtSoapQName(name), QtSoapType::String, array.size())
|
|
|
{
|
|
|
for (QList<ctkDicomAppHosting::ObjectLocator>::ConstIterator it = array.constBegin();
|
|
|
it < array.constEnd(); it++)
|
|
|
- {
|
|
|
+ {
|
|
|
this->append(new ctkDicomSoapObjectLocator("objectLocator",(*it)));
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+//----------------------------------------------------------------------------
|
|
|
QList<ctkDicomAppHosting::ObjectLocator> ctkDicomSoapArrayOfObjectLocators::getArray(const QtSoapType& array)
|
|
|
{
|
|
|
QList<ctkDicomAppHosting::ObjectLocator> list;
|
|
|
|
|
|
- for (int i = 0; i < array.count() ; i++)
|
|
|
- {
|
|
|
+ for (int i = 0; i < array.count(); i++)
|
|
|
+ {
|
|
|
const ctkDicomAppHosting::ObjectLocator ol =
|
|
|
ctkDicomSoapObjectLocator::getObjectLocator(array[i]);
|
|
|
list << ol;
|
|
|
- }
|
|
|
+ }
|
|
|
return list;
|
|
|
}
|
|
|
|