Skip to content

Conversation

@malaterre
Copy link
Contributor

No description provided.

@jriesmeier
Copy link
Member

What do you mean by "for consistency"? The getOFString() method of derived classes do not use a default value for this parameter.

@malaterre
Copy link
Contributor Author

@jriesmeier I got inspired by the other calls:

% git grep 'pos = 0'
[...]
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getUint8(Uint8 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getSint16(Sint16 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getUint16(Uint16 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getSint32(Sint32 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getUint32(Uint32 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getFloat32(Float32 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getSint64(Sint64 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getUint64(Uint64 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getFloat64(Float64 &val, const unsigned long pos = 0);
dcmdata/include/dcmtk/dcmdata/dcelem.h:    virtual OFCondition getTagVal(DcmTagKey &val, const unsigned long pos = 0);

@jriesmeier
Copy link
Member

I guess this is for historical reasons. In the beginning (~1993), there was no support for OFString (nowadays, std::string), so you always got the complete element value when calling DcmElement::get(char * & val) ...

In any case, we would need to check what the implications of having a default value for the pos parameter of the DcmElement::getOFString() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants