Hi,
This is a continuation of a dead post. I need to make a pixel map where
I can store pixel data for multiple images. Multiple windows in my app
may render the same image, so I want to keep one copy of the pixel data
and that's it (rather than multiple copies). Every image has a unique
StudyID, SeriesID, and then ImageID. So, I created a std::map that
looks like this:
struct ImageSink {
vector<BYTEvPix ;
};
struct SeriesSink {
map<CString, ImageSinkmImage s;
};
struct StudySink {
map<CString, SeriesSinkmSeri es;
};
class CDatasetPixelMa p {
public:
CDatasetPixelMa p();
~CDatasetPixelM ap();
// This contains all the pixel buffers which can be looked
up.
map<CString, StudySinkm_Data setPixelMap;
vector<BYTE*Get PixelPointer(id ,id,id);
}
Now I can get a pointer to the pixel data like:
vector<BYTE*CDa tasetPixelMap:: GetPixelPointer (id, id, id)
{
return
&m_DatasetPixel Map[strStudyID].mSeries[strSeriesID].mImages[strImgID].vPix;
}
Is that complelety ridiculous? I'm worried about lookup speed (finding
the appropriate pixel buffer in the map with the 3 keys). But that
should be pretty fast right? Any ideas if this would be terribly slow?
Thanks,
Mark
This is a continuation of a dead post. I need to make a pixel map where
I can store pixel data for multiple images. Multiple windows in my app
may render the same image, so I want to keep one copy of the pixel data
and that's it (rather than multiple copies). Every image has a unique
StudyID, SeriesID, and then ImageID. So, I created a std::map that
looks like this:
struct ImageSink {
vector<BYTEvPix ;
};
struct SeriesSink {
map<CString, ImageSinkmImage s;
};
struct StudySink {
map<CString, SeriesSinkmSeri es;
};
class CDatasetPixelMa p {
public:
CDatasetPixelMa p();
~CDatasetPixelM ap();
// This contains all the pixel buffers which can be looked
up.
map<CString, StudySinkm_Data setPixelMap;
vector<BYTE*Get PixelPointer(id ,id,id);
}
Now I can get a pointer to the pixel data like:
vector<BYTE*CDa tasetPixelMap:: GetPixelPointer (id, id, id)
{
return
&m_DatasetPixel Map[strStudyID].mSeries[strSeriesID].mImages[strImgID].vPix;
}
Is that complelety ridiculous? I'm worried about lookup speed (finding
the appropriate pixel buffer in the map with the 3 keys). But that
should be pretty fast right? Any ideas if this would be terribly slow?
Thanks,
Mark
Comment