Encapsulate DVPStoredPrint (please, important, end of practice soon)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
guy
Posts: 41
Joined: Tue, 2004-11-09, 16:55

Encapsulate DVPStoredPrint (please, important, end of practice soon)

#1 Post by guy »

I still have the problem of DVPStoredPrint, maybe it's a question for Marco but if you could give me a solution, don't hesitate!

Below, my problem :

the StoredPrintObject is defined as a private member in the DVInterface class, and I want to encapsulate this class to allow the implementation of Basic Color Image Box (for example the function Read of the DVPStoredPrint class must be redefine to allow RGB Photometric Interpretation).
So, the problem is that in your dcmprscu command line, you use the getPrintHandler function of the DVInterface class to return you a reference on the Stored Print Object (which is a private member).
The function getprintHandler must return a DVPStoredPrint so how to do so that it returns a reference on another class derived form DVPStoredPrint, I explain me below:

I would like to create a new class CEncapsulationStoredPrint which derived for DVPStoredPrint and contains the functions which must be modified such as Read, for the N_SET...

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1461
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#2 Post by Marco Eichelberg »

The anser to this question is rather generic: You need to apply the usual code re-factorization techniques to extract the print specific code from class DVInterface and put that into a separate class. Most of the code is contained in distinct classes anyway, class DVInterface just maintains everything related to the Basic Film Session instance (which is not stored in the Stored Print object) and also acts as a container for the system configuration. The "how to" should be explained in any good textbook on C++.

Post Reply

Who is online

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