本文整理汇总了C++中CheckSum::OutputCheckSum方法的典型用法代码示例。如果您正苦于以下问题:C++ CheckSum::OutputCheckSum方法的具体用法?C++ CheckSum::OutputCheckSum怎么用?C++ CheckSum::OutputCheckSum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CheckSum
的用法示例。
在下文中一共展示了CheckSum::OutputCheckSum方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
PNMreader reader(argv[1]);
Crop crop;
crop.SetRegion(300, 1400, 50, 400);
crop.SetInput(reader.GetOutput());
Transpose t;
t.SetInput(crop.GetOutput());
Invert i;
i.SetInput(t.GetOutput());
Color color(50, 1101, 0, 0, 128);
LRConcat lr;
lr.SetInput(color.GetOutput());
lr.SetInput2(i.GetOutput());
Color white(401, 1101, 255, 255, 255);
Checkerboard cb;
cb.SetInput(lr.GetOutput());
cb.SetInput2(white.GetOutput());
cb.GetOutput()->Update();
PNMwriter writer;
writer.SetInput(cb.GetOutput());
writer.Write(argv[2]);
CheckSum cs;
cs.SetInput(cb.GetOutput());
cs.OutputCheckSum();
Logger::Finalize();
}
示例2: main
int main(int argc, char *argv[])
{
if (argc < 2)
{
cerr << "Usage: " << argv[0] << " <username>" << endl;
exit(EXIT_FAILURE);
}
char event[1024];
sprintf(event, "Entered program from %s\n", argv[1]);
Logger::LogEvent(event);
/* START STUDENT MODIFIABLE SECTION */
PNMreader reader("../images/puddles.pnm");
Shrinker shrinker1;
Shrinker shrinker2;
LRConcat lrconcat1;
LRConcat lrconcat2;
TBConcat tbconcat1;
TBConcat tbconcat2;
Checkerboard blender;
shrinker1.SetInput(reader.GetOutput());
shrinker2.SetInput2(shrinker1.GetOutput());
lrconcat1.SetInput(shrinker1.GetOutput());
lrconcat1.SetInput2(shrinker2.GetOutput());
tbconcat1.SetInput(shrinker1.GetOutput());
tbconcat2.SetInput2(shrinker2.GetOutput());
blender.SetInput(reader.GetOutput());
blender.SetInput2(tbconcat1.GetOutput());
/* Make the image "finalImage" be the image at
the bottom of your pipeline */
Image *finalImage = blender.GetOutput();
/* END STUDENT MODIFIABLE SECTION */
try
{
finalImage->Update();
}
catch (DataFlowException &)
{
ofstream ofile("my_exception");
if (ofile.fail())
{
cerr << "Something is wrong ... can't open my_exception"
<< " for opening" << endl;
exit(EXIT_FAILURE);
}
ofile << "Exception found!" << endl;
exit(EXIT_SUCCESS);
}
CheckSum cs;
cs.SetInput(finalImage);
cs.OutputCheckSum("my_checksum");
if (argc == 3)
{
PNMwriter writer;
writer.SetInput(finalImage);
writer.Write("3H.pnm");
}
Logger::Finalize();
}