ITK:捕获异常
ITK:捕獲異常
- 內(nèi)容提要
- 輸出結(jié)果
- C++實(shí)現(xiàn)代碼
內(nèi)容提要
嘗試捕獲一個(gè)itk :: ExceptionObject。異常將打印到控制臺(tái)輸出。當(dāng)程序崩潰時(shí),這可以提供更多信息,包括異常發(fā)生的位置及其描述。ITK中的異常通常僅在對(duì)-> Update()的調(diào)用期間引發(fā),因此僅-> Update() 調(diào)用會(huì)添加到try塊中。
輸出結(jié)果
ExceptionObject caught ! itk::ImageFileReaderException (0x20cece0) Location: "void itk::ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateOutputInformation() [with TOutputImage = itk::Image<double, 2u>, ConvertPixelTraits = itk::DefaultConvertPixelTraits<double>]" File: /path/to/ITK/Modules/IO/ImageBase/include/itkImageFileReader.hxx Line: 143 Description: Could總結(jié)
- 上一篇: 新疆的盘龙古道是多少号公路
- 下一篇: ITK:获取PointSet的边界框