+//-----------------------------------------------------------------------------
+// Public
+void JPEGFragmentsInfo::DecompressFromFile(std::ifstream *fp, uint8_t *buffer, int nBits, int , int )
+{
+ // Pointer to the Raw image
+ uint8_t *localRaw = buffer;
+
+ // Loop on the fragment[s]
+ JPEGFragmentsList::const_iterator it;
+ for( it = Fragments.begin();
+ it != Fragments.end();
+ ++it )
+ {
+ (*it)->DecompressJPEGFramesFromFile(fp, localRaw, nBits, StateSuspension);
+ // update pointer to image after some scanlines read:
+ localRaw = (*it)->GetImage();
+ }
+}
+
+void JPEGFragmentsInfo::AddFragment(JPEGFragment *fragment)
+{
+ Fragments.push_back(fragment);
+}
+
+JPEGFragment *JPEGFragmentsInfo::GetFirstFragment()
+{
+ ItFragments = Fragments.begin();
+ if (ItFragments != Fragments.end())
+ return *ItFragments;
+ return NULL;
+}
+
+JPEGFragment *JPEGFragmentsInfo::GetNextFragment()
+{
+ gdcmAssertMacro (ItFragments != Fragments.end());
+
+ ++ItFragments;
+ if (ItFragments != Fragments.end())
+ return *ItFragments;
+ return NULL;
+}
+
+unsigned int JPEGFragmentsInfo::GetFragmentCount()
+{
+ return Fragments.size();
+}
+
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
+
+//-----------------------------------------------------------------------------
+// Print