Mercurial > hg > orthanc
changeset 947:c2c28dd17e87 query-retrieve
integration mainline -> query-retrieve
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 25 Jun 2014 12:09:38 +0200 |
parents | 67e6400fca03 (diff) b3f6fb1130cd (current diff) |
children | f894be6e7cc1 |
files | Core/DicomFormat/DicomMap.cpp Core/DicomFormat/DicomTag.h Core/FileFormats/PngReader.cpp Core/FileFormats/PngReader.h Core/FileFormats/PngWriter.cpp Core/FileFormats/PngWriter.h OrthancServer/DicomProtocol/DicomUserConnection.cpp OrthancServer/OrthancFindRequestHandler.cpp OrthancServer/ServerIndex.cpp OrthancServer/main.cpp |
diffstat | 4 files changed, 56 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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); + } + } + }
--- 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<DicomTag>& result, ResourceType level); static void GetMainDicomTags(std::set<DicomTag>& result); + + void ExtractMainDicomTagsForLevel(DicomMap& result, + ResourceType level) const; }; }
--- 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);
--- 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();