本文整理汇总了C++中ImageList类的典型用法代码示例。如果您正苦于以下问题:C++ ImageList类的具体用法?C++ ImageList怎么用?C++ ImageList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ImageList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vecLeafBoxOuterJacket
// Return a minimal subpaving representing the finest common
// level of nodes between two subpavings.
// ie the 'outer jacket' that is the finest subpaving that fits
// both of the inner subpavings
SPMinimalnode* SPMinimalnode::spLeafBoxOuterJacket(const SPMinimalnode * const spn1,
const SPMinimalnode * const spn2)
{
SPMinimalnode* jacketSP = NULL;
try {
BoxVec jacketBoxes;
jacketBoxes = vecLeafBoxOuterJacket(jacketBoxes,
spn1, spn2);
if (!jacketBoxes.empty()) {
ImageList listBoxes;
listBoxes.insert(listBoxes.end(), jacketBoxes.begin(),
jacketBoxes.end());
ivector root = spn1->getBox();
jacketSP = makeTreeFromLeaves(root, listBoxes);
if (jacketSP != NULL) {
jacketSP->setNodeName("X");
jacketSP->recursiveRename();
}
}
return jacketSP;
}
catch(std::exception const& e) {
delete jacketSP;
jacketSP = NULL;
throw;
}
}
示例2:
mitk::TestDICOMLoading::ImageList mitk::TestDICOMLoading::LoadFiles( const StringContainer& files )
{
for (StringContainer::const_iterator iter = files.begin();
iter != files.end();
++iter)
{
MITK_DEBUG << "File " << *iter;
}
ImageList result;
DicomSeriesReader::FileNamesGrouping seriesInFiles = DicomSeriesReader::GetSeries( files, true );
// TODO sort series UIDs, implementation of map iterator might differ on different platforms (or verify this is a standard topic??)
for (DicomSeriesReader::FileNamesGrouping::const_iterator seriesIter = seriesInFiles.begin();
seriesIter != seriesInFiles.end();
++seriesIter)
{
StringContainer files = seriesIter->second.GetFilenames();
DataNode::Pointer node = DicomSeriesReader::LoadDicomSeries( files );
if (node.IsNotNull())
{
Image::Pointer image = dynamic_cast<mitk::Image*>( node->GetData() );
result.push_back( image );
}
else
{
}
}
return result;
}
示例3: vecLeafBoxDifference
//Return a subpaving representing the difference between subpavings.
SPMinimalnode* SPMinimalnode::spLeafBoxDifference(const SPMinimalnode * const spn1,
const SPMinimalnode * const spn2)
{
SPMinimalnode* diffSP = NULL;
try {
BoxVec diffBoxes;
diffBoxes = vecLeafBoxDifference(diffBoxes, spn1, spn2);
if (!diffBoxes.empty()) {
ImageList listBoxes;
listBoxes.insert(listBoxes.end(), diffBoxes.begin(),
diffBoxes.end());
ivector root = spn1->getBox();
diffSP = makeTreeFromLeaves(root, listBoxes);
if (diffSP != NULL) {
diffSP->setNodeName("X");
diffSP->recursiveRename();
}
}
return diffSP;
}
catch(std::exception const& e) {
delete diffSP;
diffSP = NULL;
throw;
}
}
示例4: vecLeafBoxIntersection
//Return a subpaving representing intersection of subpavings.
SPMinimalnode* SPMinimalnode::spLeafBoxIntersection(const SPMinimalnode * const spn1,
const SPMinimalnode * const spn2)
{
SPMinimalnode* interSP = NULL;
try {
BoxVec interBoxes;
interBoxes = vecLeafBoxIntersection(interBoxes,
spn1, spn2);
if (!interBoxes.empty()) {
ImageList listBoxes;
listBoxes.insert(listBoxes.end(), interBoxes.begin(),
interBoxes.end());
ivector root = spn1->getBox();
interSP = makeTreeFromLeaves(root, listBoxes);
if (interSP != NULL) {
interSP->setNodeName("X");
interSP->recursiveRename();
}
}
return interSP;
}
catch(std::exception const& e) {
delete interSP;
interSP = NULL;
throw;
}
}
示例5:
mitk::TestDICOMLoading::ImageList
mitk::TestDICOMLoading
::LoadFiles( const StringList& files )
{
for (auto iter = files.begin();
iter != files.end();
++iter)
{
MITK_DEBUG << "File " << *iter;
}
ImageList result;
ClassicDICOMSeriesReader::Pointer reader = this->BuildDICOMReader();
reader->SetInputFiles( files );
reader->AnalyzeInputFiles();
reader->PrintOutputs(std::cout,true);
reader->LoadImages();
unsigned int numberOfImages = reader->GetNumberOfOutputs();
for (unsigned imageIndex = 0; imageIndex < numberOfImages; ++imageIndex)
{
const DICOMImageBlockDescriptor& block = reader->GetOutput(imageIndex);
result.push_back( block.GetMitkImage() );
}
return result;
}
示例6: HandleGetMetadata
/*!
\brief Gets meta data for an image
\details Reads exif tags from a picture or FFMPEG video tags
\param id Image id
\return QStringList Error message or "OK", seperator,
list of <tag name><seperator><tag value>.
Clients must use the embedded seperator to extract the data.
*/
QStringList ImageHandler::HandleGetMetadata(QString id)
{
// Find image in DB
ImageDbWriter db;
ImageList images;
db.ReadDbFilesById(images, id);
// Either single id not found or multiple comma-delimited ids received
if (images.size() != 1)
{
LOG(VB_FILE, LOG_NOTICE,
QString("Image: Image %1 not found in Db").arg(id));
qDeleteAll(images);
return QStringList("ERROR") << "Unknown File";
}
// Read all metadata tags
ImageMetaData::TagMap tags;
QStringList result;
if (ImageMetaData::GetMetaData(images[0], tags))
{
// Each property is described by a pair of <tagvalue> : <taglabel>
// Combine label/value using a (hopefully unique) delimiter
// to return 1 string per property.
const QString seperator = ":|-|:";
result << "OK" << seperator;
foreach (const ImageMetaData::TagPair value, tags)
{
result.append(QString("%1%2%3")
.arg(value.second).arg(seperator).arg(value.first));
}
}
示例7: ImageList
//-----------------------------------------------------------------------------
// Purpose: sets up screen
//-----------------------------------------------------------------------------
void CClientScoreBoardDialog::ApplySchemeSettings( IScheme *pScheme )
{
BaseClass::ApplySchemeSettings( pScheme );
ImageList *imageList = new ImageList(false);
// s_VoiceImage[0] = 0; // index 0 is always blank
// s_VoiceImage[CVoiceStatus::VOICE_NEVERSPOKEN] = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_speaker1", true));
// s_VoiceImage[CVoiceStatus::VOICE_NOTTALKING] = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_speaker2", true));
// s_VoiceImage[CVoiceStatus::VOICE_TALKING] = imageList->AddImage(scheme()->GetImage( "gfx/vgui/640_speaker3", true));
// s_VoiceImage[CVoiceStatus::VOICE_BANNED] = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_voiceblocked", true));
// TrackerImage = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_scoreboardtracker", true));
// resize the images to our resolution
for (int i = 0; i < imageList->GetImageCount(); i++ )
{
int wide, tall;
imageList->GetImage(i)->GetSize(wide, tall);
imageList->GetImage(i)->SetSize(scheme()->GetProportionalScaledValueEx( GetScheme(),wide), scheme()->GetProportionalScaledValueEx( GetScheme(),tall));
}
m_pPlayerList->SetImageList(imageList, false);
m_pPlayerList->SetVisible( true );
// light up scoreboard a bit
SetBgColor( Color( 0,0,0,0) );
}
示例8: widget
/**
* This is a very basic functionality test.
*/
void MosaicSceneWidgetTester::testBasicFunctionality() {
QStatusBar status;
MosaicSceneWidget widget(&status, true, true, NULL);
widget.show();
QTest::qWaitForWindowShown(&widget);
QVERIFY(widget.getProgress());
QVERIFY(widget.getView());
QVERIFY(widget.getScene());
QVERIFY(widget.getProjection() == NULL);
Image *image = new Image(QString("./lub3994m.342.lev1.cub"));
QScopedPointer<QMutex> cameraMutex(new QMutex);
image->initFootprint(cameraMutex.data());
ImageList images;
images.append(image);
widget.addImages(images);
QCOMPARE(widget.allMosaicSceneItems().count(), 1);
QCOMPARE(image, widget.allMosaicSceneItems().first()->image());
QVERIFY(widget.cubesSelectable());
// Check that the bounding rect is approx. the same
QRectF expected(QPointF(2376269.37351469, -964957.418535598), QSize(109739.587494429, 48049.2250501961));
QVERIFY(qAbs(widget.cubesBoundingRect().top() - expected.top()) < 0.0001);
QVERIFY(qAbs(widget.cubesBoundingRect().left() - expected.left()) < 0.0001);
QVERIFY(qAbs(widget.cubesBoundingRect().bottom() - expected.bottom()) < 1);
QVERIFY(qAbs(widget.cubesBoundingRect().right() - expected.right()) < 1);
}
示例9: update
/*----------------------------------------------------------------------------------------------------*/
void Imaging::update() {
ImageList images = mLeapData.getController().images();
int imageCount = images.count();
int64 currSecond = duration_cast<seconds>(system_clock::now().time_since_epoch()).count();
bool sendDistortion = (currSecond >= mNextDistortionSecond);
if ( sendDistortion ) {
mNextDistortionSecond = currSecond+2; //send every X seconds
}
if ( imageCount > 2 ) {
std::cout << "This plugin does not support more than two Leap Motion images." << std::endl;
imageCount = 2;
}
for ( int i = 0 ; i < imageCount ; i++ ) {
Image image = images[i];
sendCameraImage(image);
if ( sendDistortion ) {
sendDistortionImage(image);
}
}
}
示例10: pv
void pv(const ImageList &images)
{
cout << "[ ";
for (ImageList::const_iterator i = images.begin(); i != images.end(); ++i)
{
std::cout << i->filename() << ' ';
}
cout << "]" << endl;
}
示例11: LoadPreprocessedFiles
static ImageList LoadPreprocessedFiles(FileList files)
{
ImageList images;
for (unsigned int i=0; i < files.size() ; ++i)
{
images.push_back(mitk::IOUtil::LoadImage(files.at(i)));
}
return images;
}
示例12: ImageList
//-----------------------------------------------------------------------------
// Purpose: lays out controls
//-----------------------------------------------------------------------------
void DirectorySelectDialog::ApplySchemeSettings(IScheme *pScheme)
{
ImageList *imageList = new ImageList(false);
imageList->AddImage(scheme()->GetImage("Resource/icon_folder", false));
imageList->AddImage(scheme()->GetImage("Resource/icon_folder_selected", false));
m_pDirTree->SetImageList(imageList, true);
BaseClass::ApplySchemeSettings(pScheme);
}
示例13: IsProportional
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseGamesPage::ApplySchemeSettings(IScheme *pScheme)
{
BaseClass::ApplySchemeSettings(pScheme);
m_pGameList->SetFont(pScheme->GetFont("DefaultSmall", IsProportional()));
// load the password icon
ImageList *imageList = new ImageList(false);
s_PasswordImage[0] = 0; // index 0 is always blank
s_PasswordImage[1] = imageList->AddImage(scheme()->GetImage("servers/icon_password", false));
m_pGameList->SetImageList(imageList, true);
m_pGameList->SetVisible( true );
}
示例14: ImageList
//-----------------------------------------------------------------------------
// Purpose: Apply scheme settings
//-----------------------------------------------------------------------------
void PerforceFileList::ApplySchemeSettings(IScheme *pScheme)
{
BaseClass::ApplySchemeSettings( pScheme );
ImageList *pImageList = new ImageList( false );
pImageList->AddImage( scheme()->GetImage( "resource/icon_file", false ) );
pImageList->AddImage( scheme()->GetImage( "resource/icon_folder", false ) );
pImageList->AddImage( scheme()->GetImage( "resource/icon_folder_selected", false ) );
SetImageList( pImageList, true );
}
示例15: main
int main(int argc, char* argv[])
{
ImageList iml;
if (argc != 2) {
printf("supply a target directory\n");
return 0;
}
LoadImageListing(&iml, argv[1]);
iml.generateFeatures();
iml.computeMatches();
iml.sequentialReconstruct();
}