Maybe a bug in DicomImage?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
liuxinming
Posts: 83
Joined: Thu, 2009-03-19, 04:19

Maybe a bug in DicomImage?

#1 Post by liuxinming »

I' m using the v3.6.2 to develop my own application. But I discovered that sometimes the processNextFrames failed abnormally. Say there are two functions in my codes: func1 and func2, in func1 a DicomImage object has been dynamically created, and in func2 the method processNextFrames is called to access the frames one by one. The processNextFrames always returns FALSE whereas it succeeds in func1.

I' m not sure that if it is the correct usage of processNextFrames, but maybe something related to the memory allocation in stacks.

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Maybe a bug in DicomImage?

#2 Post by J. Riesmeier »

Could you please provide a little sample program (i.e. code fragment) that demonstrates this behavior.

liuxinming
Posts: 83
Joined: Thu, 2009-03-19, 04:19

Re: Maybe a bug in DicomImage?

#3 Post by liuxinming »

Very very simple:

Code: Select all

{
...
     func1();
     func2();
...
}
In func1: DicomImage *pdi=new DicomImage(...,0,1);
In func2: pdi->processNextFrames();

BTW, pdi is a global variable which can accessed by func1 and func2.

J. Riesmeier
DCMTK Developer
Posts: 2505
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Maybe a bug in DicomImage?

#4 Post by J. Riesmeier »

Unfortunately, this does not answer my question, e.g. do you pass CIF_UsePartialAccessToPixelData to the DicomImage constructor? Here is the corresponding Howto: https://support.dcmtk.org/redmine/proje ... Multiframe

liuxinming
Posts: 83
Joined: Thu, 2009-03-19, 04:19

Re: Maybe a bug in DicomImage?

#5 Post by liuxinming »

do you pass CIF_UsePartialAccessToPixelData to the DicomImage constructor
Sorry for my carelessness. Yes, I use this flag without any other one.

Now, I' ve discovered that when the two functions are in a dll, and they are called by the same caller, the processNextFrames always return FALSE in func2

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest