Search found 29 matches
- Sun, 2016-01-17, 20:17
- Forum: DCMTK - General
- Topic: How to get the parent (tree) of an element?
- Replies: 11
- Views: 8670
Re: How to get the parent (tree) of an element?
Michael, nice "howto" but wouldn't the following be much easier (less lines of code and no recursion): DcmStack stack; while (dset->nextObject(stack, OFTrue).good()) COUT << OFString((stack.card() / 2) - 1, '>') << stack.top()->getTag() << " " << DcmVR(stack.top()->getVR()).getV...
- Fri, 2016-01-15, 16:11
- Forum: DCMTK - General
- Topic: How to get the parent (tree) of an element?
- Replies: 11
- Views: 8670
Re: How to get the parent (tree) of an element?
I got it working !!!!!!
1 short question:
How can I get the values of the elements? I want to call getOFStringArray on each element...
1 short question:
How can I get the values of the elements? I want to call getOFStringArray on each element...
- Wed, 2016-01-13, 15:32
- Forum: DCMTK - General
- Topic: How to get the parent (tree) of an element?
- Replies: 11
- Views: 8670
Re: How to get the parent (tree) of an element?
I have read almost all articles on the internet related to my problem, but I cannot find a solution :( My code: DcmObject* parent = pDelem->getParent(); DcmTag tag = parent->getTag(); qDebug() << "TAG: " << tagKey << "PARENT: " << tag.toString().c_str() The output of my code: TAG...
- Wed, 2016-01-13, 15:10
- Forum: DCMTK - General
- Topic: How to get the parent (tree) of an element?
- Replies: 11
- Views: 8670
Re: How to get the parent (tree) of an element?
Actually, there is a getParent() method in DcmObject/Element and derived classes, but I would suggest to read the documentation of DcmItem::nextObject(). Please pay special attention to the "stack" parameter! How do I use getParent in the following context? DcmStack stack; DcmObject *dobj...
- Wed, 2016-01-13, 14:20
- Forum: DCMTK - General
- Topic: How to get the parent (tree) of an element?
- Replies: 11
- Views: 8670
How to get the parent (tree) of an element?
I need to know the parent of each element in order to show all elements in a treeview. How can I get the parent?
- Tue, 2016-01-12, 10:56
- Forum: DCMTK - General
- Topic: How to read dicom tags from dicom file?
- Replies: 9
- Views: 13630
Re: How to read dicom tags from dicom file?
I 'managed' to get the following output (this is not the full output): LEAF: "(0008,0005)" LEAF: "(0008,0016)" LEAF: "(0008,0018)" LEAF: "(0008,0020)" LEAF: "(0008,0021)" LEAF: "(0008,0023)" LEAF: "(0008,0030)" LEAF: "(0008,0...
- Tue, 2016-01-12, 02:23
- Forum: DCMTK - General
- Topic: How to read dicom tags from dicom file?
- Replies: 9
- Views: 13630
Re: How to read dicom tags from dicom file?
Hi Michael, Thank you for your help so far, but unfortunately I have a big problem. I am using DCMTK as part of my schoolproject, but I have no progress for almost a week, because I cannot figure out how to show all tags in an hierarchical tree view. Could you please help me creating some example co...
- Mon, 2016-01-11, 22:17
- Forum: DCMTK - General
- Topic: How to read dicom tags from dicom file?
- Replies: 9
- Views: 13630
Re: How to read dicom tags from dicom file?
Is there a function to get all leaves of a subtree?
- Mon, 2016-01-11, 21:56
- Forum: DCMTK - General
- Topic: How to read dicom tags from dicom file?
- Replies: 9
- Views: 13630
Re: How to read dicom tags from dicom file?
How do I iterate trough all sequences and their child tags? I tried to use nextObject() in combination with getTag(), but it doesn't contain a hierarchy. I am not sure how to devide parents from children tags. What I want to display is +Parent1 +Child +Child ..... +Parent2 +Child +Child etc..... Wha...
- Mon, 2016-01-11, 21:45
- Forum: DCMTK - General
- Topic: How to read dicom tags from dicom file?
- Replies: 9
- Views: 13630
Re: How to read dicom tags from dicom file?
Hi, in the dcmdata documentation you can find example code for loading a file and accessing its dataset. Best, Michael The example you provided doesn't show how to get all tags from a dicom file. It just shows how to get specific tags :S I really need to show all tags in a dicom file, in a TreeView...
- Mon, 2016-01-11, 11:28
- Forum: DCMTK - General
- Topic: How to read dicom tags from dicom file?
- Replies: 9
- Views: 13630
How to read dicom tags from dicom file?
Hi, I want to list all dicom tags of a dicom file in a TreeView(Qt) and I found Joergs Riesmeier's example code : DcmStack stack; DcmObject *dobject = NULL; DcmElement *delem = NULL; OFCondition status = dataset.nextObject(stack, OFTrue); while (status.good()) { dobject = stack.top(); /* do somethin...
- Tue, 2016-01-05, 14:08
- Forum: DCMTK - Installation
- Topic: How to load dictionaries for private and non-private tags?
- Replies: 3
- Views: 8955
Re: How to load dictionaries for private and non-private tag
I want to load dicom.dic and private.dic before loading the DICOM file. How can I do this? My first question would be: Why do you want to load the dictionary file(s) manually? The sample code you've found on StackOverflow is not wrong but if you want to rely on the default dictionary files (determi...
- Sat, 2016-01-02, 21:03
- Forum: DCMTK - Installation
- Topic: How to load dictionaries for private and non-private tags?
- Replies: 3
- Views: 8955
How to load dictionaries for private and non-private tags?
Hi guys, My application uses the following example code to read DICOM files: DcmFileFormat fileformat; OFCondition status = fileformat.loadFile("test.dcm"); if (status.good()) { OFString patientName; if (fileformat.getDataset()->findAndGetOFString(DCM_PatientName, patientName).good()) { co...
- Tue, 2015-12-29, 20:29
- Forum: DCMTK - General
- Topic: How to get notified when C-STORE command has been executed?
- Replies: 8
- Views: 7702
Re: How to get notified when C-STORE command has been execut
I didnt know I had to override the functions that use notifyInstanceStored.
PROBLEM SOLVED, THANK YOU SO MUCH!
PROBLEM SOLVED, THANK YOU SO MUCH!
- Tue, 2015-12-29, 19:31
- Forum: DCMTK - General
- Topic: How to get notified when C-STORE command has been executed?
- Replies: 8
- Views: 7702
Re: How to get notified when C-STORE command has been execut
I tried but there is still something wrong. notifyInstanceStored() in dosescp.cpp is not being called: dstorscp.h: virtual void notifyInstanceStored(const OFString &filename, const OFString &sopClassUID, const OFString &sopInstanceUID, DcmDataset *dataset = NULL) const; dosescp.h: class ...