Skip to content

Commit

Permalink
MD-350
Browse files Browse the repository at this point in the history
  • Loading branch information
rossetantoine committed May 20, 2013
1 parent 8ae64de commit feadd32
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Binaries/dcmtk-source/dcmimgle/diinpxt.h
Expand Up @@ -451,6 +451,10 @@ class DiInputPixelTemplate
*(q++) = OFstatic_cast(T2, *p & mask);
*(q++) = OFstatic_cast(T2, *p >> bitsAllocated);
}

/* check for additional input pixel (in case of odd length when using partial access) */
if (length_T1 * 2 /* times */ < length_Bytes)
*(q++) = OFstatic_cast(T2, *p & mask);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion Binaries/dcmtk-source/dcmimgle/dimoimg.cc
Expand Up @@ -1791,7 +1791,7 @@ unsigned int DiMonoImage::createAWTBitmap(void *&data,
(value << 16) |
(value << 8); // copy to the three RGB-planes
}
bytes = count;
bytes = count*4;
}
}
deleteOutputData(); // output data is no longer needed
Expand Down
4 changes: 2 additions & 2 deletions Binaries/dcmtk-source/dcmimgle/discalet.h
Expand Up @@ -839,7 +839,7 @@ class DiScaleTemplate
ey = y_factor * (OFstatic_cast(double, y) + 1.0);
byi = OFstatic_cast(int, by);
eyi = OFstatic_cast(int, ey);
if (OFstatic_cast(double, eyi) == ey)
if (ey - OFstatic_cast(double, eyi) < 0.00001)
--eyi;
b_factor = 1 + OFstatic_cast(double, byi) - by;
t_factor = ey - OFstatic_cast(double, eyi);
Expand All @@ -850,7 +850,7 @@ class DiScaleTemplate
ex = x_factor * (OFstatic_cast(double, x) + 1.0);
bxi = OFstatic_cast(int, bx);
exi = OFstatic_cast(int, ex);
if (OFstatic_cast(double, exi) == ex)
if (ex - OFstatic_cast(double, exi) < 0.00001)
--exi;
l_factor = 1 + OFstatic_cast(double, bxi) - bx;
r_factor = ex - OFstatic_cast(double, exi);
Expand Down
13 changes: 11 additions & 2 deletions Binaries/dcmtk-source/dcmnet/assoc.cc
Expand Up @@ -1577,10 +1577,19 @@ ASC_receiveAssociation(T_ASC_Network * network,
if (cond.bad()) return cond;

cond = ASC_setTransportLayerType(params, useSecureLayer);
if (cond.bad()) return cond;
if (cond.bad())
{
ASC_destroyAssociationParameters(&params);
return cond;
}

*assoc = (T_ASC_Association *) calloc(sizeof(**assoc), 1);
if (*assoc == NULL) return EC_MemoryExhausted;
if (*assoc == NULL)
{
ASC_destroyAssociationParameters(&params);
return EC_MemoryExhausted;
}

bzero((char*)*assoc, sizeof(**assoc));

(*assoc)->params = params;
Expand Down
2 changes: 1 addition & 1 deletion Binaries/dcmtk-source/dcmqrdb/dcmqrsrv.mm
Expand Up @@ -1324,7 +1324,7 @@ static void storeCallback(
cond = ASC_acceptContextsWithPreferredTransferSyntaxes(
assoc->params,
dcmAllStorageSOPClassUIDs, numberOfAllDcmStorageSOPClassUIDs,
(const char**)transferSyntaxes, DIM_OF(transferSyntaxes));
(const char**)transferSyntaxes, nTS);
if (cond.bad()) {
DcmQueryRetrieveOptions::errmsg("Cannot accept presentation contexts:");
DimseCondition::dump(cond);
Expand Down

0 comments on commit feadd32

Please sign in to comment.