- Fixed amorstatus collapse for large image sizes

This commit is contained in:
koennecke
2007-09-05 11:16:22 +00:00
parent 2ffaa4828a
commit b59af433e4

View File

@ -591,23 +591,31 @@
}
else if(self->iHTTP == 1)
{
snprintf(hmCommand,255,"sum:2:0:%d",iDim[2]);
if(self->pHM->pDriv->SubSample != NULL){
data = self->pHM->pDriv->SubSample(self->pHM->pDriv,pCon,0,hmCommand);
if(i3 > 2){
snprintf(hmCommand,255,"sum:2:0:%d",iDim[2]);
if(self->pHM->pDriv->SubSample != NULL){
data = self->pHM->pDriv->SubSample(self->pHM->pDriv,pCon,0,hmCommand);
} else {
data = NULL;
}
if(data == NULL)
{
SCWrite(pCon,"ERROR: failed to retrieve collapsed data from HM", eError);
return 0;
}
for(i = 2; i < length; i++)
{
iImage[i] = htonl(data[i-1]);
}
free(data);
} else {
data = NULL;
GetHistogramDirect(self->pHM,pCon,0,0,length-2,
&iImage[2], length*sizeof(HistInt));
for(i = 2; i < length; i++)
{
iImage[i] = htonl(iImage[i]);
}
}
if(data == NULL)
{
SCWrite(pCon,"ERROR: failed to retrieve collapsed data from HM", eError);
return 0;
}
for(i = 2; i < length; i++)
{
iImage[i] = htonl(data[i-1]);
}
free(data);
}
else
{