Mercurial > hg > orthanc-stl
comparison Sources/Plugin.cpp @ 31:ab231760799d
added button to import STL
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Apr 2024 18:05:13 +0200 |
parents | 3570c23764d4 |
children | 976da5476810 |
comparison
equal
deleted
inserted
replaced
30:3570c23764d4 | 31:ab231760799d |
---|---|
1885 { | 1885 { |
1886 OrthancPlugins::RegisterRestCallback<EncodeStructureSet>("/stl/encode-rtstruct", true); | 1886 OrthancPlugins::RegisterRestCallback<EncodeStructureSet>("/stl/encode-rtstruct", true); |
1887 OrthancPlugins::RegisterRestCallback<EncodeNifti>("/stl/encode-nifti", true); | 1887 OrthancPlugins::RegisterRestCallback<EncodeNifti>("/stl/encode-nifti", true); |
1888 } | 1888 } |
1889 | 1889 |
1890 OrthancPlugins::OrthancConfiguration globalConfiguration; | |
1891 OrthancPlugins::OrthancConfiguration configuration; | |
1892 globalConfiguration.GetSection(configuration, "STL"); | |
1893 | |
1890 // Extend the default Orthanc Explorer with custom JavaScript for STL | 1894 // Extend the default Orthanc Explorer with custom JavaScript for STL |
1891 std::string explorer; | 1895 std::string explorer; |
1892 | 1896 |
1893 { | 1897 { |
1894 Orthanc::EmbeddedResources::GetFileResource(explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER); | 1898 Orthanc::EmbeddedResources::GetFileResource(explorer, Orthanc::EmbeddedResources::ORTHANC_EXPLORER); |
1895 | 1899 |
1896 std::map<std::string, std::string> dictionary; | 1900 std::map<std::string, std::string> dictionary; |
1897 dictionary["HAS_CREATE_DICOM_STL"] = (hasCreateDicomStl_ ? "true" : "false"); | 1901 dictionary["HAS_CREATE_DICOM_STL"] = (hasCreateDicomStl_ ? "true" : "false"); |
1902 dictionary["SHOW_NIFTI_BUTTON"] = (configuration.GetBooleanValue("NIfTI", false) ? "true" : "false"); | |
1898 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); | 1903 explorer = Orthanc::Toolbox::SubstituteVariables(explorer, dictionary); |
1899 | 1904 |
1900 OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer); | 1905 OrthancPlugins::ExtendOrthancExplorer(ORTHANC_PLUGIN_NAME, explorer); |
1901 } | 1906 } |
1902 | 1907 |