Estimated bug "Count" and "count"

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
m-ishihara
Posts: 40
Joined: Thu, 2008-09-18, 09:20
Location: Japan

Estimated bug "Count" and "count"

#1 Post by m-ishihara »

Hi DICOM @ OFFIS,

Thank you for your cooperation.
Recently, I realised the estimated bug in diluptab.cxx.
At DiLookupTable::checkTable method in diluptab.cxx, there are different variables, one is "count" variable which means value multiplicity of Lut table and the other is "Count" which means table entry of Lut.
Then, there is a statement "if (count == ((Count + 1) >> 1))", which means if "count" variable is "Count" variable plus one, it is true.
I think "count" variable has nothing to do with "Count" variable, so it ends up with wrong result.
So, I assume the statement is bug.

What do you think of it?
please tell me your idea.

Thanks,
Maty

m-ishihara
Posts: 40
Joined: Thu, 2008-09-18, 09:20
Location: Japan

#2 Post by m-ishihara »

Hi DICOM @ OFFIS,

I'm sorry I made a slightt mistake in the my opinion above.
((Count + 1) >> 1) means a bit left shift of "(Count + 1)" exactly.
Anyway, the statement is not correct.
I think it is bug.

What do you think of it?
Maty

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#3 Post by Jörg Riesmeier »

If you are talking about the following code lines, I don't think that they are incorrect:

Code: Select all

if (count != Count)                               // length of LUT differs from number of LUT entries
{
    if (count == ((Count + 1) >> 1))              // bits allocated 8, ignore padding
    {
What is the reason for you to think that this is not correct?

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest