Mercurial > hg > orthanc
changeset 758:67e6400fca03 query-retrieve
integration mainline -> query-retrieve
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Apr 2014 16:34:09 +0200 |
parents | 3bdb5db8e839 (diff) 40d09221077a (current diff) |
children | c2c28dd17e87 |
files | Core/DicomFormat/DicomMap.cpp Core/DicomFormat/DicomMap.h Core/DicomFormat/DicomTag.h OrthancCppClient/SharedLibrary/Laaw/laaw-exports.h OrthancCppClient/SharedLibrary/Laaw/laaw.h OrthancServer/DicomProtocol/DicomUserConnection.cpp OrthancServer/OrthancFindRequestHandler.cpp OrthancServer/OrthancRestApi.cpp OrthancServer/OrthancRestApi.h OrthancServer/ServerIndex.cpp OrthancServer/ServerIndex.h OrthancServer/main.cpp UnitTestsSources/ServerIndex.cpp UnitTestsSources/main.cpp |
diffstat | 4 files changed, 56 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/DicomFormat/DicomMap.cpp Wed Apr 16 12:12:55 2014 +0200 +++ b/Core/DicomFormat/DicomMap.cpp Wed Apr 16 16:34:09 2014 +0200 @@ -386,4 +386,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); + } + } + }
--- a/Core/DicomFormat/DicomMap.h Wed Apr 16 12:12:55 2014 +0200 +++ b/Core/DicomFormat/DicomMap.h Wed Apr 16 16:34:09 2014 +0200 @@ -160,5 +160,8 @@ static void GetMainDicomTags(std::set<DicomTag>& result, ResourceType level); static void GetMainDicomTags(std::set<DicomTag>& result); + + void ExtractMainDicomTagsForLevel(DicomMap& result, + ResourceType level) const; }; }
--- a/Core/DicomFormat/DicomTag.h Wed Apr 16 12:12:55 2014 +0200 +++ b/Core/DicomFormat/DicomTag.h Wed Apr 16 16:34:09 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);
--- a/OrthancServer/main.cpp Wed Apr 16 12:12:55 2014 +0200 +++ b/OrthancServer/main.cpp Wed Apr 16 16:34:09 2014 +0200 @@ -433,6 +433,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();