Skip to content

Commit

Permalink
Merge pull request #83 from aglowacki/master
Browse files Browse the repository at this point in the history
Aded roi statistics
  • Loading branch information
aglowacki authored Jun 4, 2024
2 parents 62e6af5 + 4cf7deb commit e1bb2ca
Show file tree
Hide file tree
Showing 37 changed files with 1,384 additions and 398 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ IF (MSVC)
${CMAKE_THREAD_LIBS_INIT}
ws2_32.lib )
ELSEIF (UNIX)
#IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# set_target_properties(uProbeX PROPERTIES MACOSX_BUNDLE TRUE)
#ENDIF()
set_target_properties(uProbeX PROPERTIES COMPILE_FLAGS "-O3")

target_link_libraries (uProbeX PRIVATE
Expand Down
119 changes: 0 additions & 119 deletions cmake/FindNetCDF.cmake

This file was deleted.

137 changes: 0 additions & 137 deletions cmake/linux/FindZeroMQ.cmake

This file was deleted.

9 changes: 9 additions & 0 deletions src/core/uProbeX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ void uProbeX::createMenuBar()

connect(m_menuFile, SIGNAL(aboutToShow()), this, SLOT(menuBarEnable()));

// Batch menu
//m_menuBatch = new QMenu(tr("Batch Processing"));
//action = m_menuBatch->addAction("Per Pixel Processing");
//connect(action, SIGNAL(triggered()), this, SLOT(perPixel()));
//action = "Export Images"
//action = "Roi Stats"
//m_menu->addMenu(m_menuBatch);


// Stream menu
m_menuStream = new QMenu(tr("Live Stream"));
action = m_menuStream->addAction("Open Live Stream Viewer");
Expand Down
2 changes: 2 additions & 0 deletions src/core/uProbeX.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ private slots:
*/
QMenu* m_menuStream;

QMenu* m_menuBatch;

/**
* @brief Help menu
*/
Expand Down
13 changes: 13 additions & 0 deletions src/gstar/Annotation/RoiMaskGraphicsItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,19 @@ RoiMaskGraphicsItem::RoiMaskGraphicsItem(QString name, QColor color, int alpha,
{
_mask->setPixelColor(itr.first, itr.second, color);
}
bool found_name = false;
for (const auto& itr : m_data)
{
if (itr->getName() == DEF_STR_DISPLAY_NAME)
{
itr->setValue(name);
found_name = true;
}
}
if(false == found_name)
{
appendProperty(new AnnotationProperty(DEF_STR_DISPLAY_NAME, name));
}

}

Expand Down
2 changes: 1 addition & 1 deletion src/gstar/CountsStatsTransformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void CountsStatsTransformer::setCounts(const data_struct::ArrayXXr<float>& count
_stdev += pow((counts(y,x) - _avg), 2);
}
}
_stdev = sqrtf(_stdev / cnts.size());
_stdev = sqrtf(_stdev / (float)cnts.size());

std::sort(cnts.begin(), cnts.end(), [](float const& t1, float const& t2) { return t1 < t2; });
int idx = cnts.size() / 2;
Expand Down
2 changes: 1 addition & 1 deletion src/mvc/BatchRoiFitWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ void BatchRoiFitWidget::createLayout()
_le_detectors = new QLineEdit("0,1,2,3,4,5,6");

_cb_opt_method = new QComboBox();
_cb_opt_method->addItem(STR_HYBRID_MP_FIT);
_cb_opt_method->addItem(STR_LM_FIT);
_cb_opt_method->addItem(STR_MP_FIT);
_cb_opt_method->addItem(STR_HYBRID_MP_FIT);
connect(_cb_opt_method, &QComboBox::currentTextChanged, this, &BatchRoiFitWidget::optimizer_changed);

_file_list_model = new QStandardItemModel();
Expand Down
Loading

0 comments on commit e1bb2ca

Please sign in to comment.