I have a doubt to upgrade my project to vtk 9.0. It was working all well with vtk 8.11. Then I compiled all in vtk 9 and itk 4 again. The build is correct and I changed the cmake of my project as:
Thank you for answering. It is when I am building the code. I think the incompatibilty comes with qt
because if I remove in
add_library of the cmake the class related to qt it builds it. But it is weird that sometimes it builds it and sometimes it doesn’t so I imagine is certain incompatibility with qt. In lower versions of vtk it works perfectly. I am trying to guess if the problems comes from the deprecated warnings that are referred to qt. So I wonder if someone had the same problem
#include <QtWidgets>
namespace x {
namespace y {
namespace z {
class Volume : public QObject {
Q_OBJECT
public:
virtual ~Volume() = default;
void loadDicomData(std::string);
virtual void loadVolumeDicom(std::string folder) =
0;
std::string folder_;
bool loaded_dicom_ = false;
bool isSeriesWithSubdirDicomInside_ = false;
bool Error_In_dicom_file_ = false;
public slots:
void load();
signals:
void finished();
void errorDCM(const QString& err_txt = "");
};
} // namespace x
} // namespace y
} // namespace z
If you take VTK out of the equation, does it work? This doesn’t use any VTK code, so it should.
Note that you should use triple backticks to quote code (you can see the preview before you post; your include is gone because it’s treated as invalid HTML).
Thanks for answering. Yes it uses vtk for loading the dicom, this class is a dicom loader and a volume mapper. If I change the path in cmake with the version 8 it works. I indented the code. It is because something new of vtk is intefering with this Q_Object but I cannot see now what it is. I will let you know if I find it.
I have removed the signals as they were not extremelly necessary in here and It works now. But just for curiosity I wonder why it happens in vtk 9.0. I imagine because it is a subproject and does not go to executable project and I must especify something else in vtk 9.0. If I find it out I let you know. By now, it works like this. Thanks