# HG changeset patch # User Sebastien Jodogne # Date 1403690978 -7200 # Node ID c2c28dd17e87515bcfb4b1fea047930e2dbf8c01 # Parent 67e6400fca0362fd79a5165a5de4f0908b496f47# Parent b3f6fb1130cd60680e954fe055ce74214b18bf57 integration mainline -> query-retrieve diff -r b3f6fb1130cd -r c2c28dd17e87 Core/DicomFormat/DicomMap.cpp --- a/Core/DicomFormat/DicomMap.cpp Wed Jun 25 11:36:41 2014 +0200 +++ b/Core/DicomFormat/DicomMap.cpp Wed Jun 25 12:09:38 2014 +0200 @@ -387,4 +387,32 @@ GetMainDicomTagsInternal(result, ResourceType_Series); GetMainDicomTagsInternal(result, ResourceType_Instance); } + + + void DicomMap::ExtractMainDicomTagsForLevel(DicomMap& result, + ResourceType level) const + { + switch (level) + { + case ResourceType_Patient: + ExtractPatientInformation(result); + break; + + case ResourceType_Study: + ExtractStudyInformation(result); + break; + + case ResourceType_Series: + ExtractSeriesInformation(result); + break; + + case ResourceType_Instance: + ExtractInstanceInformation(result); + break; + + default: + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + } + } diff -r b3f6fb1130cd -r c2c28dd17e87 Core/DicomFormat/DicomMap.h --- a/Core/DicomFormat/DicomMap.h Wed Jun 25 11:36:41 2014 +0200 +++ b/Core/DicomFormat/DicomMap.h Wed Jun 25 12:09:38 2014 +0200 @@ -160,5 +160,8 @@ static void GetMainDicomTags(std::set& result, ResourceType level); static void GetMainDicomTags(std::set& result); + + void ExtractMainDicomTagsForLevel(DicomMap& result, + ResourceType level) const; }; } diff -r b3f6fb1130cd -r c2c28dd17e87 Core/DicomFormat/DicomTag.h --- a/Core/DicomFormat/DicomTag.h Wed Jun 25 11:36:41 2014 +0200 +++ b/Core/DicomFormat/DicomTag.h Wed Jun 25 12:09:38 2014 +0200 @@ -90,6 +90,8 @@ static const DicomTag DICOM_TAG_SERIES_INSTANCE_UID(0x0020, 0x000e); static const DicomTag DICOM_TAG_STUDY_INSTANCE_UID(0x0020, 0x000d); static const DicomTag DICOM_TAG_PIXEL_DATA(0x7fe0, 0x0010); + static const DicomTag DICOM_TAG_STUDY_DESCRIPTION(0x0008, 0x1030); + static const DicomTag DICOM_TAG_SERIES_DESCRIPTION(0x0008, 0x103e); static const DicomTag DICOM_TAG_IMAGE_INDEX(0x0054, 0x1330); static const DicomTag DICOM_TAG_INSTANCE_NUMBER(0x0020, 0x0013); diff -r b3f6fb1130cd -r c2c28dd17e87 OrthancServer/DicomProtocol/DicomUserConnection.cpp diff -r b3f6fb1130cd -r c2c28dd17e87 OrthancServer/OrthancFindRequestHandler.cpp diff -r b3f6fb1130cd -r c2c28dd17e87 OrthancServer/ServerIndex.cpp diff -r b3f6fb1130cd -r c2c28dd17e87 OrthancServer/ServerIndex.h diff -r b3f6fb1130cd -r c2c28dd17e87 OrthancServer/main.cpp --- a/OrthancServer/main.cpp Wed Jun 25 11:36:41 2014 +0200 +++ b/OrthancServer/main.cpp Wed Jun 25 12:09:38 2014 +0200 @@ -459,6 +459,29 @@ LOG(WARNING) << "The DICOM server is disabled"; } + + { + DicomUserConnection c; + c.SetLocalApplicationEntityTitle("ORTHANC"); + c.SetDistantApplicationEntityTitle("ORTHANC"); + c.SetDistantHost("localhost"); + c.SetDistantPort(4343); + c.Open(); + + DicomMap m; // Delphine + m.SetValue(DICOM_TAG_PATIENT_ID, "5423962"); + m.SetValue(DICOM_TAG_STUDY_INSTANCE_UID, "1.2.840.113845.11.1000000001951524609.20121203131451.1457891"); + m.SetValue(DICOM_TAG_SERIES_INSTANCE_UID, "1.2.840.113619.2.278.3.262930758.589.1354512768.115"); + m.SetValue(DICOM_TAG_SOP_INSTANCE_UID, "1.3.12.2.1107.5.2.33.37097.2012041613043195815872177"); + + DicomFindAnswers fnd; + c.FindInstance(fnd, m); + //c.FindSeries(fnd, m); + + printf("ok %d\n", fnd.GetSize()); + } + + LOG(WARNING) << "Orthanc has started"; Toolbox::ServerBarrier();