Undefined attributes are used in DICOM for both SQ tags, and for Pixel Data (7fe0,0010). In both cases, The chunks of data can be encoded using one more more Item Tags (FFFE,E000), and the end of the attribute is signaled by the Sequence Delimitation Item (FFFE,E0DD).
In the case of Pixel Data, each fragment of pixel data is encoded with an Item Tag (FFFE,E000). Each fragment of pixel data is encoded as a fixed length. Each frame of the pixel data can be composed of one or more fragments of pixel data. The first Item Tag encoded in the pixel data is a basic offset table. If a frame is encoded with more than one fragment, this offset table will tell the offset within the pixel data of each frame. If the offset table is zero length, then each frame is encoded in single fragment. You can see an example of the encoding in DICOM Part 5, Table A.4-1. In any case, you should be able to parse the contents of the pixel data by repeatedly reading 8 bytes of pixel data to get the Item Tag/Sequence Delimiter Item + the length of each fragment, then reading the actual number of bytes specified by the length, and repeating.
You can see an example for SQ attribute encoding in Part 5 of DICOM, Table 7.5-2 and Table 7.5-3. This works in a similar fashion, with the exception that the length associated with an item tag could be "undefined length". In the case of Sequences, however, you can keep parsing the contents of the sequences, since they're just tag data anyways.