Skip to content

Commit 1223e6d

Browse files
committed
project compiles again
- no plugins - *lots* of warnings - even more TODOs
1 parent 98edf08 commit 1223e6d

28 files changed

+165
-707
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ debug/
1414
Debug/
1515
build/
1616
Build/
17+
cmake-build-*/
18+
.idea/
1719

1820
#Packaging##############################
1921
lib/Core/debian/tmp/

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ add_executable(vast main.cpp ${VIEWER_FILES_CPP} ${WIDGET_FILES_CPP} ${UI_FILES}
153153
#add the view_widgets directory
154154
#add_subdirectory(view_widgets)
155155

156-
target_link_libraries(vast ISIS::isis_qt5)
156+
target_link_libraries(vast ISIS::isis_qt5 ${CMAKE_DL_LIBS})
157157

158158
install(TARGETS vast RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin )
159159

forms/loggingDialog.ui

Lines changed: 0 additions & 97 deletions
This file was deleted.

main.cpp

Lines changed: 5 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -50,50 +50,27 @@ int main( int argc, char *argv[] )
5050
using namespace viewer;
5151
signal( SIGSEGV, error::sigsegv );
5252

53-
std::string appName = "vast";
54-
std::string orgName = "cbs.mpg.de";
55-
QCoreApplication::setApplicationName( appName.c_str() );
56-
QCoreApplication::setOrganizationName( orgName.c_str() );
53+
QCoreApplication::setOrganizationName( "cbs.mpg.de" );
5754
QSettings settings;
5855

59-
qt5::IOQtApplication app( appName.c_str(), false, false );
60-
app.parameters["in"] = util::slist();
61-
app.parameters["in"].needed() = false;
62-
app.parameters["in"].setDescription( "The input image file list." );
63-
// app.parameters["zmap"] = util::slist();
64-
// app.parameters["zmap"].needed() = false;
65-
// app.parameters["zmap"].setDescription( "The input image file list is interpreted as statistical maps. " );
66-
//alias to zmap
67-
// app.parameters["stats"] = util::slist();
68-
// app.parameters["stats"].needed() = false;
69-
// app.parameters["stats"].setDescription( "The input image file list is interpreted as statistical maps. " );
56+
qt5::IOQtApplication app( "vast", true, false );
7057
app.parameters["split"] = false;
7158
app.parameters["split"].needed() = false;
7259
app.parameters["split"].setDescription( "Show each image in a separate view" );
7360
app.parameters["widget"] = std::string();
7461
app.parameters["widget"].needed() = false;
7562
app.parameters["widget"].setDescription( "Use specific widget" );
76-
app.init( argc, argv, false );
77-
auto core = std::make_unique<QViewerCore>();
63+
auto core = app.init( argc, argv, &QViewerCore::images_loaded );
7864

7965
app.addLogging<viewer::Runtime>("");
8066
app.addLogging<viewer::Dev>("");
8167

82-
//setting stylesheet
83-
if ( settings.value( "useStyleSheet" ).toBool() ) {
84-
app.getQApplication().setStyleSheet( util::Singletons::get<style::Style, 10>().getStyleSheet( settings.value("styleSheet").toString().toStdString() ) );
85-
}
86-
87-
//@todo implement me
88-
// core->addMessageHandler( logging_hanlder_runtime.get() );
89-
// core->addMessageHandlerDev( logging_hanlder_dev.get() );
9068
//scan for plugins and hand them to the core
9169
core->addPlugins( plugin::PluginLoader::get().getPlugins() );
9270
core->getUICore()->reloadPluginsToGUI();
9371

9472
std::string widget_name = app.parameters["widget"];
9573

96-
9774
if( widget_name.empty() ) {
9875
if( settings.value( "showImagesGeometricalView" ).toBool() && core->hasWidget( settings.value( "widgetGeometrical" ).toString().toStdString() ) ) {
9976
widget_name = settings.value("widgetGeometrical").toString().toStdString();
@@ -108,39 +85,6 @@ int main( int argc, char *argv[] )
10885
std::cerr << "Error loading widget!" << std::endl;
10986
}
11087

111-
util::slist fileList = app.parameters["in"];
112-
// const bool zmapIsSet = app.parameters["zmap"].isParsed() || app.parameters["stats"].isParsed();
113-
// util::slist zmapFileList = app.parameters["zmap"];
114-
//
115-
// if( !zmapFileList.size() ) {
116-
// zmapFileList = app.parameters["stats"];
117-
// }
118-
//
119-
// if( zmapIsSet ) {
120-
// core->setMode( ViewerCoreBase::statistical_mode );
121-
// } else {
122-
// core->setMode( ViewerCoreBase::default_mode );
123-
// }
124-
125-
std::list<FileInformation> fileInfoList;
126-
127-
for( util::slist::const_reference file: fileList ) {
128-
fileInfoList.push_back( FileInformation( file,
129-
app.parameters["rdialect"].as<std::string>().c_str(),
130-
app.parameters["rf"].as<std::string>().c_str(),
131-
widget_name,
132-
ImageHolder::structural_image,
133-
app.parameters["split"].as<bool>() ) );
134-
}
135-
// for( util::slist::const_reference file: zmapFileList ) {
136-
// fileInfoList.push_back( FileInformation( file,
137-
// app.parameters["rdialect"].as<std::string>().c_str(),
138-
// app.parameters["rf"].as<std::string>().c_str(),
139-
// widget_name,
140-
// ImageHolder::statistical_image,
141-
// app.parameters["split"].as<bool>() ) );
142-
// }
143-
144-
core->getUICore()->showMainWindow( fileInfoList );
145-
return app.getQApplication().exec();
88+
core->getUICore()->showMainWindow( );
89+
return app.exec();
14690
}

plugins/Histogram/HistogramDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void isis::viewer::plugin::HistogramDialog::paintHistogram()
5757

5858
if( m_ViewerCore->hasImage() && isVisible() ) {
5959
std::stringstream title;
60-
title << "Histogram of " << boost::filesystem::path( m_ViewerCore->getCurrentImage()->getImageProperties().fileName ).leaf();
60+
title << "Histogram of " << std::filesystem::path( m_ViewerCore->getCurrentImage()->getImageProperties().fileName ).leaf();
6161

6262
if( m_ViewerCore->getCurrentImage()->getImageSize()[3] > 1 ) {
6363
title << " (volume " << m_ViewerCore->getCurrentImage()->getImageProperties().timestep << ")";

viewer/geometrical.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@
2828

2929
#include "geometrical.hpp"
3030

31-
namespace isis
31+
namespace isis::viewer::geometrical
3232
{
33-
namespace viewer
34-
{
35-
namespace geometrical
36-
{
37-
33+
BoundingBoxType getPhysicalBoundingBox( const std::shared_ptr<ImageHolder> image, const unsigned short &border )
34+
{return getPhysicalBoundingBox({image},border);}
3835
BoundingBoxType getPhysicalBoundingBox ( const ImageHolder::Vector images, const unsigned short &border )
3936
{
4037
BoundingBoxType retBox;
@@ -76,6 +73,4 @@ BoundingBoxType getPhysicalBoundingBox ( const ImageHolder::Vector images, const
7673
}
7774

7875

79-
}
80-
}
8176
}

0 commit comments

Comments
 (0)