comparison Plugins/Engine/OrthancPlugins.cpp @ 1842:697ae8d0e287

better handling of ordered-slices
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Nov 2015 13:16:52 +0100
parents 859224214616
children d10a8164da5f
comparison
equal deleted inserted replaced
1841:5d8134e54c03 1842:697ae8d0e287
1962 } 1962 }
1963 1963
1964 case _OrthancPluginService_GetImageBuffer: 1964 case _OrthancPluginService_GetImageBuffer:
1965 { 1965 {
1966 const _OrthancPluginGetImageInfo& p = *reinterpret_cast<const _OrthancPluginGetImageInfo*>(parameters); 1966 const _OrthancPluginGetImageInfo& p = *reinterpret_cast<const _OrthancPluginGetImageInfo*>(parameters);
1967 *(p.resultBuffer) = reinterpret_cast<const ImageAccessor*>(p.image)->GetBuffer(); 1967 const ImageAccessor& image = reinterpret_cast<const ImageAccessor&>(p.image);
1968
1969 if (image.IsReadOnly())
1970 {
1971 throw OrthancException(ErrorCode_ReadOnly);
1972 }
1973
1974 *(p.resultBuffer) = image.GetBuffer();
1968 return true; 1975 return true;
1969 } 1976 }
1970 1977
1971 case _OrthancPluginService_FreeImage: 1978 case _OrthancPluginService_FreeImage:
1972 { 1979 {