comparison Plugins/OrthancCPlugin/OrthancCPlugin.h @ 1069:a91b4900f06a

plugin lookup using accession number
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 28 Jul 2014 11:49:16 +0200
parents f54a9c6fea5d
children 67c3c1e4a6e0
comparison
equal deleted inserted replaced
1068:f54a9c6fea5d 1069:a91b4900f06a
258 _OrthancPluginService_RestApiPut = 3004, 258 _OrthancPluginService_RestApiPut = 3004,
259 _OrthancPluginService_LookupPatient = 3005, 259 _OrthancPluginService_LookupPatient = 3005,
260 _OrthancPluginService_LookupStudy = 3006, 260 _OrthancPluginService_LookupStudy = 3006,
261 _OrthancPluginService_LookupSeries = 3007, 261 _OrthancPluginService_LookupSeries = 3007,
262 _OrthancPluginService_LookupInstance = 3008, 262 _OrthancPluginService_LookupInstance = 3008,
263 _OrthancPluginService_LookupStudyWithAccessionNumber = 3009,
263 264
264 /* Access to DICOM instances */ 265 /* Access to DICOM instances */
265 _OrthancPluginService_GetInstanceRemoteAet = 4000, 266 _OrthancPluginService_GetInstanceRemoteAet = 4000,
266 _OrthancPluginService_GetInstanceSize = 4001, 267 _OrthancPluginService_GetInstanceSize = 4001,
267 _OrthancPluginService_GetInstanceData = 4002, 268 _OrthancPluginService_GetInstanceData = 4002,
870 871
871 /** 872 /**
872 * @brief Look for a patient. 873 * @brief Look for a patient.
873 * 874 *
874 * Look for a patient stored in Orthanc, using its Patient ID tag (0x0010, 0x0020). 875 * Look for a patient stored in Orthanc, using its Patient ID tag (0x0010, 0x0020).
876 * This function uses the database index to run as fast as possible (it does not loop
877 * over all the stored patients).
875 * 878 *
876 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). 879 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
877 * @param patientID The Patient ID of interest. 880 * @param patientID The Patient ID of interest.
878 * @return The NULL value if the patient is non-existent, or a string containing the 881 * @return The NULL value if the patient is non-existent, or a string containing the
879 * Orthanc ID of the patient. This string must be freed by OrthancPluginFreeString(). 882 * Orthanc ID of the patient. This string must be freed by OrthancPluginFreeString().
902 905
903 /** 906 /**
904 * @brief Look for a study. 907 * @brief Look for a study.
905 * 908 *
906 * Look for a study stored in Orthanc, using its Study Instance UID tag (0x0020, 0x000d). 909 * Look for a study stored in Orthanc, using its Study Instance UID tag (0x0020, 0x000d).
910 * This function uses the database index to run as fast as possible (it does not loop
911 * over all the stored studies).
907 * 912 *
908 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). 913 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
909 * @param studyUID The Study Instance UID of interest. 914 * @param studyUID The Study Instance UID of interest.
910 * @return The NULL value if the study is non-existent, or a string containing the 915 * @return The NULL value if the study is non-existent, or a string containing the
911 * Orthanc ID of the study. This string must be freed by OrthancPluginFreeString(). 916 * Orthanc ID of the study. This string must be freed by OrthancPluginFreeString().
931 } 936 }
932 } 937 }
933 938
934 939
935 /** 940 /**
941 * @brief Look for a study, using the accession number.
942 *
943 * Look for a study stored in Orthanc, using its Accession Number tag (0x0008, 0x0050).
944 * This function uses the database index to run as fast as possible (it does not loop
945 * over all the stored studies).
946 *
947 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
948 * @param accessionNumber The Accession Number of interest.
949 * @return The NULL value if the study is non-existent, or a string containing the
950 * Orthanc ID of the study. This string must be freed by OrthancPluginFreeString().
951 **/
952 ORTHANC_PLUGIN_INLINE char* OrthancPluginLookupStudyWithAccessionNumber(
953 OrthancPluginContext* context,
954 const char* accessionNumber)
955 {
956 char* result;
957
958 _OrthancPluginLookupResource params;
959 params.result = &result;
960 params.identifier = accessionNumber;
961
962 if (context->InvokeService(context, _OrthancPluginService_LookupStudyWithAccessionNumber, &params))
963 {
964 /* Error */
965 return NULL;
966 }
967 else
968 {
969 return result;
970 }
971 }
972
973
974 /**
936 * @brief Look for a series. 975 * @brief Look for a series.
937 * 976 *
938 * Look for a series stored in Orthanc, using its Series Instance UID tag (0x0020, 0x000e). 977 * Look for a series stored in Orthanc, using its Series Instance UID tag (0x0020, 0x000e).
978 * This function uses the database index to run as fast as possible (it does not loop
979 * over all the stored series).
939 * 980 *
940 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). 981 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
941 * @param seriesUID The Series Instance UID of interest. 982 * @param seriesUID The Series Instance UID of interest.
942 * @return The NULL value if the series is non-existent, or a string containing the 983 * @return The NULL value if the series is non-existent, or a string containing the
943 * Orthanc ID of the series. This string must be freed by OrthancPluginFreeString(). 984 * Orthanc ID of the series. This string must be freed by OrthancPluginFreeString().
966 1007
967 /** 1008 /**
968 * @brief Look for an instance. 1009 * @brief Look for an instance.
969 * 1010 *
970 * Look for an instance stored in Orthanc, using its SOP Instance UID tag (0x0008, 0x0018). 1011 * Look for an instance stored in Orthanc, using its SOP Instance UID tag (0x0008, 0x0018).
1012 * This function uses the database index to run as fast as possible (it does not loop
1013 * over all the stored instances).
971 * 1014 *
972 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize(). 1015 * @param context The Orthanc plugin context, as received by OrthancPluginInitialize().
973 * @param sopInstanceUID The SOP Instance UID of interest. 1016 * @param sopInstanceUID The SOP Instance UID of interest.
974 * @return The NULL value if the instance is non-existent, or a string containing the 1017 * @return The NULL value if the instance is non-existent, or a string containing the
975 * Orthanc ID of the instance. This string must be freed by OrthancPluginFreeString(). 1018 * Orthanc ID of the instance. This string must be freed by OrthancPluginFreeString().