Graphic Object Problem?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ziashahid
Posts: 27
Joined: Thu, 2005-06-30, 07:54

Graphic Object Problem?

#1 Post by ziashahid »

Hi All!

i am using DCMTK 3.5.3 in VC++ 6.0 , which is prividing me great help and support, many many thanks for that.

Now, the problem :

Have a look on the following code:

DcmFileFormat infile;
DVPresentationState pstate;
OFCondition result;
DVPSGraphicObject *grob = new DVPSGraphicObject();
if(infile.loadFile("image.dcm").good())
{

1. DcmDataset *dset = infile.getDataset();
2. result = pstate.createFromImage(*dset);
3. result = pstate.addGraphicLayer("First Layer");
4. grob = pstate.addGraphicObject(0);
......................................
..............

}

after Line No. 2 i have a presentation State Object that is pstate
which contains the following values :

currentImageDataset ------- NULL
currentImageFileFormat ------- NULL
currentImage ------- NULL
previewImage ------- NULL
currentImageWidth ------- 0
...................................................
...................................................

and returns the result = EC_NORMAL, after Line No. 3 result = EC_NORMAL but after execution of Line No. 4 it returns me a NULL , the reason is that pstate contains a value of NULL.

What could be the problem?
Solution is required urgently.


Thanks

Zia

Post Reply

Who is online

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