Skip to content

Commit

Permalink
Support for storing custom colors, increased version to 1.8
Browse files Browse the repository at this point in the history
Added check for TIFF tiles
Added storing custom colors
Increased version to 1.8
  • Loading branch information
GeertLitjens committed May 5, 2018
1 parent 9456de1 commit f2c990d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
5 changes: 0 additions & 5 deletions ASAP/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
cmake_minimum_required(VERSION 2.8.9)
CMAKE_POLICY(SET CMP0020 NEW)
CMAKE_POLICY(SET CMP0043 NEW)
CMAKE_POLICY(SET CMP0053 NEW)

PROJECT(PathologyWorkstation)
INCLUDE_DIRECTORIES(
${PathologyWorkstation_SOURCE_DIR}/../
Expand Down
10 changes: 10 additions & 0 deletions ASAP/annotation/AnnotationWorkstationExtensionPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,21 @@ AnnotationWorkstationExtensionPlugin::AnnotationWorkstationExtensionPlugin() :
connect(_treeWidget, SIGNAL(itemExpanded(QTreeWidgetItem*)), this, SLOT(resizeOnExpand()));
}
_settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "DIAG", "ASAP", this);

for (int i = 0; i < QColorDialog::customCount(); ++i) {
QColor customColor = _settings->value("annotationCustomColor" + QString(i), QColor("white")).value<QColor>();
QColorDialog::setCustomColor(i, customColor);
}

qRegisterMetaTypeStreamOperators<QtAnnotation*>("QtAnnotation*");
qRegisterMetaTypeStreamOperators<QtAnnotationGroup*>("QtAnnotationGroup*");
}

AnnotationWorkstationExtensionPlugin::~AnnotationWorkstationExtensionPlugin() {
for (int i = 0; i < QColorDialog::customCount(); ++i) {
QColor customColor = QColorDialog::customColor(i);
_settings->setValue("annotationCustomColor" + QString(i), customColor);
}
clear();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool VisualizationWorkstationExtensionPlugin::initialize(PathologyViewer* viewer
}

QDockWidget* VisualizationWorkstationExtensionPlugin::getDockWidget() {
_dockWidget = new QDockWidget("Cancer detection visualization");
_dockWidget = new QDockWidget("Overlays");
QUiLoader loader;
QFile file(":/VisualizationWorkstationExtensionPlugin_ui/VisualizationWorkstationExtensionPlugin.ui");
file.open(QFile::ReadOnly);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ QLabel {
<item>
<widget class="QPushButton" name="OpenResultPushButton">
<property name="text">
<string>Open result image</string>
<string>Open image for overlay</string>
</property>
</widget>
</item>
Expand Down
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.8.9)
CMAKE_POLICY(SET CMP0020 NEW)
CMAKE_POLICY(SET CMP0043 NEW)
CMAKE_POLICY(SET CMP0053 NEW)
CMAKE_POLICY(SET CMP0071 NEW)
PROJECT(DIAGPathology)

SET(CURRENT_MAJOR_VERSION 1)
SET(CURRENT_MINOR_VERSION 7)
SET(CURRENT_PATCH_VERSION 4)
SET(CURRENT_MINOR_VERSION 8)
SET(CURRENT_PATCH_VERSION 0)
set(ASAP_VERSION ${CURRENT_MAJOR_VERSION}.${CURRENT_MINOR_VERSION}.${CURRENT_PATCH_VERSION})

include (GenerateExportHeader)
Expand Down
4 changes: 4 additions & 0 deletions io/multiresolutionimageinterface/TIFFImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ bool TIFFImage::initializeType(const std::string& imagePath) {
return false;
}
}
if (TIFFIsTiled(_tiff) == 0) {
cleanup();
return false;
}
unsigned int cType = 0, dType = 0, planarconfig=0, bitsPerSample = 0;
TIFFGetField(_tiff, TIFFTAG_PHOTOMETRIC, &cType);

Expand Down

0 comments on commit f2c990d

Please sign in to comment.