OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)size.p[0] && (unsigned)(i1*DataType<_Tp>::channels) < (unsigned)(size.p[1]*channels()) && ((((sizeof(size_t)<<28)|0x8442211) >> ((DataType<_Tp>::depth) & ((1 << 3) - 1))*4) & 15) == elemSize1()) in cv::Mat::at, file c:\projects\circledectec\circledectec\opencv\build\include\opencv2\core\mat.hpp, line 537
void CBCTUI::showEvent(QShowEvent *e)
{
// Necessary! If not do this, when you minimize the window
// and restore, the button will ignore the hover event.
repaint();
this->setAttribute(Qt::WA_Mapped);
QWidget::showEvent(e);
}
#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)
#define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)
#include "QVTKWidget.h"
#include
VTK_MODULE_INIT(vtkRenderingOpenGL);
VTK_MODULE_INIT(vtkInteractionStyle);
VTK_MODULE_INIT(vtkRenderingFreeType);
warning MSB8027: Two or more files with the name of moc_Geometry.cpp will produce outputs to the same location. This can lead to an incorrect build result. The files involved are GeneratedFiles\Debug\moc_XXX.cpp, GeneratedFiles\Release\moc_XXX.cpp.
if (i == 0)
{
riw[i]->SetInputData(flip->GetOutput());
riw[i]->SetSliceOrientationToXY();//Transverse/Axisplane
rep->GetResliceCursorActor()->GetCursorAlgorithm()->SetReslicePlaneNormal(2);
riw[i]->SetResliceModeToAxisAligned();
riw[i]->SetSlice(riw[i]->GetSliceMax() / 2 + 0.5);
}
else if (i == 1)
{
riw[i]->SetInputData(vtkReader->GetOutput());
riw[i]->SetSliceOrientationToYZ(); //Sagittal plane
rep->GetResliceCursorActor()->GetCursorAlgorithm()->SetReslicePlaneNormal(0);
riw[i]->SetResliceModeToAxisAligned();
riw[i]->SetSlice(riw[i]->GetSliceMax() / 2 + 0.5);
}
else
{
riw[i]->SetInputData(vtkReader->GetOutput());
riw[i]->SetSliceOrientationToXZ();//Coronal/Frontal plane
rep->GetResliceCursorActor()->GetCursorAlgorithm()->SetReslicePlaneNormal(1);
riw[i]->SetResliceModeToAxisAligned();
riw[i]->SetSlice(riw[i]->GetSliceMax() / 2 + 0.5);
}
itkgdcmCommon-4.8.lib(gdcmSystem.obj) : error LNK2001: 无法解析的外部符号 gethostname
1>itkgdcmCommon-4.8.lib(gdcmSystem.obj) : error LNK2001: 无法解析的外部符号 WSAStartup
1>itkgdcmCommon-4.8.lib(gdcmSystem.obj) : error LNK2001: 无法解析的外部符号 WSACleanup
1>E:\projects\RTKReconstructionGPUVolume\x64\Release\RTKReconstruction.exe : fatal error LNK1120: 4 个无法解析的外部命令
#include
#pragma comment(lib, "WS2_32")
1>itkgdcmMSFF-4.8.lib(gdcmUIDGenerator.obj) : error LNK2001: 无法解析的外部符号 __imp_UuidCreate
vtkOpenGLTexture :failure after ReleaseGraphicResources 16 OpenGL errors detected
错误 1 error LNK2019: 无法解析的外部符号 “struct OFConditionConst const EC_Normal” (?EC_Normal@@3UOFConditionConst@@B),该符号在函数 “public: bool __cdecl CTHeaderInformation::SetParameter(class DcmFileFormat &)” (?SetParameter@CTHeaderInformation@@QEAA_NAEAVDcmFileFormat@@@Z) 中被引用。
QWidget: Must construct a QApplication before a QWidget
备注:博客中有些问题解决办法取自其他博客,未注明具体出处。