From 3cfdba78b595e9a736bec804deaa1498f2058f59 Mon Sep 17 00:00:00 2001 From: Christopher Bruns Date: Wed, 18 May 2011 20:52:23 +0000 Subject: [PATCH] Merged Branch-FW-0.1 into trunk, using command "svn merge -r850:1193 https://svn.janelia.org/penglab/projects/v3d/branches/Branch-FW-0.1" I clumsily resolved conflicts in files mainwindow.cpp, v3d_commandlineparser.h, mainwindow.h, main.cpp, and the webservices/ directory. I also created a couple of tags under https://svn.janelia.org/penglab/projects/v3d/tags/ representing the two code bases being merged: /Branch-FW-0.1_before_merge_into_trunk_18May2011/ /trunk_before_neuron_annotator_merge_18May2011/ (all but webservice folder this time) --- build.hudson | 25 + .../v3d_plugins/HDRfilter/hdrfilter.cpp | 216 ++ .../v3d_plugins/HDRfilter/hdrfilter.h | 396 +++ .../v3d_plugins/HDRfilter/hdrfilter.pro | 26 + .../cellcounter_tm/cellcounter.cpp | 1332 ++++++++++ .../v3d_plugins/cellcounter_tm/cellcounter.h | 362 +++ .../cellcounter_tm/cellcounter.pro | 10 + .../v3d_plugins/cellcounter_tm/readme | 12 + v3d.config | 1 + v3d.creator | 1 + v3d.files | 2344 +++++++++++++++++ v3d.includes | 122 + v3d_main/3drenderer/3drenderer.qrc | 9 + v3d_main/3drenderer/Renderer_gl2.cpp | 6 + v3d_main/3drenderer/Renderer_gl2.h | 5 +- v3d_main/3drenderer/icons/click1.svg | 9 + v3d_main/3drenderer/icons/click2.svg | 10 + v3d_main/3drenderer/icons/click3.svg | 12 + v3d_main/3drenderer/icons/start.svg | 15 + v3d_main/3drenderer/icons/stroke1.svg | 10 + v3d_main/3drenderer/icons/stroke2.svg | 11 + v3d_main/3drenderer/icons/stroke3.svg | 12 + v3d_main/3drenderer/icons/strokeN.svg | 13 + v3d_main/3drenderer/icons/trace.svg | 15 + v3d_main/3drenderer/renderer.cpp | 136 +- v3d_main/3drenderer/renderer.h | 20 +- v3d_main/3drenderer/renderer_hit2.cpp | 49 +- v3d_main/3drenderer/renderer_obj2.cpp | 2 +- v3d_main/3drenderer/renderer_tex2.cpp | 93 +- v3d_main/3drenderer/renderer_tex2.h | 75 +- v3d_main/3drenderer/v3dr_glwidget.cpp | 11 +- v3d_main/3drenderer/v3dr_glwidget.h | 11 +- v3d_main/CMakeLists.txt | 2 + v3d_main/basic_c_fun/basic_4dimage.cpp | 4 + v3d_main/basic_c_fun/basic_4dimage.h | 43 +- v3d_main/basic_c_fun/color_xyz.h | 22 +- v3d_main/basic_c_fun/v3d_message.cpp | 6 +- .../neuron_annotator/AnnotationSession.cpp | 193 ++ v3d_main/neuron_annotator/AnnotationSession.h | 67 + v3d_main/neuron_annotator/CMakeLists.txt | 12 + v3d_main/neuron_annotator/CameraModel.cpp | 32 + v3d_main/neuron_annotator/CameraModel.h | 41 + v3d_main/neuron_annotator/CellCounter3D.cpp | 1059 ++++++++ v3d_main/neuron_annotator/CellCounter3D.h | 241 ++ .../ColorSeparatorConsolidator.cpp | 205 ++ .../ColorSeparatorConsolidator.h | 43 + .../neuron_annotator/FileTreeSearcher.cpp | 43 + v3d_main/neuron_annotator/FileTreeSearcher.h | 19 + v3d_main/neuron_annotator/GalleryButton.cpp | 89 + v3d_main/neuron_annotator/GalleryButton.h | 48 + v3d_main/neuron_annotator/GammaWidget.cpp | 70 + v3d_main/neuron_annotator/GammaWidget.h | 32 + v3d_main/neuron_annotator/GammaWidget.ui | 81 + .../MultiColorImageStackNode.cpp | 9 + .../MultiColorImageStackNode.h | 133 + v3d_main/neuron_annotator/Na3DWidget.cpp | 490 ++++ v3d_main/neuron_annotator/Na3DWidget.h | 59 + .../neuron_annotator/NaLargeMIPWidget.cpp | 522 ++++ v3d_main/neuron_annotator/NaLargeMIPWidget.h | 151 ++ v3d_main/neuron_annotator/NaMainWindow.cpp | 401 +++ v3d_main/neuron_annotator/NaMainWindow.h | 103 + v3d_main/neuron_annotator/NaMainWindow.ui | 1330 ++++++++++ v3d_main/neuron_annotator/NaViewer.cpp | 41 + v3d_main/neuron_annotator/NaViewer.h | 45 + v3d_main/neuron_annotator/NaZStackWidget.cpp | 889 +++++++ v3d_main/neuron_annotator/NaZStackWidget.h | 152 ++ .../NeuronAnnotatorResultNode.cpp | 41 + .../NeuronAnnotatorResultNode.h | 22 + v3d_main/neuron_annotator/NeuronMaskEntry.cpp | 44 + v3d_main/neuron_annotator/NeuronMaskEntry.h | 26 + v3d_main/neuron_annotator/NeuronSelector.cpp | 278 ++ v3d_main/neuron_annotator/NeuronSelector.h | 41 + .../RendererNeuronAnnotator.cpp | 559 ++++ .../RendererNeuronAnnotator.h | 54 + v3d_main/neuron_annotator/Rotation3D.cpp | 251 ++ v3d_main/neuron_annotator/Rotation3D.h | 82 + .../TimebasedIdentifierGenerator.cpp | 7 + .../TimebasedIdentifierGenerator.h | 24 + v3d_main/neuron_annotator/Vector3D.cpp | 10 + v3d_main/neuron_annotator/Vector3D.h | 146 + v3d_main/v3d/CMakeLists.txt | 23 +- v3d_main/v3d/CommandManager.cpp | 69 + v3d_main/v3d/CommandManager.h | 19 + v3d_main/v3d/Info.plist | 4 +- v3d_main/v3d/main.cpp | 13 +- v3d_main/v3d/mainwindow.cpp | 117 +- v3d_main/v3d/mainwindow.h | 16 +- v3d_main/v3d/my4dimage.cpp | 31 +- v3d_main/v3d/v3d.pro | 60 +- v3d_main/v3d/v3d_application.cpp | 21 + v3d_main/v3d/v3d_application.h | 123 + v3d_main/v3d/v3d_commandlineparser.h | 73 +- v3d_main/v3d/v3d_core.h | 2 +- v3d_main/v3d/v3dimg_proc_neuron.cpp | 9 +- 94 files changed, 13994 insertions(+), 219 deletions(-) create mode 100755 build.hudson create mode 100644 released_plugins/v3d_plugins/HDRfilter/hdrfilter.cpp create mode 100644 released_plugins/v3d_plugins/HDRfilter/hdrfilter.h create mode 100644 released_plugins/v3d_plugins/HDRfilter/hdrfilter.pro create mode 100644 released_plugins/v3d_plugins/cellcounter_tm/cellcounter.cpp create mode 100644 released_plugins/v3d_plugins/cellcounter_tm/cellcounter.h create mode 100644 released_plugins/v3d_plugins/cellcounter_tm/cellcounter.pro create mode 100644 released_plugins/v3d_plugins/cellcounter_tm/readme create mode 100644 v3d.config create mode 100644 v3d.creator create mode 100644 v3d.files create mode 100644 v3d.includes create mode 100644 v3d_main/3drenderer/icons/click1.svg create mode 100644 v3d_main/3drenderer/icons/click2.svg create mode 100644 v3d_main/3drenderer/icons/click3.svg create mode 100644 v3d_main/3drenderer/icons/start.svg create mode 100644 v3d_main/3drenderer/icons/stroke1.svg create mode 100644 v3d_main/3drenderer/icons/stroke2.svg create mode 100644 v3d_main/3drenderer/icons/stroke3.svg create mode 100644 v3d_main/3drenderer/icons/strokeN.svg create mode 100644 v3d_main/3drenderer/icons/trace.svg create mode 100644 v3d_main/neuron_annotator/AnnotationSession.cpp create mode 100644 v3d_main/neuron_annotator/AnnotationSession.h create mode 100644 v3d_main/neuron_annotator/CMakeLists.txt create mode 100644 v3d_main/neuron_annotator/CameraModel.cpp create mode 100644 v3d_main/neuron_annotator/CameraModel.h create mode 100644 v3d_main/neuron_annotator/CellCounter3D.cpp create mode 100644 v3d_main/neuron_annotator/CellCounter3D.h create mode 100644 v3d_main/neuron_annotator/ColorSeparatorConsolidator.cpp create mode 100644 v3d_main/neuron_annotator/ColorSeparatorConsolidator.h create mode 100644 v3d_main/neuron_annotator/FileTreeSearcher.cpp create mode 100644 v3d_main/neuron_annotator/FileTreeSearcher.h create mode 100644 v3d_main/neuron_annotator/GalleryButton.cpp create mode 100644 v3d_main/neuron_annotator/GalleryButton.h create mode 100644 v3d_main/neuron_annotator/GammaWidget.cpp create mode 100644 v3d_main/neuron_annotator/GammaWidget.h create mode 100644 v3d_main/neuron_annotator/GammaWidget.ui create mode 100644 v3d_main/neuron_annotator/MultiColorImageStackNode.cpp create mode 100644 v3d_main/neuron_annotator/MultiColorImageStackNode.h create mode 100644 v3d_main/neuron_annotator/Na3DWidget.cpp create mode 100644 v3d_main/neuron_annotator/Na3DWidget.h create mode 100644 v3d_main/neuron_annotator/NaLargeMIPWidget.cpp create mode 100644 v3d_main/neuron_annotator/NaLargeMIPWidget.h create mode 100644 v3d_main/neuron_annotator/NaMainWindow.cpp create mode 100644 v3d_main/neuron_annotator/NaMainWindow.h create mode 100644 v3d_main/neuron_annotator/NaMainWindow.ui create mode 100644 v3d_main/neuron_annotator/NaViewer.cpp create mode 100644 v3d_main/neuron_annotator/NaViewer.h create mode 100644 v3d_main/neuron_annotator/NaZStackWidget.cpp create mode 100644 v3d_main/neuron_annotator/NaZStackWidget.h create mode 100644 v3d_main/neuron_annotator/NeuronAnnotatorResultNode.cpp create mode 100644 v3d_main/neuron_annotator/NeuronAnnotatorResultNode.h create mode 100644 v3d_main/neuron_annotator/NeuronMaskEntry.cpp create mode 100644 v3d_main/neuron_annotator/NeuronMaskEntry.h create mode 100644 v3d_main/neuron_annotator/NeuronSelector.cpp create mode 100644 v3d_main/neuron_annotator/NeuronSelector.h create mode 100644 v3d_main/neuron_annotator/RendererNeuronAnnotator.cpp create mode 100644 v3d_main/neuron_annotator/RendererNeuronAnnotator.h create mode 100644 v3d_main/neuron_annotator/Rotation3D.cpp create mode 100644 v3d_main/neuron_annotator/Rotation3D.h create mode 100644 v3d_main/neuron_annotator/TimebasedIdentifierGenerator.cpp create mode 100644 v3d_main/neuron_annotator/TimebasedIdentifierGenerator.h create mode 100644 v3d_main/neuron_annotator/Vector3D.cpp create mode 100644 v3d_main/neuron_annotator/Vector3D.h create mode 100644 v3d_main/v3d/CommandManager.cpp create mode 100644 v3d_main/v3d/CommandManager.h create mode 100644 v3d_main/v3d/v3d_application.cpp create mode 100644 v3d_main/v3d/v3d_application.h diff --git a/build.hudson b/build.hudson new file mode 100755 index 0000000000..65a5997be7 --- /dev/null +++ b/build.hudson @@ -0,0 +1,25 @@ +#!/bin/bash +# 2010-08-07 by Hanchuan Peng +# a convenience script for building teh system on Linux (Redhat and Ubuntu) +# +# examples: +# sh build.linux +# sh build.linux -B -j4 #rebuild the entire system using 4 processors + +cd v3d_main + +sh ./build.redhat $* + +cd ../ + +# Check for the executable file +if [ -e "./v3d/v3d" ] +then + echo "Found executable" + exit 0; +else + echo "ERROR: did not find executable" + exit 1; +fi + + diff --git a/released_plugins/v3d_plugins/HDRfilter/hdrfilter.cpp b/released_plugins/v3d_plugins/HDRfilter/hdrfilter.cpp new file mode 100644 index 0000000000..904f8f1c4a --- /dev/null +++ b/released_plugins/v3d_plugins/HDRfilter/hdrfilter.cpp @@ -0,0 +1,216 @@ +/* hdrfilter.cpp + * 2011-03-21: create this program by Yang Yu + */ + +// +#include +#include +#include + +#include + +#include "hdrfilter.h" + +#include "stackutil.h" +#include "mg_utilities.h" +#include "mg_image_lib.h" + + +// redefine loadimage function copy from stackutil.h remove size constrains +bool loadImageWSC(char imgSrcFile[], unsigned char *& data1d, V3DLONG * &sz, int & datatype) +{ + if (data1d) + { + printf("Warning: The pointer for 1d data storage is not empty. This pointer will be freed first and the reallocated. \n"); + delete []data1d; data1d=0; + } + if (sz) + { + printf("Warning: The pointer for size is not empty. This pointer will be freed first and the reallocated. \n"); + delete []sz; sz=0; + } + else + { + sz = new V3DLONG [4]; + if (!sz) + { + printf("Fail to alocate memory for the size variable.\n"); + return false; + } + } + + unsigned char *tmp_data1d =0; + V3DLONG * tmp_sz = 0; /* note that this variable must be initialized as NULL. */ + int tmp_datatype = 0; + bool b_5d=false; + + char * curFileSuffix = getSurfix(imgSrcFile); + if (strcasecmp(curFileSuffix, "tif")==0 || strcasecmp(curFileSuffix, "tiff")==0) //read tiff stacks + { + if (loadTif2Stack(imgSrcFile, tmp_data1d, tmp_sz, tmp_datatype)) + { + printf("Error happens in TIF file reading. Stop. \n"); + return false; + } + } + else if ( strcasecmp(curFileSuffix, "lsm")==0 ) //read lsm stacks + { + if (loadLsm2Stack(imgSrcFile, tmp_data1d, tmp_sz, tmp_datatype)) + { + printf("Error happens in LSM file reading. Stop. \n"); + return false; + } + } + else if ( strcasecmp(curFileSuffix, "raw5")==0 ) //read lsm stacks + { + if (loadRaw5d2Stack(imgSrcFile, tmp_data1d, tmp_sz, tmp_datatype)) + { + printf("Error happens in V3D .raw5 (5D) file reading. Stop. \n"); + return false; + } + b_5d = true; + } + else //then assume it is Hanchuan's RAW format + { + if (loadRaw2Stack(imgSrcFile, tmp_data1d, tmp_sz, tmp_datatype)) + { + if (loadRaw2Stack_2byte(imgSrcFile, tmp_data1d, tmp_sz, tmp_datatype)) + { + printf("Error happens in reading 2-byte-size RAW file. Stop. \n"); + return false; + } + } + } + + + //copy output data + switch (tmp_datatype) + { + case 1: + datatype = 1; + break; + + case 2: + datatype = 2; + break; + + case 4: + datatype = 4; + break; + + default: + printf("Something wrong with the program, -- should NOT display this message at all. Check your program. \n"); + if (data1d) {delete []data1d; data1d=0;} + if (tmp_sz) {delete []tmp_sz; tmp_sz=0;} + if (sz) {delete []sz; sz=0;} + return false; + } + + sz = new V3DLONG [5]; + sz[0] = tmp_sz[0]; + sz[1] = tmp_sz[1]; + sz[2] = tmp_sz[2]; + sz[3] = tmp_sz[3]; //no longer merge the 3rd and 4th dimensions + sz[4] = (b_5d) ? tmp_sz[4] : 1; //090802 + + data1d = tmp_data1d; + + /* clean all workspace variables */ + if (tmp_sz) {delete []tmp_sz; tmp_sz=0;} + + return true; +} + + +//Q_EXPORT_PLUGIN2 ( PluginName, ClassName ) +//The value of PluginName should correspond to the TARGET specified in the plugin's project file. +Q_EXPORT_PLUGIN2(hdrfilter, HDRFilterPlugin); + +// func datatype converting main +int hdr_filtering(V3DPluginCallback2 &callback, QWidget *parent); + +// func convering kernel +template +int convering(void *subject1d, ImagePixelType v3d_dt, ImagePixelType dt); + +//plugin funcs +const QString title = "HDR Filtering"; +QStringList HDRFilterPlugin::menulist() const +{ + return QStringList() << tr("HDR Filtering") + << tr("About"); +} + +void HDRFilterPlugin::domenu(const QString &menu_name, V3DPluginCallback2 &callback, QWidget *parent) +{ + if (menu_name == tr("HDR Filtering")) + { + hdr_filtering(callback, parent); + } + else if (menu_name == tr("About")) + { + QMessageBox::information(parent, "Version info", QString("HDR Filtering Plugin %1 (March 21, 2011) developed by Yang Yu. (Janelia Research Farm Campus, HHMI)").arg(getPluginVersion())); + return; + } +} + +// show different datatype data in V3D +int hdr_filtering(V3DPluginCallback2 &callback, QWidget *parent) +{ + qDebug()<<"run hdr filtering ..."; + + // get image + HDRFilerDialog dialog(callback, parent); + if (dialog.exec()!=QDialog::Accepted) return -1; + + QString fn_image = dialog.fn_image; + + qDebug()<<"input is ... "<( fn_image.toStdString().c_str() ), data1d, imgsz, datatype)!=true) + { + std::cout << "The image loading fails."<show(); + + // + return 0; + +} + diff --git a/released_plugins/v3d_plugins/HDRfilter/hdrfilter.h b/released_plugins/v3d_plugins/HDRfilter/hdrfilter.h new file mode 100644 index 0000000000..eb2e1bde46 --- /dev/null +++ b/released_plugins/v3d_plugins/HDRfilter/hdrfilter.h @@ -0,0 +1,396 @@ +/* hdrfilter.h + * 2011-03-21: create this program by Yang Yu + */ + + +#ifndef __HDRFILTER_H__ +#define __HDRFILTER_H__ + +// +#include +#include +#include +#include +#include +#include + +#include "../../../v3d_main/neuron_annotator/NaZStackWidget.h" + +class HDRFilterPlugin : public QObject, public V3DPluginInterface2_1 +{ + Q_OBJECT + Q_INTERFACES(V3DPluginInterface2_1); + +public: + QStringList menulist() const; + void domenu(const QString &menu_name, V3DPluginCallback2 &callback, QWidget *parent); + + QStringList funclist() const {return QStringList();} + bool dofunc(const QString & func_name, const V3DPluginArgList & input, V3DPluginArgList & output, + V3DPluginCallback2 & v3d, QWidget * parent) {return true;} + float getPluginVersion() const {return 1.01f;} // version info +}; + +// dialog to choose the source image +class HDRFilerDialog : public QDialog +{ + Q_OBJECT + +public: + QString fn_image; + + QGridLayout *gridLayout; + + QLabel* label_image; + QLineEdit *le_image; + QPushButton *pb_browse_image; + + QPushButton* ok; + QPushButton* cancel; + +public: + HDRFilerDialog(V3DPluginCallback2 &cb, QWidget *parent) + { + //create a dialog + gridLayout = new QGridLayout(); + + // + label_image = new QLabel(QObject::tr(" Input Image: ")); + le_image = new QLineEdit(QDir::currentPath()); + pb_browse_image = new QPushButton("Browse..."); + + gridLayout->addWidget(label_image, 1,0); + gridLayout->addWidget(le_image, 1,1); + gridLayout->addWidget(pb_browse_image, 1,2); + + ok = new QPushButton("OK"); + cancel = new QPushButton("Cancel"); + gridLayout->addWidget(cancel, 6,1,1,1); + gridLayout->addWidget(ok, 6,2,1,1); + + setLayout(gridLayout); + setWindowTitle(QString("HDR Filter")); + + //slot interface + connect(ok, SIGNAL(clicked()), this, SLOT(accept())); + connect(cancel, SIGNAL(clicked()), this, SLOT(reject())); + + connect(pb_browse_image, SIGNAL(clicked()), this, SLOT(get_image())); + } + + ~HDRFilerDialog(){} + + public slots: + void get_image() + { + fn_image = QFileDialog::getOpenFileName(0, QObject::tr("Open an image "), + QDir::currentPath(), + QObject::tr("Images (*.raw *.tif *.lsm);;All(*)")); + + + le_image->setText(fn_image); + } +}; + +// draw a 2D viewer showing the control window +class HDRwidget : public QWidget +{ + Q_OBJECT + +public: + HDRwidget(QWidget *parent, Image4DSimple &p4DImage) + { + // + sx = p4DImage.getXDim(); + sy = p4DImage.getYDim(); + sz = p4DImage.getZDim(); + sc = p4DImage.getCDim(); + + cur_z = sz/2; + + ratio_x2y = float(sx)/float(sy); + + cr = 25; + + // color + QGroupBox *colorGroup = new QGroupBox; + colorGroup->setTitle(tr("Color Channel and ROI Size")); + + rb_r = new QRadioButton(tr("Red"), colorGroup); + connect(rb_r, SIGNAL(clicked()), this, SLOT(setRedChannel())); + rb_r->setChecked(true); + + rb_g = new QRadioButton(tr("Green"), colorGroup); + connect(rb_g, SIGNAL(clicked()), this, SLOT(setGreenChannel())); + + rb_b = new QRadioButton(tr("Blue"), colorGroup); + connect(rb_b, SIGNAL(clicked()), this, SLOT(setBlueChannel())); + + // view + viewGroup = new QGroupBox; + + pNaZW = new NaZStackWidget(parent); + pNaZW->loadImage4D(p4DImage); + + pNaZW->setFocusPolicy(Qt::ClickFocus); + + cur_c = 1; + pNaZW->setRedChannel(); + + QPalette palette_r = rb_r->palette(); + palette_r.setColor(rb_r->backgroundRole(), Qt::red); + palette_r.setColor(rb_r->foregroundRole(), Qt::red); + rb_r->setPalette(palette_r); + + if(sc<=1) + { + qDebug()<<"# color channel is ..."<setCheckable(false); + rb_b->setCheckable(false); + } + else if(sc<=2) + { + qDebug()<<"# color channel is ..."<setCheckable(false); + } + + viewGroup->setTitle(QString("z %1/%2 x %3 y %4").arg(cur_z+1).arg(sz).arg(sx).arg(sy)); + + // z slice + sb_z = new QScrollBar(Qt::Horizontal); + sb_z->setMaximum(sz); sb_z->setMinimum(1); sb_z->setValue(cur_z); sb_z->setSingleStep(1); + + QGroupBox *sliceGroup = new QGroupBox; + sliceGroup->setTitle(tr("Z Slice")); + + // search box size + l_sb = new QLabel("Search Box Size "); + sb_sb = new QSpinBox; + sb_sb->setMaximum(sx>sy?sy:sx); sb_sb->setMinimum(1); sb_sb->setValue(25); sb_sb->setSingleStep(1); + + // layout + QGridLayout *viewGroupLayout = new QGridLayout(viewGroup); + viewGroupLayout->addWidget(pNaZW, 0, 0); + //viewGroupLayout->setVerticalSpacing(4); + + QGridLayout *sliceGroupLayout = new QGridLayout(sliceGroup); + sliceGroupLayout->addWidget(sb_z, 0, 0); + + QGridLayout *colorLayout = new QGridLayout(colorGroup); + colorLayout->addWidget(rb_r, 0, 0, Qt::AlignLeft); + colorLayout->addWidget(rb_g, 0, 1, Qt::AlignLeft); + colorLayout->addWidget(rb_b, 0, 2, Qt::AlignLeft); + + colorLayout->addWidget(l_sb, 0, 3, Qt::AlignRight); + colorLayout->addWidget(sb_sb, 0, 4, Qt::AlignLeft); + + QGridLayout *gridLayout = new QGridLayout(this); + gridLayout->addWidget(viewGroup, 0,0, 10, 1); + gridLayout->addWidget(sliceGroup, 11,0, 1, 1); + gridLayout->addWidget(colorGroup, 12,0, 1, 1); + setLayout(gridLayout); + setWindowTitle(QString("HDR Filtering")); + + // + connect(sb_z, SIGNAL(valueChanged(int)), this, SLOT(updateZslice())); + connect(this, SIGNAL(sizeChanged(QSize)), this, SLOT(sizeHandler())); + + // + connect(pNaZW, SIGNAL(curZsliceChanged(int)), this, SLOT(update())); + connect(pNaZW, SIGNAL(boxSizeChanged(int)), this, SLOT(updateCurWin())); + connect(pNaZW, SIGNAL(curColorChannelChanged()), this, SLOT(update())); + + // + connect(rb_r, SIGNAL(clicked()), this, SLOT(setRedChannel())); + connect(rb_g, SIGNAL(clicked()), this, SLOT(setGreenChannel())); + connect(rb_b, SIGNAL(clicked()), this, SLOT(setBlueChannel())); + + // + connect(this, SIGNAL(colorChanged()), pNaZW, SLOT(colorChannelChanged())); + + // + connect(sb_sb, SIGNAL(valueChanged(int)), this, SLOT(updateROIsize())); + } + + ~HDRwidget(){} + +signals: + void sizeChanged(QSize size); + void colorChanged(); + +public slots: + void update() + { + cur_z = pNaZW->getCurrentZSlice(); + + viewGroup->setTitle(QString("z %1/%2 x %3 y %4").arg(cur_z+1).arg(sz).arg(sx).arg(sy)); + + sb_z->setValue(cur_z+1); // keep synchronized + + pNaZW->updatePixmap(); + + } + + void updateZslice() + { + cur_z = sb_z->value()-1; + pNaZW->setCurrentZSlice(cur_z); + + pNaZW->do_HDRfilter_zslice(); + + update(); + } + + void updateROIsize() + { + cr = sb_sb->value(); + + pNaZW->updateROIsize(cr); + + pNaZW->update(); + pNaZW->repaint(); + } + + void sizeHandler() + { + if( (this->size().height() != oriSize.height()) || (this->size().width() != oriSize.width()) ) + { + oriSize.setHeight(this->size().height()); + oriSize.setWidth(int(float(this->size().height())*ratio_x2y)); + //emit sizeChanged(this->size()); + + resize(oriSize.width(), oriSize.height()); // keep ratio of x to y + + } + } + + void resizeEvent(QResizeEvent *re ) + { + emit sizeChanged(re->size()); + } + + void updateCurWin() + { + cr = pNaZW->getCurrentBoxSize(); + sb_sb->setValue(cr); + } + + // + void setRedChannel() + { + cur_c = 1; // red + pNaZW->setRedChannel(); + + QPalette palette_r = rb_r->palette(); + palette_r.setColor(rb_r->backgroundRole(), Qt::red); + palette_r.setColor(rb_r->foregroundRole(), Qt::red); + rb_r->setPalette(palette_r); + + QPalette palette_g = rb_g->palette(); + palette_g.setColor(rb_g->backgroundRole(), Qt::black); + palette_g.setColor(rb_g->foregroundRole(), Qt::black); + rb_g->setPalette(palette_g); + + QPalette palette_b = rb_b->palette(); + palette_b.setColor(rb_b->backgroundRole(), Qt::black); + palette_b.setColor(rb_b->foregroundRole(), Qt::black); + rb_b->setPalette(palette_b); + + pNaZW->copydata2disp(); + + emit colorChanged(); + update(); + } + + void setGreenChannel() + { + if(rb_g->isCheckable()) + { + cur_c = 2; // green + pNaZW->setGreenChannel(); + + QPalette palette_r = rb_r->palette(); + palette_r.setColor(rb_r->backgroundRole(), Qt::black); + palette_r.setColor(rb_r->foregroundRole(), Qt::black); + rb_r->setPalette(palette_r); + + QPalette palette_g = rb_g->palette(); + palette_g.setColor(rb_g->backgroundRole(), Qt::green); + palette_g.setColor(rb_g->foregroundRole(), Qt::green); + rb_g->setPalette(palette_g); + + QPalette palette_b = rb_b->palette(); + palette_b.setColor(rb_b->backgroundRole(), Qt::black); + palette_b.setColor(rb_b->foregroundRole(), Qt::black); + rb_b->setPalette(palette_b); + + pNaZW->copydata2disp(); + + emit colorChanged(); + update(); + } + } + + void setBlueChannel() + { + if(rb_b->isCheckable()) + { + cur_c = 3; // blue + pNaZW->setBlueChannel(); + + QPalette palette_r = rb_r->palette(); + palette_r.setColor(rb_r->backgroundRole(), Qt::black); + palette_r.setColor(rb_r->foregroundRole(), Qt::black); + rb_r->setPalette(palette_r); + + QPalette palette_g = rb_g->palette(); + palette_g.setColor(rb_g->backgroundRole(), Qt::black); + palette_g.setColor(rb_g->foregroundRole(), Qt::black); + rb_g->setPalette(palette_g); + + QPalette palette_b = rb_b->palette(); + palette_b.setColor(rb_b->backgroundRole(), Qt::blue); + palette_b.setColor(rb_b->foregroundRole(), Qt::blue); + rb_b->setPalette(palette_b); + + pNaZW->copydata2disp(); + + emit colorChanged(); + update(); + } + + } + +public: + QGroupBox *viewGroup; + + QScrollBar *sb_z; + + NaZStackWidget *pNaZW; + + QRadioButton *rb_r; + QRadioButton *rb_g; + QRadioButton *rb_b; + + QLabel *l_sb; + QSpinBox *sb_sb; + + V3DLONG sx, sy, sz, sc; + V3DLONG cur_x, cur_y, cur_z, cur_c; + + QSize oriSize; + + int cr; + float ratio_x2y; + + float scale; + +}; + + +#endif + + + diff --git a/released_plugins/v3d_plugins/HDRfilter/hdrfilter.pro b/released_plugins/v3d_plugins/HDRfilter/hdrfilter.pro new file mode 100644 index 0000000000..912aab2912 --- /dev/null +++ b/released_plugins/v3d_plugins/HDRfilter/hdrfilter.pro @@ -0,0 +1,26 @@ + +TEMPLATE = lib +CONFIG += qt plugin warn_off +CONFIG += x86_64 + +V3DMAINDIR = ../../../v3d_main + +INCLUDEPATH += $$V3DMAINDIR/basic_c_fun + +HEADERS += hdrfilter.h +HEADERS += $$V3DMAINDIR/neuron_annotator/NaZStackWidget.h +HEADERS += $$V3DMAINDIR/basic_c_fun/stackutil.h +HEADERS += $$V3DMAINDIR/basic_c_fun/mg_utilities.h +HEADERS += $$V3DMAINDIR/basic_c_fun/mg_image_lib.h + +SOURCES += hdrfilter.cpp +SOURCES += $$V3DMAINDIR/neuron_annotator/NaZStackWidget.cpp +SOURCES += $$V3DMAINDIR/basic_c_fun/stackutil.cpp +SOURCES += $$V3DMAINDIR/basic_c_fun/mg_utilities.cpp +SOURCES += $$V3DMAINDIR/basic_c_fun/mg_image_lib.cpp + +LIBS += -lm -L$$V3DMAINDIR/common_lib/lib -lv3dtiff + +TARGET = $$qtLibraryTarget(hdrfilter) +DESTDIR = ../../v3d/plugins/image_filters/HDR_Filter + diff --git a/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.cpp b/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.cpp new file mode 100644 index 0000000000..7098216507 --- /dev/null +++ b/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.cpp @@ -0,0 +1,1332 @@ +/* cellcounter.cpp + * 2010-01-14: the program is created by Yang Yu + */ + +#include + +#include +#include +#include + +#include + +#include +#include + +#include "cellcounter.h" + +#include "../../../v3d_main/basic_c_fun/basic_surf_objs.h" +#include "../../../v3d_main/basic_c_fun/stackutil.h" +#include "../../../v3d_main/basic_c_fun/volimg_proc.h" +#include "../../../v3d_main/basic_c_fun/img_definition.h" +#include "../../../v3d_main/basic_c_fun/basic_landmark.h" + +#define INF 1E9 +#define PI 3.14159265 + +//Defining Puncta structure +struct CellStr +{ + double x, y, z; + double rx, ry, rz; + double volsize; + double intensity; + double sdev, pixmax, mass; + long num; +}; + +//Gaussian kernel and correlation compuating copy from ../cellseg/template_matching_seg.cpp +Vol3DSimple * genGaussianKernal3D(long szx, long szy, long szz, double sigmax, double sigmay, double sigmaz) +{ + if (szx<=0 || szy<=0 || szz<=0) {printf("Invalid sz parameter in genGaussianKernal3D().\n"); return 0;} + + Vol3DSimple * g = 0; + try + { + g = new Vol3DSimple (szx, szy, szz); + } + catch (...) + { + printf("Fail to create a kernel object.\n"); + return 0; + } + + double *** d3 = g->getData3dHandle(); + double sx2 = 2.0*sigmax*sigmax, sy2=2.0*sigmay*sigmay, sz2=2.0*sigmaz*sigmaz; + long cx=(szx-1)>>1, cy=(szy-1)>>1, cz=(szz-1)>>1; + long i,j,k; + for (k=0;k<=cz;k++) + for (j=0;j<=cy;j++) + for (i=0;i<=cx;i++) + { + d3[szz-1-k][szy-1-j][szx-1-i] = d3[szz-1-k][szy-1-j][i] = + d3[szz-1-k][j][szx-1-i] = d3[szz-1-k][j][i] = + d3[k][szy-1-j][szx-1-i] = d3[k][szy-1-j][i] = + d3[k][j][szx-1-i] = d3[k][j][i] = + exp(-double(i-cx)*(i-cx)/sx2-double(j-cy)*(j-cy)/sy2-double(k-cz)*(k-cz)/sz2); + } + return g; +} +template double compute_corrcoef_two_vectors(T1 *v1, T2 *v2, long len) +{ + if (!v1 || !v2 || len<=1) return 0; + + //first compute mean + double m1=0,m2=0; + long i; + for (i=0;iP-1) kend = P-1; + + if(P==1) kend=1; + + for (long j=0;jM-1) jend = M-1; + + if(M==1) jend=1; + + for (long i=0;iN-1) iend = N-1; + + if(N==1) iend=1; + + long idx_out = k*ssx*ssy + j*ssx + i; + + long sum=0; + + for(long kk=kstart; kk> 1; + WeightsX[Half] = 1.; + + for (unsigned int Weight = 1; Weight < Half + 1; ++Weight) + { + const float x = 3.* float (Weight) / float (Half); + WeightsX[Half - Weight] = WeightsX[Half + Weight] = exp(-x * x / 2.); // Corresponding symmetric WeightsX + } + + double k = 0.; + for (unsigned int Weight = 0; Weight < Wx; ++Weight) + k += WeightsX[Weight]; + + for (unsigned int Weight = 0; Weight < Wx; ++Weight) + WeightsX[Weight] /= k; + + + // Allocate 1-D extension array + float *extension_bufferX = 0; + extension_bufferX = new float [N + (Wx<<1)]; + + unsigned int offset = Wx>>1; + + // along x + const float *extStop = extension_bufferX + N + offset; + + for(long iz = 0; iz < P; iz++) + { + for(long iy = 0; iy < M; iy++) + { + float *extIter = extension_bufferX + Wx; + for(long ix = 0; ix < N; ix++) + { + *(extIter++) = pImage[iz*M*N + iy*N + ix]; + } + + // Extend image + const float *const stop_line = extension_bufferX - 1; + float *extLeft = extension_bufferX + Wx - 1; + const float *arrLeft = extLeft + 2; + float *extRight = extLeft + N + 1; + const float *arrRight = extRight - 2; + + while (extLeft > stop_line) + { + *(extLeft--) = *(arrLeft++); + *(extRight++) = *(arrRight--); + } + + // Filtering + extIter = extension_bufferX + offset; + + float *resIter = &(pImage[iz*M*N + iy*N]); + + while (extIter < extStop) + { + double sum = 0.; + const float *weightIter = WeightsX; + const float *const End = WeightsX + Wx; + const float * arrIter = extIter; + while (weightIter < End) + sum += *(weightIter++) * float (*(arrIter++)); + extIter++; + *(resIter++) = sum; + + //for rescale + if(max_val<*arrIter) max_val = *arrIter; + if(min_val>*arrIter) min_val = *arrIter; + } + } + } + + //de-alloc + if (WeightsX) {delete []WeightsX; WeightsX=0;} + if (extension_bufferX) {delete []extension_bufferX; extension_bufferX=0;} + + } + + // Filtering along y + if(M<2) + { + //do nothing + } + else + { + //create Gaussian kernel + float *WeightsY = 0; + WeightsY = new float [Wy]; + if (!WeightsY) + return; + + unsigned int Half = Wy >> 1; + WeightsY[Half] = 1.; + + for (unsigned int Weight = 1; Weight < Half + 1; ++Weight) + { + const float y = 3.* float (Weight) / float (Half); + WeightsY[Half - Weight] = WeightsY[Half + Weight] = exp(-y * y / 2.); // Corresponding symmetric WeightsY + } + + double k = 0.; + for (unsigned int Weight = 0; Weight < Wy; ++Weight) + k += WeightsY[Weight]; + + for (unsigned int Weight = 0; Weight < Wy; ++Weight) + WeightsY[Weight] /= k; + + // along y + float *extension_bufferY = 0; + extension_bufferY = new float [M + (Wy<<1)]; + + unsigned int offset = Wy>>1; + const float *extStop = extension_bufferY + M + offset; + + for(long iz = 0; iz < P; iz++) + { + for(long ix = 0; ix < N; ix++) + { + float *extIter = extension_bufferY + Wy; + for(long iy = 0; iy < M; iy++) + { + *(extIter++) = pImage[iz*M*N + iy*N + ix]; + } + + // Extend image + const float *const stop_line = extension_bufferY - 1; + float *extLeft = extension_bufferY + Wy - 1; + const float *arrLeft = extLeft + 2; + float *extRight = extLeft + M + 1; + const float *arrRight = extRight - 2; + + while (extLeft > stop_line) + { + *(extLeft--) = *(arrLeft++); + *(extRight++) = *(arrRight--); + } + + // Filtering + extIter = extension_bufferY + offset; + + float *resIter = &(pImage[iz*M*N + ix]); + + while (extIter < extStop) + { + double sum = 0.; + const float *weightIter = WeightsY; + const float *const End = WeightsY + Wy; + const float * arrIter = extIter; + while (weightIter < End) + sum += *(weightIter++) * float (*(arrIter++)); + extIter++; + *resIter = sum; + resIter += N; + + //for rescale + if(max_val<*arrIter) max_val = *arrIter; + if(min_val>*arrIter) min_val = *arrIter; + } + } + } + + //de-alloc + if (WeightsY) {delete []WeightsY; WeightsY=0;} + if (extension_bufferY) {delete []extension_bufferY; extension_bufferY=0;} + } + + // Filtering along z + if(P<2) + { + //do nothing + } + else + { + //create Gaussian kernel + float *WeightsZ = 0; + WeightsZ = new float [Wz]; + if (!WeightsZ) + return; + + unsigned int Half = Wz >> 1; + WeightsZ[Half] = 1.; + + for (unsigned int Weight = 1; Weight < Half + 1; ++Weight) + { + const float z = 3.* float (Weight) / float (Half); + WeightsZ[Half - Weight] = WeightsZ[Half + Weight] = exp(-z * z / 2.); // Corresponding symmetric WeightsZ + } + + double k = 0.; + for (unsigned int Weight = 0; Weight < Wz; ++Weight) + k += WeightsZ[Weight]; + + for (unsigned int Weight = 0; Weight < Wz; ++Weight) + WeightsZ[Weight] /= k; + + + // along z + float *extension_bufferZ = 0; + extension_bufferZ = new float [P + (Wz<<1)]; + + unsigned int offset = Wz>>1; + const float *extStop = extension_bufferZ + P + offset; + + for(long iy = 0; iy < M; iy++) + { + for(long ix = 0; ix < N; ix++) + { + + float *extIter = extension_bufferZ + Wz; + for(long iz = 0; iz < P; iz++) + { + *(extIter++) = pImage[iz*M*N + iy*N + ix]; + } + + // Extend image + const float *const stop_line = extension_bufferZ - 1; + float *extLeft = extension_bufferZ + Wz - 1; + const float *arrLeft = extLeft + 2; + float *extRight = extLeft + P + 1; + const float *arrRight = extRight - 2; + + while (extLeft > stop_line) + { + *(extLeft--) = *(arrLeft++); + *(extRight++) = *(arrRight--); + } + + // Filtering + extIter = extension_bufferZ + offset; + + float *resIter = &(pImage[iy*N + ix]); + + while (extIter < extStop) + { + double sum = 0.; + const float *weightIter = WeightsZ; + const float *const End = WeightsZ + Wz; + const float * arrIter = extIter; + while (weightIter < End) + sum += *(weightIter++) * float (*(arrIter++)); + extIter++; + *resIter = sum; + resIter += M*N; + + //for rescale + if(max_val<*arrIter) max_val = *arrIter; + if(min_val>*arrIter) min_val = *arrIter; + } + + } + } + + //de-alloc + if (WeightsZ) {delete []WeightsZ; WeightsZ=0;} + if (extension_bufferZ) {delete []extension_bufferZ; extension_bufferZ=0;} + + } + + //rescaling for display + float dist = max_val - min_val; + for(long k=0; kcurrentIndex(); + + Image4DSimple* subject = callback.getImage(win_list[i1]); + ROIList pRoiList=callback.getROI(win_list[i1]); + + QString m_InputFileName = callback.getImageName(win_list[i1]); + + qDebug()<<"datatype ..."<getDatatype(); + + if (!subject) + { + QMessageBox::information(0, title, QObject::tr("No image is open.")); + return; + } + if (subject->getDatatype()!=V3D_UINT8) + { + QMessageBox::information(0, title, QObject::tr("This demo program only supports 8-bit data. Your current image data type is not supported.")); + return; + } + + unsigned char* pSbject = subject->getRawData(); + + long sz0 = subject->getXDim(); + long sz1 = subject->getYDim(); + long sz2 = subject->getZDim(); + long sz3 = subject->getCDim(); + + long pagesz_sub = sz0*sz1*sz2; + + + //finding the bounding box of ROI + bool vxy=true,vyz=true,vzx=true; // 3 2d-views + + QRect b_xy = pRoiList.at(0).boundingRect(); + QRect b_yz = pRoiList.at(1).boundingRect(); + QRect b_zx = pRoiList.at(2).boundingRect(); + + if(b_xy.left()==-1 || b_xy.top()==-1 || b_xy.right()==-1 || b_xy.bottom()==-1) + vxy=false; + if(b_yz.left()==-1 || b_yz.top()==-1 || b_yz.right()==-1 || b_yz.bottom()==-1) + vyz=false; + if(b_zx.left()==-1 || b_zx.top()==-1 || b_zx.right()==-1 || b_zx.bottom()==-1) + vzx=false; + + long bpos_x, bpos_y, bpos_z, bpos_c, epos_x, epos_y, epos_z, epos_c; + + // 8 cases + if(vxy && vyz && vzx) // all 3 2d-views + { + bpos_x = qBound(long(0), long(qMax(b_xy.left(), b_zx.left())), sz0-1); + bpos_y = qBound(long(0), long(qMax(b_xy.top(), b_yz.top())), sz1-1); + bpos_z = qBound(long(0), long(qMax(b_yz.left(), b_zx.top())), sz2-1); + + epos_x = qBound(long(0), long(qMin(b_xy.right(), b_zx.right())), sz0-1); + epos_y = qBound(long(0), long(qMin(b_xy.bottom(), b_yz.bottom())), sz1-1); + epos_z = qBound(long(0), long(qMin(b_yz.right(), b_zx.bottom())), sz2-1); + } + else if(!vxy && vyz && vzx) // 2 of 3 + { + bpos_x = qBound(long(0), long(qMax(0, b_zx.left())), sz0-1); + bpos_y = qBound(long(0), long(qMax(0, b_yz.top())), sz1-1); + bpos_z = qBound(long(0), long(qMax(b_yz.left(), b_zx.top())), sz2-1); + + epos_x = qBound(long(0), long(fmin(sz0-1, b_zx.right())), sz0-1); + epos_y = qBound(long(0), long(fmin(sz1-1, b_yz.bottom())), sz1-1); + epos_z = qBound(long(0), long(qMin(b_yz.right(), b_zx.bottom())), sz2-1); + } + else if(vxy && !vyz && vzx) + { + bpos_x = qBound(long(0), long(qMax(b_xy.left(), b_zx.left())), sz0-1); + bpos_y = qBound(long(0), long(qMax(b_xy.top(), 0)), sz1-1); + bpos_z = qBound(long(0), long(qMax(0, b_zx.top())), sz2-1); + + epos_x = qBound(long(0), long(qMin(b_xy.right(), b_zx.right())), sz0-1); + epos_y = qBound(long(0), long(fmin(b_xy.bottom(), sz1-1)), sz1-1); + epos_z = qBound(long(0), long(fmin(sz2-1, b_zx.bottom())), sz2-1); + } + else if(vxy && vyz && !vzx) + { + bpos_x = qBound(long(0), long(qMax(b_xy.left(), 0)), sz0-1); + bpos_y = qBound(long(0), long(qMax(b_xy.top(), b_yz.top())), sz1-1); + bpos_z = qBound(long(0), long(qMax(b_yz.left(), 0)), sz2-1); + + epos_x = qBound(long(0), long(fmin(b_xy.right(), sz0-1)), sz0-1); + epos_y = qBound(long(0), long(qMin(b_xy.bottom(), b_yz.bottom())), sz1-1); + epos_z = qBound(long(0), long(fmin(b_yz.right(), sz2-1)), sz2-1); + } + else if(vxy && !vyz && !vzx) // only 1 of 3 + { + bpos_x = qBound(long(0), long(qMax(b_xy.left(), 0)), sz0-1); + bpos_y = qBound(long(0), long(qMax(b_xy.top(), 0)), sz1-1); + bpos_z = 0; + + epos_x = qBound(long(0), long(fmin(b_xy.right(), sz0-1)), sz0-1); + epos_y = qBound(long(0), long(fmin(b_xy.bottom(), sz1-1)), sz1-1); + epos_z = sz2-1; + } + else if(!vxy && vyz && !vzx) + { + bpos_x = 0; + bpos_y = qBound(long(0), long(qMax(0, b_yz.top())), sz1-1); + bpos_z = qBound(long(0), long(qMax(b_yz.left(), 0)), sz2-1); + + epos_x = sz0-1; + epos_y = qBound(long(0), long(fmin(sz1-1, b_yz.bottom())), sz1-1); + epos_z = qBound(long(0), long(fmin(b_yz.right(), sz2-1)), sz2-1); + } + else if(!vxy && !vyz && vzx) + { + bpos_x = qBound(long(0), long(qMax(0, b_zx.left())), sz0-1); + bpos_y = 0; + bpos_z = qBound(long(0), long(qMax(0, b_zx.top())), sz2-1); + + epos_x = qBound(long(0), long(fmin(sz0-1, b_zx.right())), sz0-1); + epos_y = sz1-1; + epos_z = qBound(long(0), long(fmin(sz2-1, b_zx.bottom())), sz2-1); + } + else // 0 + { + bpos_x = 0; + bpos_y = 0; + bpos_z = 0; + + epos_x = sz0-1; + epos_y = sz1-1; + epos_z = sz2-1; + } + + //qDebug("x %d y %d z %d x %d y %d z %d ",bpos_x,bpos_y,bpos_z,epos_x,epos_y,epos_z); + + //ROI extraction + long sx = (epos_x-bpos_x)+1; + long sy = (epos_y-bpos_y)+1; + long sz = (epos_z-bpos_z)+1; + long sc = 3; // 0,1,2 + + //choose the channel stack + long pagesz = sx*sy*sz; + + double meanv=0; + + // mmparameters + //------------------------------------------------------------------------------------------------------------------------------- + double gthresh = 4, Lthresh =30, lthresh = 5; //global and local thresholding /////////////////////////////////////// + double delta_th = 10; + double rx = 2, ry = 2, rz = 1; //////////////////////////////////////////////////// + double sigmax=1.5, sigmay=1.5, sigmaz=0.5; /////////////////////////////////////////////////////// + double t_corrcoef=0.66;//=0.3; //0.66 //////////////////////////////////////////////// + double shift_thresh = 10; + + long ch = 0; //////////////////////////////////////// + + int start_t = clock(); + + dialog.update(); + + rx = dialog.r_x; + ry = dialog.r_y; + rz = dialog.r_z; + + //qDebug("rx %lf ry %lf rz %lf ", rx, ry, rz); + + ch = dialog.ch_rgb; + + sigmax = dialog.sigma_x; + sigmay = dialog.sigma_y; + sigmaz = dialog.sigma_z; + + t_corrcoef = dialog.correlation_coeff; + + gthresh = dialog.global_th; + + Lthresh = dialog.high_th; + lthresh = dialog.low_th; + + //qDebug("Lthresh %lf lthresh %lf", Lthresh, lthresh); + + delta_th = dialog.delta_th; + + long offset_sub = ch*pagesz_sub; + + //qDebug("%ld %ld", ch, offset_sub); + //------------------------------------------------------------------------------------------------------------------------------------ + // scans time + int i_progress=0; + int num_progress = int((Lthresh-lthresh)/delta_th) + 8; // 5 preprocess + + // + QProgressDialog progress("Counting cell ...", "Abort Cell Counter", 0, num_progress, parent); + progress.setWindowModality(Qt::WindowModal); + + // a scan + progress.setValue(++i_progress); + + unsigned char *data1d = new unsigned char [sc*pagesz]; + if (!data1d) + { + printf("Fail to allocate memory.\n"); + return; + } + else + { + for(long k=bpos_z; k<=epos_z; k++) + { + long offset_z = k*sz0*sz1; + long offset_crop_z = (k-bpos_z)*sx*sy; + for(long j=bpos_y; j<=epos_y; j++) + { + long offset_y = j*sz0 + offset_z; + long offset_crop_y = (j-bpos_y)*sx + offset_crop_z; + for(long i=bpos_x; i<=epos_x; i++) + { + data1d[(i-bpos_x) + offset_crop_y] = pSbject[offset_sub + i+offset_y]; + + meanv += data1d[(i-bpos_x) + offset_crop_y]; + + if(sz3>1) + data1d[(i-bpos_x) + offset_crop_y + pagesz] = pSbject[i+offset_y+pagesz_sub]; + else + data1d[(i-bpos_x) + offset_crop_y + pagesz] = 0; + + data1d[(i-bpos_x) + offset_crop_y + 2*pagesz] = 0; //pSbject[i+offset_y+2*pagesz_sub]; + } + } + } + } + meanv /= pagesz; + + qDebug("mean value %lf", meanv); + + // a scan + progress.setValue(++i_progress); + + // down sampling + double scale_x = dialog.scale_x; + double scale_y = dialog.scale_y; + double scale_z = dialog.scale_z; + + long ds_sx = sx*scale_x; + long ds_sy = sy*scale_y; + long ds_sz = sz*scale_z; + + long ds_pagesz = ds_sx*ds_sy*ds_sz; + + unsigned char *ds_subject1d = new unsigned char [ds_pagesz]; + if (!ds_subject1d) + { + printf("Fail to allocate memory.\n"); + return; + } + + down_sampling(ds_subject1d, data1d, ds_sx, ds_sy, ds_sz, sx, sy, sz, scale_x, scale_y, scale_z); + + // de-alloc + if (data1d) {delete []data1d; data1d=0;} + + // -- + unsigned char *subject1d = ds_subject1d; + sx = ds_sx; + sy = ds_sy; + sz = ds_sz; + sc = 1; + + // a scan + progress.setValue(++i_progress); + + // gaussian filtering + int w_x = dialog.w_x; + int w_y = dialog.w_y; + int w_z = dialog.w_z; + + gaussianfiltering(subject1d, sx, sy, sz, w_x, w_y, w_z); + + // display + Image4DSimple p4DGF; + p4DGF.setData((unsigned char*)subject1d, sx, sy, sz, sc, V3D_UINT8); + + v3dhandle newGF = callback.newImageWindow(); + callback.setImage(newGF, &p4DGF); + callback.setImageName(newGF, "DownSampled_GaussFiltered"); + callback.updateImageWindow(newGF); + + // a scan + progress.setValue(++i_progress); + + // pre processing for template matching + + //local maxima + unsigned char *flag_lm = new unsigned char [pagesz]; + if (!flag_lm) + { + printf("Fail to allocate memory.\n"); + return; + } + else + { + //max filter + double maxfl = 0, minfl = INF; + unsigned int Wx=3, Wy=3, Wz=3; + + for(long iz = 0; iz < sz; iz++) + { + long offsetk = iz*sx*sy; + for(long iy = 0; iy < sy; iy++) + { + long offsetj = iy*sx; + for(long ix = 0; ix < sx; ix++) + { + maxfl = 0; //minfl = INF; + + long xb = ix-Wx; if(xb<0) xb = 0; + long xe = ix+Wx; if(xe>=sx-1) xe = sx-1; + long yb = iy-Wy; if(yb<0) yb = 0; + long ye = iy+Wy; if(ye>=sy-1) ye = sy-1; + long zb = iz-Wz; if(zb<0) zb = 0; + long ze = iz+Wz; if(ze>=sz-1) ze = sz-1; + + for(long k=zb; k<=ze; k++) + { + long offsetkl = k*sx*sy; + for(long j=yb; j<=ye; j++) + { + long offsetjl = j*sx; + for(long i=xb; i<=xe; i++) + { + long dataval = subject1d[ offsetkl + offsetjl + i]; + + if(maxfldataval) minfl = dataval; + } + } + } + + //set value + flag_lm[offsetk + offsetj + ix] = maxfl; + } + } + } + } + + // a scan + progress.setValue(++i_progress); + + for(long iz = 0; iz < sz; iz++) + { + long offsetk = iz*sx*sy; + for(long iy = 0; iy < sy; iy++) + { + long offsetj = iy*sx; + for(long ix = 0; ix < sx; ix++) + { + long idx = offsetk + offsetj + ix; + + if( (flag_lm[idx] == subject1d[idx]) && subject1d[idx]>meanv ) + flag_lm[idx] = 255; + else + flag_lm[idx] = 0; + } + } + } + + //template matching + //------------------------------------------------------------------------------------------------------------------------------- + + Vol3DSimple *inimg3d = new Vol3DSimple (sx, sy, sz); + unsigned char ***img3d = inimg3d->getData3dHandle(); + + Vol3DSimple *outimg3d = new Vol3DSimple (sx, sy, sz); + unsigned short int ***labelimgdata3d = outimg3d->getData3dHandle(); + + Vol3DSimple * flagimg = new Vol3DSimple (inimg3d); + if (!flagimg) return; + + // a scan + progress.setValue(++i_progress); + + //initialization + long i,j,k; + unsigned char *** flag_p3d = flagimg->getData3dHandle(); + long cellcnt=0; + + for(long iz = 0; iz < sz; iz++) + { + long offset_z = iz*sx*sy; + for(long iy =0; iy < sy; iy++) + { + long offset_y = offset_z + iy*sx; + for(long ix = 0; ix < sx; ix++) + { + img3d[iz][iy][ix] = subject1d[offset_y+ix]; + flag_p3d[iz][iy][ix] = 0; + labelimgdata3d[iz][iy][ix] = 0; + } + } + } + + //Set Parameters + std::vector detectedList; + CellStr pos; + + double t_pixval=gthresh, t_rgnval=lthresh; + long wx=2*rx+1, wy=2*ry+1, wz=2*rz+1; + + //qDebug("thresholding %f \n", t_pixval); + + + //computing + Vol3DSimple * g = genGaussianKernal3D(wx, wy, wz, sigmax, sigmay, sigmaz); + if (!g) return; + Vol3DSimple * d = new Vol3DSimple (wx, wy, wz); + if (!d) return; + long kernel_len = g->getTotalElementNumber(); + + double * g_1d = g->getData1dHandle(); + unsigned char * d_1d = d->getData1dHandle(); + unsigned char *** d_3d = d->getData3dHandle(); + + std::vector detectedPos; + + for(t_rgnval = Lthresh; t_rgnval >=lthresh; t_rgnval-=delta_th) + { + + //display the progress + //printf("t_rgnval %f \n", t_rgnval); + progress.setValue(++i_progress); + + if (progress.wasCanceled()) + break; + + + for (k=0;k(sz-1-rz)) //if at the border, then skip + continue; + + for (j=0;j(sy-1-ry)) //if at the border, then skip + continue; + + for (i=0;i(sx-1-rx)) //if at the border, then skip + continue; + + flag_p3d[k][j][i]=0; + } + } + } + + + for (k=0;k(sz-1-rz)) //if at the border, then skip + continue; + + for (j=0;j(sy-1-ry)) //if at the border, then skip + continue; + + for (i=0;i(sx-1-rx)) //if at the border, then skip + continue; + + if (flag_p3d[k][j][i]) //if the location has been masked, then skip + continue; + + if (img3d[k][j][i]<=t_pixval)//|| (img_subject + pagesz)[k*sx*sy+j*sx+i]<2*mean_green) //|| pImMask[k*sx*sy+j*sx+i]==0) //do not compute dark pixels and non-ROI region + { + flag_p3d[k][j][i]=1; + continue; + } + + if(labelimgdata3d[k][j][i]) + continue; + + if(!flag_lm[k*sx*sy + j*sx +i]) + continue; + + bool b_skip=false; + //copy data + long i1,j1,k1, i2,j2,k2; + for (k1=k-rz,k2=0;k1<=k+rz;k1++,k2++) + for (j1=j-ry,j2=0;j1<=j+ry;j1++,j2++) + for (i1=i-rx,i2=0;i1<=i+rx;i1++,i2++) + { + d_3d[k2][j2][i2] = img3d[k1][j1][i1]; + if (labelimgdata3d[k1][j1][i1]) + b_skip=true; + } + + if (b_skip==true) + continue; + + //test regional mean + unsigned char d_mean, d_std; + mean_and_std(d_1d, kernel_len, d_mean, d_std); + if (d_mean<1.5*t_rgnval) + { + flag_p3d[k][j][i]=1; + continue; + } + + //compute similarity measure using cross correlation + double score = compute_corrcoef_two_vectors(d_1d, g_1d, kernel_len); + flag_p3d[k][j][i] = 1; //do not search later + double rx_ms, ry_ms, rz_ms; + double ncx=i,ncy=j,ncz=k; //new center position + double ocx,ocy,ocz; //old center position + if (score>=t_corrcoef) + { + //first re-estimate the center + double scx=0,scy=0,scz=0,si=0; + while (1) //mean shift to estimate the true center + { + ocx=ncx; ocy=ncy; ocz=ncz; + + rx_ms = 1.2*rx + 0.5, ry_ms = 1.2*ry + 0.5, rz_ms = 1.2*rz + 0.5; //enlarge the radius + + for (k1=ocz-rz_ms;k1<=ocz+rz_ms;k1++) + { + if (k1<0 || k1>=sz) + continue; + for (j1=ocy-ry_ms;j1<=ocy+ry_ms;j1++) + { + if (j1<0 || j1>=sy) + continue; + for (i1=ocx-rx_ms;i1<=ocx+rx_ms;i1++) + { + if (i1<0 || i1>=sx) + continue; + double cv = img3d[k1][j1][i1]; + + if(cv0) + {ncx = scx/si; ncy = scy/si; ncz = scz/si;} + else + {ncx = ocx; ncy = ocy; ncz = ocz;} + + if (ncx=sx-1-rx || ncy=sy-1-ry || ncz=sz-1-rz) //move out of boundary + { + ncx = ocx; ncy = ocy; ncz = ocz; //use the last valid center + break; + } + + if (sqrt((ncx-ocx)*(ncx-ocx)+(ncy-ocy)*(ncy-ocy)+(ncz-ocz)*(ncz-ocz))<=1) + { + break; + } + } + + double lncx=ncx,lncy=ncy,lncz=ncz; + + scz=0; scy=0;scx=0;si=0; + double stdx, stdy, stdz; + + for (k1=lncz-rz_ms;k1<=lncz+rz_ms;k1++) + { + for (j1=lncy-ry_ms;j1<=lncy+ry_ms;j1++) + { + for (i1=lncx-rx_ms;i1<=lncx+rx_ms;i1++) + { + if(i1<0 || i1>sx-1 || j1 < 0 || j1 > sy-1 || k1 < 0 || k1 > sz-1) + continue; + else + { + double cv = img3d[k1][j1][i1]; + + scz += cv*(k1-lncz)*(k1-lncz); + scy += cv*(j1-lncy)*(j1-lncy); + scx += cv*(i1-lncx)*(i1-lncx); + si += cv; + } + } + } + } + + if (si>0) + { + stdx = sqrt(scx/si); stdy = sqrt(scy/si); stdz = sqrt(scz/si); + //printf("cell=%d, %5.3f (%5.3f) %5.3f (%5.3f) %5.3f (%5.3f)\n", cellcnt+1, lncx, stdx, lncy, stdy, lncz, stdz); + } + else + { + printf("Error happens in estimating the standard deviation in template_matching_seg(). Force setting std to be 1.\n"); + stdx = 1; stdy = 1; stdz = 1; + } + + //mask + LocationSimple pp(lncx, lncy, lncz); + detectedPos.push_back(pp); + cellcnt++; + long celllabel = cellcnt; + + //merging + bool merg_flag=false; + + double sa2b2c2 = 8*stdx*stdx*stdy*stdy*stdz*stdz; + double sa2b2 = 4*stdx*stdx*stdy*stdy; + double sb2c2 = 4*stdy*stdy*stdz*stdz; + double sa2c2 = 4*stdx*stdx*stdz*stdz; + + //output + pos.pixmax = 0; + pos.intensity = 0; + pos.sdev = 0; + pos.volsize = 0; + pos.mass = 0; + + for (k1=round(lncz-2*stdz);k1<=round(lncz+2*stdz);k1++) + { + for (j1=round(lncy-2*stdy);j1<=round(lncy+2*stdy);j1++) + { + for (i1=round(lncx-2*stdx);i1<=round(lncx+2*stdx);i1++) + { + if (k1>=0 && k1=0 && j1=0 && i1=0 && k1=0 && j1=0 && i1").arg(LABELBIN).arg(bpos_x).arg(epos_x).arg(bpos_y).arg(epos_y).arg(bpos_z).arg(epos_z); + + QString tmp=QString("The corresponding .apo file is saved as %1
").arg(m_OutputFileName); + sta_info.append(tmp); + + //save the output to a marker file + m_OutputFileName = m_InputFileName + QString(".x_%1_%2_y_%3_%4_z_%5_%6").arg(bpos_x).arg(epos_x).arg(bpos_y).arg(epos_y).arg(bpos_z).arg(epos_z) + ".marker"; + + FILE *pFileMarker=0; + + pFileMarker = fopen(m_OutputFileName.toStdString().c_str(),"wt"); + + LandmarkList cellList; + + for(long ii = 0; ii < LABELBIN; ii++) + { + ImageMarker S; + + S.z = detectedList.at(ii).z + 0.5 + 1; //for display 0-base -> 1-base + S.x = detectedList.at(ii).x + 0.5 + 1; + S.y = detectedList.at(ii).y + 0.5 + 1; + + + double vols = detectedList.at(ii).volsize; + + double r = pow( vols*3/4/PI, 1.0/3.0); + + S.radius = int(r+0.5); + S.shape = 1; + S.name = ""; + S.comment = ""; + + S.color = random_rgba8(255); + S.color.r = 128; + S.color.g = 128; + S.color.b = 128; + + S.type = (S.x==-1 || S.y==-1 || S.z==-1) ? 0 : 2; + + S.on = true; + S.selected = false; + + fprintf(pFileMarker, "%5.3f, %5.3f, %5.3f, %d, %ld, %s, %s, %d,%d,%d\n", + S.x, + S.y, + S.z, + int(S.radius), S.shape, + qPrintable(S.name), qPrintable(S.comment), + S.color.r,S.color.g,S.color.b + ); + + LocationSimple landmark(S.x, S.y, S.z); + cellList.push_back(landmark); + + } + fclose(pFileMarker); + + callback.setImageName(newGF, "cell_counted"); + callback.setLandmark(newGF, cellList); // + + // save a marker file for original image + m_OutputFileName = m_InputFileName + ".marker"; + + FILE *pFileMarkerUS=0; + + pFileMarkerUS = fopen(m_OutputFileName.toStdString().c_str(),"wt"); + + for(long ii = 0; ii < LABELBIN; ii++) + { + ImageMarker S; + + S.z = detectedList.at(ii).z / scale_z + bpos_z + 0.5 + 1; //for display 0-base -> 1-base + S.x = detectedList.at(ii).x / scale_x + bpos_x + 0.5 + 1; + S.y = detectedList.at(ii).y / scale_y + bpos_y + 0.5 + 1; + + + double vols = detectedList.at(ii).volsize; + + double r = pow( vols*3/4/PI, 1.0/3.0); + + S.radius = int(r+0.5); + S.shape = 1; + S.name = ""; + S.comment = ""; + + S.color = random_rgba8(255); + S.color.r = 128; + S.color.g = 128; + S.color.b = 128; + + S.type = (S.x==-1 || S.y==-1 || S.z==-1) ? 0 : 2; + + S.on = true; + S.selected = false; + + fprintf(pFileMarkerUS, "%5.3f, %5.3f, %5.3f, %d, %ld, %s, %s, %d,%d,%d\n", + S.x, + S.y, + S.z, + int(S.radius), S.shape, + qPrintable(S.name), qPrintable(S.comment), + S.color.r,S.color.g,S.color.b + ); + + } + fclose(pFileMarkerUS); // + + tmp=QString("The corresponding .marker file is saved as %1
").arg(m_OutputFileName); + sta_info.append(tmp); + + tmp=QString("
time eclapse %1 seconds for cell counting.
").arg((end_segmentation-start_t)/1000000); + sta_info.append(tmp); + + //showing statistics info + QTextEdit *pText=new QTextEdit(sta_info); + pText->resize(800, 200); + pText->setReadOnly(true); + pText->setFontPointSize(12); + pText->show(); + + + //de-alloc + if(outimg3d) {delete outimg3d; outimg3d=0;} + if(flag_lm) {delete flag_lm; flag_lm=0;} + +} diff --git a/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.h b/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.h new file mode 100644 index 0000000000..5315f48f85 --- /dev/null +++ b/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.h @@ -0,0 +1,362 @@ +/* cellcounter.h + * 2010-01-14: create this program by Yang Yu + */ + + +#ifndef __CELLCOUNTER_H__ +#define __CELLCOUNTER_H__ + + +// +#include +#include +#include +#include +#include +#include + +class CellCounterPlugin : public QObject, public V3DPluginInterface +{ + Q_OBJECT + Q_INTERFACES(V3DPluginInterface); + +public: + QStringList menulist() const; + void domenu(const QString &menu_name, V3DPluginCallback &callback, QWidget *parent); + + QStringList funclist() const {return QStringList();} + void dofunc(const QString &func_name, const V3DPluginArgList &input, V3DPluginArgList &output, QWidget *parent) {} + +}; + + +class CellCounterDialog : public QDialog +{ + Q_OBJECT + +public: + CellCounterDialog(V3DPluginCallback &callback, QWidget *parent) + { + v3dhandleList win_list = callback.getImageWindowList(); + + QStringList items; + for (int i=0; iaddItems(items); + + ok = new QPushButton("OK"); + cancel = new QPushButton("Cancel"); + + gridLayout = new QGridLayout(); + + label_subject = new QLabel(QObject::tr("Image (ROI): ")); + + gridLayout->addWidget(label_subject, 0,0,1,1); gridLayout->addWidget(combo_subject, 0,1,1,4); + + i1 = combo_subject->currentIndex(); + + Image4DSimple* subject = callback.getImage(win_list[i1]); + + // channel info + QStringList chList; + chList << "red" << "green" << "blue"; + combo_channel = new QComboBox(); combo_channel->addItems(chList); + + label_channel = new QLabel(QObject::tr("Searching Channel: ")); + + gridLayout->addWidget(label_channel, 3,0,1,1); gridLayout->addWidget(combo_channel, 3,1,1,4); + + ch_rgb = combo_channel->currentIndex(); + + //parameters + //ds + label_ds = new QLabel(QObject::tr("-- Down Sampling -- ")); + + gridLayout->addWidget(label_ds, 5,0); + + qsb_ds_scale_x = new QDoubleSpinBox(); + qsb_ds_scale_y = new QDoubleSpinBox(); + qsb_ds_scale_z = new QDoubleSpinBox(); + + qsb_ds_scale_x->setMaximum(1); qsb_ds_scale_x->setMinimum(0); qsb_ds_scale_x->setValue(0.5); qsb_ds_scale_x->setSingleStep(0.01); + qsb_ds_scale_y->setMaximum(1); qsb_ds_scale_y->setMinimum(0); qsb_ds_scale_y->setValue(0.5); qsb_ds_scale_y->setSingleStep(0.01); + qsb_ds_scale_z->setMaximum(1); qsb_ds_scale_z->setMinimum(0); qsb_ds_scale_z->setValue(0.5); qsb_ds_scale_z->setSingleStep(0.01); + + label_ds_scale_x = new QLabel(QObject::tr("scaling factor along x: ")); + label_ds_scale_y = new QLabel(QObject::tr("scaling factor along y: ")); + label_ds_scale_z = new QLabel(QObject::tr("scaling factor along z: ")); + + gridLayout->addWidget(label_ds_scale_x, 7,0,Qt::AlignLeft); gridLayout->addWidget(qsb_ds_scale_x, 7,1,Qt::AlignLeft); + gridLayout->addWidget(label_ds_scale_y, 8,0,Qt::AlignLeft); gridLayout->addWidget(qsb_ds_scale_y, 8,1,Qt::AlignLeft); + gridLayout->addWidget(label_ds_scale_z, 9,0,Qt::AlignLeft); gridLayout->addWidget(qsb_ds_scale_z, 9,1,Qt::AlignLeft); + + //gf + label_gf = new QLabel(QObject::tr("-- Gaussian Filtering -- ")); + + gridLayout->addWidget(label_gf, 11,0); + + qsb_gf_r_x = new QSpinBox(); + qsb_gf_r_y = new QSpinBox(); + qsb_gf_r_z = new QSpinBox(); + + qsb_gf_r_x->setMaximum(subject->getXDim()); qsb_gf_r_x->setMinimum(1); qsb_gf_r_x->setValue(10); qsb_gf_r_x->setSingleStep(1); + qsb_gf_r_y->setMaximum(subject->getYDim()); qsb_gf_r_y->setMinimum(1); qsb_gf_r_y->setValue(10); qsb_gf_r_y->setSingleStep(1); + qsb_gf_r_z->setMaximum(subject->getZDim()); qsb_gf_r_z->setMinimum(1); qsb_gf_r_z->setValue(10); qsb_gf_r_z->setSingleStep(1); + + label_gf_r_x = new QLabel(QObject::tr("filtering window radius along x (pixels): ")); + label_gf_r_y = new QLabel(QObject::tr("filtering window radius along y (pixels): ")); + label_gf_r_z = new QLabel(QObject::tr("filtering window radius along z (pixels): ")); + + gridLayout->addWidget(label_gf_r_x, 13,0,Qt::AlignLeft); gridLayout->addWidget(qsb_gf_r_x, 13,1,Qt::AlignLeft); + gridLayout->addWidget(label_gf_r_y, 14,0,Qt::AlignLeft); gridLayout->addWidget(qsb_gf_r_y, 14,1,Qt::AlignLeft); + gridLayout->addWidget(label_gf_r_z, 15,0,Qt::AlignLeft); gridLayout->addWidget(qsb_gf_r_z, 15,1,Qt::AlignLeft); + + //tm + label_tm = new QLabel(QObject::tr("-- Template Matching -- ")); + + gridLayout->addWidget(label_tm, 17,0); + + r_x = 4; r_y = 4; r_z = 4; + qsb_r_x = new QDoubleSpinBox(); + qsb_r_y = new QDoubleSpinBox(); + qsb_r_z = new QDoubleSpinBox(); + + qsb_r_x->setMaximum(50); qsb_r_x->setMinimum(0); qsb_r_x->setValue(r_x); qsb_r_x->setSingleStep(0.01); + qsb_r_y->setMaximum(50); qsb_r_y->setMinimum(0); qsb_r_y->setValue(r_y); qsb_r_y->setSingleStep(0.01); + qsb_r_z->setMaximum(50); qsb_r_z->setMinimum(0); qsb_r_z->setValue(r_z); qsb_r_z->setSingleStep(0.01); + + label_r_x = new QLabel(QObject::tr("radius along x (pixel): ")); + label_r_y = new QLabel(QObject::tr("radius along y (pixel): ")); + label_r_z = new QLabel(QObject::tr("radius along z (pixel): ")); + + gridLayout->addWidget(label_r_x, 19,0,Qt::AlignLeft); gridLayout->addWidget(qsb_r_x, 19,1,Qt::AlignLeft); + gridLayout->addWidget(label_r_y, 20,0,Qt::AlignLeft); gridLayout->addWidget(qsb_r_y, 20,1,Qt::AlignLeft); + gridLayout->addWidget(label_r_z, 21,0,Qt::AlignLeft); gridLayout->addWidget(qsb_r_z, 21,1,Qt::AlignLeft); + + sigma_x = 2; sigma_y = 2; sigma_z = 2; + qsb_sigma_x = new QDoubleSpinBox(); + qsb_sigma_y = new QDoubleSpinBox(); + qsb_sigma_z = new QDoubleSpinBox(); + + qsb_sigma_x->setMaximum(50); qsb_sigma_x->setMinimum(0); qsb_sigma_x->setValue(sigma_x); qsb_sigma_x->setSingleStep(0.01); + qsb_sigma_y->setMaximum(50); qsb_sigma_y->setMinimum(0); qsb_sigma_y->setValue(sigma_y); qsb_sigma_y->setSingleStep(0.01); + qsb_sigma_z->setMaximum(50); qsb_sigma_z->setMinimum(0); qsb_sigma_z->setValue(sigma_z); qsb_sigma_z->setSingleStep(0.01); + + label_sigma_x = new QLabel(QObject::tr("Gaussian sigma x: ")); + label_sigma_y = new QLabel(QObject::tr("Gaussian sigma y: ")); + label_sigma_z = new QLabel(QObject::tr("Gaussian sigma z: ")); + + gridLayout->addWidget(label_sigma_x, 19,2,Qt::AlignRight); gridLayout->addWidget(qsb_sigma_x, 19,4,Qt::AlignLeft); + gridLayout->addWidget(label_sigma_y, 20,2,Qt::AlignRight); gridLayout->addWidget(qsb_sigma_y, 20,4,Qt::AlignLeft); + gridLayout->addWidget(label_sigma_z, 21,2,Qt::AlignRight); gridLayout->addWidget(qsb_sigma_z, 21,4,Qt::AlignLeft); + + correlation_coeff = 0.75; + qsb_ccoeff = new QDoubleSpinBox(); + + qsb_ccoeff->setMaximum(1); qsb_ccoeff->setMinimum(0); qsb_ccoeff->setValue(correlation_coeff); qsb_ccoeff->setSingleStep(0.01); + + label_ccoeff = new QLabel(QObject::tr("correlation coefficient: ")); + + gridLayout->addWidget(label_ccoeff, 23,0,Qt::AlignLeft); gridLayout->addWidget(qsb_ccoeff, 23,1,Qt::AlignLeft); + + high_th = 50; low_th = 5; delta_th = 1; + qsb_high_th = new QDoubleSpinBox(); + qsb_low_th = new QDoubleSpinBox(); + qsb_delta_th = new QDoubleSpinBox(); + + qsb_high_th->setMaximum(255); qsb_high_th->setMinimum(0); qsb_high_th->setValue(high_th); qsb_high_th->setSingleStep(0.01); + qsb_low_th->setMaximum(255); qsb_low_th->setMinimum(0); qsb_low_th->setValue(low_th); qsb_low_th->setSingleStep(0.01); + qsb_delta_th->setMaximum(255); qsb_delta_th->setMinimum(0); qsb_delta_th->setValue(delta_th); qsb_delta_th->setSingleStep(0.01); + + label_high_th = new QLabel(QObject::tr("local threshlod (higher bound): ")); + label_low_th = new QLabel(QObject::tr("local threshlod (lower bound): ")); + label_delta_th = new QLabel(QObject::tr("local threshlod step: ")); + + gridLayout->addWidget(label_high_th, 29,0,Qt::AlignLeft); gridLayout->addWidget(qsb_high_th, 29,1,Qt::AlignLeft); + gridLayout->addWidget(label_low_th, 30,0,Qt::AlignLeft); gridLayout->addWidget(qsb_low_th, 30,1,Qt::AlignLeft); + gridLayout->addWidget(label_delta_th, 31,0,Qt::AlignLeft); gridLayout->addWidget(qsb_delta_th, 31,1,Qt::AlignLeft); + + global_th = 4; + qsb_global_th = new QDoubleSpinBox(); + + qsb_global_th->setMaximum(255); qsb_global_th->setMinimum(0); qsb_global_th->setValue(global_th); qsb_global_th->setSingleStep(0.01); + + label_global_th = new QLabel(QObject::tr("global threshold: ")); + + gridLayout->addWidget(label_global_th, 33,0,Qt::AlignLeft); gridLayout->addWidget(qsb_global_th, 33,1,Qt::AlignLeft); + + + //gridlayout + gridLayout->addWidget(cancel, 35,3,Qt::AlignRight); gridLayout->addWidget(ok, 35,4,Qt::AlignRight); + + setLayout(gridLayout); + setWindowTitle(QString("Cell Counter")); + + connect(ok, SIGNAL(clicked()), this, SLOT(accept())); + connect(cancel, SIGNAL(clicked()), this, SLOT(reject())); + + //slot interface + connect(qsb_ds_scale_x, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_ds_scale_y, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_ds_scale_z, SIGNAL(valueChanged(double)), this, SLOT(update())); + + connect(qsb_gf_r_x, SIGNAL(valueChanged(int)), this, SLOT(update())); + connect(qsb_gf_r_y, SIGNAL(valueChanged(int)), this, SLOT(update())); + connect(qsb_gf_r_z, SIGNAL(valueChanged(int)), this, SLOT(update())); + + connect(qsb_r_x, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_r_y, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_r_z, SIGNAL(valueChanged(double)), this, SLOT(update())); + + connect(qsb_sigma_x, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_sigma_y, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_sigma_z, SIGNAL(valueChanged(double)), this, SLOT(update())); + + connect(qsb_ccoeff, SIGNAL(valueChanged(double)), this, SLOT(update())); + + connect(qsb_high_th, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_low_th, SIGNAL(valueChanged(double)), this, SLOT(update())); + connect(qsb_delta_th, SIGNAL(valueChanged(double)), this, SLOT(update())); + + connect(qsb_global_th, SIGNAL(valueChanged(double)), this, SLOT(update())); + + connect(combo_subject, SIGNAL(currentIndexChanged(int)), this, SLOT(update())); + + connect(combo_channel, SIGNAL(valueChanged(int)), this, SLOT(update())); + + } + + ~CellCounterDialog(){} + + +public slots: + void update() + { + scale_x = qsb_ds_scale_x->text().toDouble(); + scale_y = qsb_ds_scale_y->text().toDouble(); + scale_z = qsb_ds_scale_z->text().toDouble(); + + w_x = qsb_gf_r_x->text().toInt(); + w_y = qsb_gf_r_y->text().toInt(); + w_z = qsb_gf_r_z->text().toInt(); + + r_x = qsb_r_x->text().toDouble(); + r_y = qsb_r_y->text().toDouble(); + r_z = qsb_r_z->text().toDouble(); + + sigma_x = qsb_sigma_x->text().toDouble(); + sigma_y = qsb_sigma_y->text().toDouble(); + sigma_z = qsb_sigma_z->text().toDouble(); + + correlation_coeff = qsb_ccoeff->text().toDouble(); + + high_th = qsb_high_th->text().toDouble(); + low_th = qsb_low_th->text().toDouble(); + delta_th = qsb_delta_th->text().toDouble(); + + global_th = qsb_global_th->text().toDouble(); + + ch_rgb = combo_channel->currentIndex(); + + i1 = combo_subject->currentIndex(); + } + + +public: + double r_x, r_y, r_z; + double sigma_x, sigma_y, sigma_z; + + double scale_x, scale_y, scale_z; + + int w_x, w_y, w_z; + + double correlation_coeff; + + double high_th, low_th, delta_th; + + double global_th; + + int i1,i2; + + int ch_rgb; + + QGridLayout *gridLayout; + + // down sampling + + QLabel *label_ds; + + QLabel *label_ds_scale_x; + QLabel *label_ds_scale_y; + QLabel *label_ds_scale_z; + + QDoubleSpinBox *qsb_ds_scale_x; + QDoubleSpinBox *qsb_ds_scale_y; + QDoubleSpinBox *qsb_ds_scale_z; + + // gaussian filtering + + QLabel *label_gf; + + QLabel *label_gf_r_x; + QLabel *label_gf_r_y; + QLabel *label_gf_r_z; + + QSpinBox *qsb_gf_r_x; + QSpinBox *qsb_gf_r_y; + QSpinBox *qsb_gf_r_z; + + // template matching + + QLabel *label_tm; + + QLabel *label_r_x; + QLabel *label_r_y; + QLabel *label_r_z; + + QLabel *label_sigma_x; + QLabel *label_sigma_y; + QLabel *label_sigma_z; + + QLabel *label_ccoeff; + + QLabel *label_high_th; + QLabel *label_low_th; + QLabel *label_delta_th; + + QLabel *label_global_th; + + QLabel *label_subject; + + QLabel *label_channel; + QComboBox* combo_channel; + + QDoubleSpinBox *qsb_r_x; + QDoubleSpinBox *qsb_r_y; + QDoubleSpinBox *qsb_r_z; + + QDoubleSpinBox *qsb_sigma_x; + QDoubleSpinBox *qsb_sigma_y; + QDoubleSpinBox *qsb_sigma_z; + + QDoubleSpinBox *qsb_ccoeff; + + QDoubleSpinBox *qsb_high_th; + QDoubleSpinBox *qsb_low_th; + QDoubleSpinBox *qsb_delta_th; + + QDoubleSpinBox *qsb_global_th; + + QComboBox* combo_subject; + + QPushButton* ok; + QPushButton* cancel; + +}; + + +#endif + + + diff --git a/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.pro b/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.pro new file mode 100644 index 0000000000..566aa1f0ee --- /dev/null +++ b/released_plugins/v3d_plugins/cellcounter_tm/cellcounter.pro @@ -0,0 +1,10 @@ + +TEMPLATE = lib +CONFIG += qt plugin warn_off +CONFIG += x86_64 +INCLUDEPATH += ../../../v3d_main/basic_c_fun +HEADERS = cellcounter.h +SOURCES = cellcounter.cpp +TARGET = $$qtLibraryTarget(cellcounter) +DESTDIR = ../../v3d/plugins/CellCounterUsingTemplateMatching + diff --git a/released_plugins/v3d_plugins/cellcounter_tm/readme b/released_plugins/v3d_plugins/cellcounter_tm/readme new file mode 100644 index 0000000000..666aac198e --- /dev/null +++ b/released_plugins/v3d_plugins/cellcounter_tm/readme @@ -0,0 +1,12 @@ + +Usage of Cell Counter Plugin: + +1) Open a image. + +2) Click Plugin Menu to choose CellCounterUsingTemplateMatching->Cell Counter + +3) Choose Parameters: image name, searching channel, Gaussian filter, Template size, etc. + +4) results will be automated saved as .marker file. + + diff --git a/v3d.config b/v3d.config new file mode 100644 index 0000000000..8cec188b38 --- /dev/null +++ b/v3d.config @@ -0,0 +1 @@ +// ADD PREDEFINED MACROS HERE! diff --git a/v3d.creator b/v3d.creator new file mode 100644 index 0000000000..e94cbbd302 --- /dev/null +++ b/v3d.creator @@ -0,0 +1 @@ +[General] diff --git a/v3d.files b/v3d.files new file mode 100644 index 0000000000..42ab901047 --- /dev/null +++ b/v3d.files @@ -0,0 +1,2344 @@ +2010_hackathon/brunsc/channel_manager/channel_manager_dialog.ui +2010_hackathon/brunsc/channel_manager/ChannelManager.cpp +2010_hackathon/brunsc/channel_manager/ChannelManager.h +2010_hackathon/brunsc/channel_manager/CMakeLists.txt +2010_hackathon/brunsc/movie_maker/CMakeLists.txt +2010_hackathon/brunsc/movie_maker/movie_maker.qrc +2010_hackathon/brunsc/movie_maker/movie_maker_dialog.ui +2010_hackathon/brunsc/movie_maker/MovieMaker.cpp +2010_hackathon/brunsc/movie_maker/MovieMaker.h +2010_hackathon/brunsc/movie_maker/resources/Arrowyellow.png +2010_hackathon/brunsc/python_console/CMakeLists.txt +2010_hackathon/brunsc/python_console/CommandRing.h +2010_hackathon/brunsc/python_console/convert_c_array_struct.h +2010_hackathon/brunsc/python_console/convert_qbool.cpp +2010_hackathon/brunsc/python_console/convert_qbool.h +2010_hackathon/brunsc/python_console/convert_qhash.h +2010_hackathon/brunsc/python_console/convert_qlist.h +2010_hackathon/brunsc/python_console/convert_qstring.cpp +2010_hackathon/brunsc/python_console/convert_qstring.h +2010_hackathon/brunsc/python_console/convert_simtk_vec3.cpp +2010_hackathon/brunsc/python_console/convert_simtk_vec3.hpp +2010_hackathon/brunsc/python_console/doc/api-objects.txt +2010_hackathon/brunsc/python_console/doc/crarr.png +2010_hackathon/brunsc/python_console/doc/epydoc.js +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_aspe.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_c_ar.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_c_ar_2.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_c_ar_3.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_c_ar_4.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_c_ar_5.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_fill.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_imag.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_imag_2.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_imag_3.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_loca.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_neur.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_neur_2.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_pxlo.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_pxlo_2.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qboo.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qlis.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qlis_2.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qlis_3.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qpoi.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qpol.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qrec.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qsiz.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qvec.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qwid.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_qwid_2.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_rgb1.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_rgb3.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_rgb3_2.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_rgb8.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_rgba.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_std_.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_time.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_triv.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_v3d_.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_view.gif +2010_hackathon/brunsc/python_console/doc/uml_class_diagram_for_v3d_xyz.gif +2010_hackathon/brunsc/python_console/generated_code/__call_policies.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/__convenience.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/c_array_float_3.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/c_array_float_3.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/c_array_int_3.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/c_array_int_3.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/c_array_less__double_comma__3__greater_.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/c_array_less__double_comma__3__greater_.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/c_array_short_3.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/c_array_short_3.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/c_array_uint_3.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/c_array_uint_3.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/c_array_uint_4.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/c_array_uint_4.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/CoordinateAxis.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/CoordinateAxis.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/double3x3.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/double3x3.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/Image4DSimple.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/Image4DSimple.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/ImageWindow.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/ImageWindow.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/algorithms.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/container_proxy.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/container_suite.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/container_traits.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/deque.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/element_proxy.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/element_proxy_traits.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/int_slice_helper.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/iterator_range.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/iterator_traits.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/list.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/map.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/methods.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/multimap.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/pair.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/proxy_iterator.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/python_iterator.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/registry_utils.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/set.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/shared_proxy_impl.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/slice.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/slice_handler.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/suite_utils.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/value_traits.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/vector.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/visitor.hpp +2010_hackathon/brunsc/python_console/generated_code/indexing_suite/workaround.hpp +2010_hackathon/brunsc/python_console/generated_code/LocationSimple.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/LocationSimple.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/NeuronSWC.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/NeuronSWC.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/NeuronTree.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/NeuronTree.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/QPoint.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/QPoint.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/QPolygon.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/QPolygon.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/QRect.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/QRect.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/QSize.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/QSize.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/Quaternion.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/Quaternion.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/QVector_QPoint.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/QVector_QPoint.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/QWidget.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/QWidget.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/RGB16i.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/RGB16i.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/RGB32f.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/RGB32f.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/RGB32i.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/RGB32i.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/RGB8.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/RGB8.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/RGBA8.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/RGBA8.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/Rotation.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/Rotation.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/TriviewControl.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/TriviewControl.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/v3d.main.cpp +2010_hackathon/brunsc/python_console/generated_code/v3d_enumerations.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/v3d_enumerations.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/v3d_free_functions.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/v3d_free_functions.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/v3d_global_variables.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/v3d_global_variables.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/V3D_GlobalSetting.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/V3D_GlobalSetting.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/V3DPluginArg_double3x3.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/V3DPluginArg_double3x3.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/V3DPluginArgItem.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/V3DPluginArgItem.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/Vec3.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/Vec3.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/View3DControl.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/View3DControl.pypp.hpp +2010_hackathon/brunsc/python_console/generated_code/XYZ.pypp.cpp +2010_hackathon/brunsc/python_console/generated_code/XYZ.pypp.hpp +2010_hackathon/brunsc/python_console/HOW_TO_BUILD.txt +2010_hackathon/brunsc/python_console/icons/200px-Gnome-document-open-recent.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-edit-copy.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-edit-cut.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-edit-paste.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-edit-redo.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-edit-select-all.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-edit-undo.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-zoom-in.svg.png +2010_hackathon/brunsc/python_console/icons/200px-Gnome-zoom-out.svg.png +2010_hackathon/brunsc/python_console/icons/python-logo-glassy.png +2010_hackathon/brunsc/python_console/icons/python-logo-glassy2.png +2010_hackathon/brunsc/python_console/icons/RedScriptAlt-128.png +2010_hackathon/brunsc/python_console/ImageWindow.h +2010_hackathon/brunsc/python_console/main_python_console.ui +2010_hackathon/brunsc/python_console/python_console.qrc +2010_hackathon/brunsc/python_console/python_editor/CMakeLists.txt +2010_hackathon/brunsc/python_console/python_editor/python_editor.qrc +2010_hackathon/brunsc/python_console/python_editor/python_editor.ui +2010_hackathon/brunsc/python_console/python_editor/PythonEditorWidget.cpp +2010_hackathon/brunsc/python_console/python_editor/PythonEditorWidget.h +2010_hackathon/brunsc/python_console/python_editor/PythonSyntaxHighlighter.cpp +2010_hackathon/brunsc/python_console/python_editor/PythonSyntaxHighlighter.h +2010_hackathon/brunsc/python_console/python_editor/testPythonEditor.cpp +2010_hackathon/brunsc/python_console/PythonConsolePlugin.cpp +2010_hackathon/brunsc/python_console/PythonConsolePlugin.h +2010_hackathon/brunsc/python_console/pythonConsoleTest.cpp +2010_hackathon/brunsc/python_console/PythonConsoleWindow.cpp +2010_hackathon/brunsc/python_console/PythonConsoleWindow.h +2010_hackathon/brunsc/python_console/PythonInterpreter.cpp +2010_hackathon/brunsc/python_console/PythonInterpreter.h +2010_hackathon/brunsc/python_console/qlist_py_indexing.h +2010_hackathon/brunsc/python_console/scripts/film_frame.png +2010_hackathon/brunsc/python_console/scripts/icons/arrow_right.png +2010_hackathon/brunsc/python_console/scripts/icons/film_frame.png +2010_hackathon/brunsc/python_console/scripts/icons/film_reel.png +2010_hackathon/brunsc/python_console/scripts/icons/pause.png +2010_hackathon/brunsc/python_console/scripts/icons/play.png +2010_hackathon/brunsc/python_console/scripts/icons/record.png +2010_hackathon/brunsc/python_console/scripts/icons/skip_ahead.png +2010_hackathon/brunsc/python_console/scripts/icons/skip_backward.png +2010_hackathon/brunsc/python_console/scripts/movie_maker_dialog.ui +2010_hackathon/brunsc/python_console/simtk/src/CMakeLists.txt +2010_hackathon/brunsc/python_console/simtk/src/Quaternion.cpp +2010_hackathon/brunsc/python_console/simtk/src/Rotation.cpp +2010_hackathon/brunsc/python_console/SimTKcommon/basics.h +2010_hackathon/brunsc/python_console/SimTKcommon/Constants.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Array.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/common.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/CompositeNumericalTypes.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Concretize.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/conjugate.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/CoordinateAxis.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Enumeration.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Exception.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/ExceptionMacros.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Fortran.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Mat.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/negator.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/NTraits.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Quaternion.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/ResultType.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Rotation.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Row.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/SmallMatrixMixed.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/StableArray.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Stage.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/String.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/SymMat.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/UnitVec.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Value.h +2010_hackathon/brunsc/python_console/SimTKcommon/internal/Vec.h +2010_hackathon/brunsc/python_console/SimTKcommon/Scalar.h +2010_hackathon/brunsc/python_console/SimTKcommon/SmallMatrix.h +2010_hackathon/brunsc/python_console/SimTKcommon/TemplatizedLapack.h +2010_hackathon/brunsc/python_console/SimTKlapack.h +2010_hackathon/brunsc/python_console/v3d_qt_environment.h +2010_hackathon/brunsc/python_console/V3DPythonModule.cpp +2010_hackathon/brunsc/python_console/V3DPythonModule.h +2010_hackathon/brunsc/python_console/vec3_container_traits.hpp +2010_hackathon/brunsc/python_console/wrappable_v3d.cpp +2010_hackathon/brunsc/python_console/wrappable_v3d.h +2010_hackathon/brunsc/stereo_renderer/StereoRenderer.h +2010_hackathon/grwu/DiffeomorphicDemons/CMakeLists.txt +2010_hackathon/grwu/DiffeomorphicDemons/DiffeomorphicDemons.cxx +2010_hackathon/grwu/DiffeomorphicDemons/DiffeomorphicDemons.h +2010_hackathon/ITK-V3D-Plugins/CMake/PluginConfiguration.cmake +2010_hackathon/ITK-V3D-Plugins/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/CTestConfig.cmake +2010_hackathon/ITK-V3D-Plugins/env_variable_pref.txt +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Add.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Add.h +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Divide.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Divide.h +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Multiply.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Multiply.h +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Subtract.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic/Subtract.h +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/And.cxx +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/And.h +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/Mask.cxx +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/Mask.h +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/MaskNegated.cxx +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/MaskNegated.h +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/NOT.cxx +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/NOT.h +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/Or.cxx +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/Or.h +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/Xor.cxx +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic/Xor.h +2010_hackathon/ITK-V3D-Plugins/Source/Classification/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Classification/itkVectorImageKmeansImageFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Classification/Kmeans.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Classification/Kmeans.h +2010_hackathon/ITK-V3D-Plugins/Source/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Common/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Common/CommonTests.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Common/itkEventToQtSignalTranslator.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Common/itkEventToQtSignalTranslator.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKFilterBaseImage.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKFilterDualImage.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKFilterNullImage.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKFilterSingleImage.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKGenericDialog.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKGenericDialog.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKImageSelectionDialog.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKImageSelectionDialog.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKPluginBaseSingleImage.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKPluginBaseSingleImage.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKPluginDefaultHeader.h +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKProgressDialog.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Common/V3DITKProgressDialog.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/ApproximateSignedDistanceMap.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/ApproximateSignedDistanceMap.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/ContourDirectedMeanDistance.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/ContourDirectedMeanDistance.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/ContourMeanDistance.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/ContourMeanDistance.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/DanielssonDistanceMap.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/DanielssonDistanceMap.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/DirectedHausdorffDistance.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/DirectedHausdorffDistance.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/HausdorffDistance.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/HausdorffDistance.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/SignedDanielssonDistanceMap.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/SignedDanielssonDistanceMap.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/SignedMaurerDistanceMap.cxx +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/SignedMaurerDistanceMap.h +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps/TODO.txt +2010_hackathon/ITK-V3D-Plugins/Source/EdgeDetection/CannyEdgeDetection.cxx +2010_hackathon/ITK-V3D-Plugins/Source/EdgeDetection/CannyEdgeDetection.h +2010_hackathon/ITK-V3D-Plugins/Source/EdgeDetection/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/EdgeDetection/GradientMagnitudeRecursiveGaussian.cxx +2010_hackathon/ITK-V3D-Plugins/Source/EdgeDetection/GradientMagnitudeRecursiveGaussian.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryShapeKeepNObjects.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryShapeKeepNObjects.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryShapeOpening.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryShapeOpening.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryStatisticsKeepNObjects.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryStatisticsKeepNObjects.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryStatisticsOpening.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/BinaryStatisticsOpening.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/ConnectedComponents.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/ConnectedComponents.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelContour.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelContour.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelGeometry.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelGeometry.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelOverlay.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelOverlay.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelShapeStatistics.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/LabelShapeStatistics.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/ObjectFilter_Shape.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/ObjectFilter_Shape.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/RelabelObjects.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/RelabelObjects.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/ShapeRelabel.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/ShapeRelabel.h +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/StatisticsRelabel.cxx +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects/StatisticsRelabel.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Abs.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Abs.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Acos.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Acos.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Asin.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Asin.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Atan.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Atan.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/BoundedReciprocal.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/BoundedReciprocal.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Cast.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Cast.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/ChangeLabel.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/ChangeLabel.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Cos.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Cos.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/EdgePotential.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/EdgePotential.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Exp.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Exp.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/ExpNegative.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/ExpNegative.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/IntensityWindowing.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/IntensityWindowing.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/InvertIntensity.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/InvertIntensity.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Log.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Log.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Log10.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Log10.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Modulus.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Modulus.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/RescaleIntensity.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/RescaleIntensity.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Sigmoid.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Sigmoid.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Sin.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Sin.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Sqrt.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Sqrt.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Square.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Square.h +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Tan.cxx +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation/Tan.h +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKCannySegmentation.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKCannySegmentation.h +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKFastMarching.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKFastMarching.h +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKFastMarchingPlus.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKFastMarchingPlus.h +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKGeodesicActiveContour.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKGeodesicActiveContour.h +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKShapeDetection.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKShapeDetection.h +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKThresholdSegmentation.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets/ITKThresholdSegmentation.h +2010_hackathon/ITK-V3D-Plugins/Source/LoadData/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/LoadData/Load3DImageFile.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LoadData/Load3DImageFile.h +2010_hackathon/ITK-V3D-Plugins/Source/LoadData/Save3DImageFile.cxx +2010_hackathon/ITK-V3D-Plugins/Source/LoadData/Save3DImageFile.h +2010_hackathon/ITK-V3D-Plugins/Source/MathMorphology/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/MathMorphology/Erode.cxx +2010_hackathon/ITK-V3D-Plugins/Source/MathMorphology/Erode.h +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing/ITKConfidenceConnected.cxx +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing/ITKConfidenceConnected.h +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing/ITKConnectedThreshold.cxx +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing/ITKConnectedThreshold.h +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing/ITKIsolatedConnected.cxx +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing/ITKIsolatedConnected.h +2010_hackathon/ITK-V3D-Plugins/Source/Registration/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Registration/DemonsRegistration.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Registration/DemonsRegistration.h +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationAffine.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationAffine.h +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationBSpline.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationBSpline.h +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationBSpline_2D.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationBSpline_2D.h +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationBSpline_3D.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Registration/RegistrationBSpline_3D.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/BilateralFilter.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/BilateralFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/CurvatureAnisotropicDiffusion.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/CurvatureAnisotropicDiffusion.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/CurvatureFlow.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/CurvatureFlow.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/DiscreteGaussianFilter.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/DiscreteGaussianFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/GradientAnisotropicDiffusion.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/GradientAnisotropicDiffusion.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/MeanFilter.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/MeanFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/MedianFilter.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/MedianFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/MinMaxCurvatureFlow.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing/MinMaxCurvatureFlow.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/BinaryThreshold.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/BinaryThreshold.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/DoubleThreshold.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/DoubleThreshold.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/KappaSigmaThreshold.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/KappaSigmaThreshold.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/OtsuMultipleThresholds.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/OtsuMultipleThresholds.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/OtsuThreshold.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/OtsuThreshold.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/RobustAutomaticThreshold.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/RobustAutomaticThreshold.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/ThresholdLabeler.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/ThresholdLabeler.h +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/ThresholdMaximumConnectedComponents.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding/ThresholdMaximumConnectedComponents.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/CMakeLists.txt +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/itkConsolidationLabelImageFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/itkDownwardFrontPropagationLabelImageFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/itkEndorseFrontPropagationImageFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/itkFrontPropagationLabelImageFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/itkHoleFillingFrontPropagationLabelImageFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/ITKMorphologicalWatershedFromMarkers.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/ITKMorphologicalWatershedFromMarkers.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/itkVotingBinaryHoleFillFloodingImageFilter.h +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/ITKWatershed.cxx +2010_hackathon/ITK-V3D-Plugins/Source/Watershed/ITKWatershed.h +2010_hackathon/ITK-V3D-Plugins/Testing/CMakeLists.txt +2010_hackathon/steerableFilters3d/Cube.h +2010_hackathon/steerableFilters3d/polynomial.h +2010_hackathon/steerableFilters3d/readme.txt +2010_hackathon/steerableFilters3d/SteerableFilter3D.cpp +2010_hackathon/steerableFilters3d/SteerableFilter3D.h +2010_hackathon/steerableFilters3d/steerableFilters3d.pro +2010_hackathon/steerableFilters3d/steerdialog.cpp +2010_hackathon/steerableFilters3d/steerdialog.h +2010_hackathon/steerableFilters3d/steerdialog.ui +2010_hackathon/steerableFilters3d/steerPlugin.cpp +2010_hackathon/steerableFilters3d/steerPlugin.h +2010_hackathon/steerableFilters3d/utils.cpp +2010_hackathon/steerableFilters3d/utils.h +2010_hackathon/wavelets/crashTest3.cpp +2010_hackathon/wavelets/crashTest3.h +2010_hackathon/wavelets/crashTest3.pro +2010_hackathon/wavelets/gaussianspotdetector.cpp +2010_hackathon/wavelets/gaussianspotdetector.h +2010_hackathon/wavelets/gaussianspotdetector.pro +2010_hackathon/wavelets/ioV3dUtils.cpp +2010_hackathon/wavelets/ioV3dUtils.h +2010_hackathon/wavelets/scaleinfo.cpp +2010_hackathon/wavelets/scaleinfo.h +2010_hackathon/wavelets/v3d_utils.cpp +2010_hackathon/wavelets/v3d_utils.h +2010_hackathon/wavelets/waveletConfigException.cpp +2010_hackathon/wavelets/waveletConfigException.h +2010_hackathon/wavelets/wavelets.cpp +2010_hackathon/wavelets/wavelets.h +2010_hackathon/wavelets/wavelets.pro +2010_hackathon/wavelets/waveletTransform.cpp +2010_hackathon/wavelets/waveletTransform.h +2010_hackathon/yang_jz/Canny/Canny.cpp +2010_hackathon/yang_jz/Canny/Canny.h +2010_hackathon/yang_jz/Canny/Canny.pro +2010_hackathon/yang_jz/mapview/colormap.h +2010_hackathon/yang_jz/mapview/mapviewer.cpp +2010_hackathon/yang_jz/mapview/mapviewer.h +2010_hackathon/yang_jz/mapview/mapviewer.pro +2010_hackathon/yang_jz/mapview/mg_image_lib11.cpp +2010_hackathon/yang_jz/mapview/mg_image_lib11.h +2010_hackathon/yang_jz/mapview/stackutil-11.cpp +2010_hackathon/yang_jz/mapview/stackutil-11.h +2010_hackathon/yang_jz/Tip_Detection/Tip_Detection.cpp +2010_hackathon/yang_jz/Tip_Detection/Tip_Detection.h +2010_hackathon/yang_jz/Tip_Detection/Tip_Detection.pro +2010_hackathon/yuy/miviewer/miviewer.cpp +2010_hackathon/yuy/miviewer/miviewer.h +2010_hackathon/yuy/miviewer/miviewer.pro +CMakeLists.txt +doc/api/CMakeLists.txt +doc/api/html/basic__4dimage_8cpp__incl.png +doc/api/html/basic__4dimage_8h__dep__incl.png +doc/api/html/basic__4dimage_8h__incl.png +doc/api/html/basic__landmark_8h__dep__incl.png +doc/api/html/basic__landmark_8h__incl.png +doc/api/html/basic__memory_8cpp__dep__incl.png +doc/api/html/basic__memory_8cpp__incl.png +doc/api/html/basic__memory_8h__dep__incl.png +doc/api/html/basic__memory_8h__incl.png +doc/api/html/basic__surf__objs_8cpp__incl.png +doc/api/html/basic__surf__objs_8h__dep__incl.png +doc/api/html/basic__surf__objs_8h__incl.png +doc/api/html/basic__thread_8h__incl.png +doc/api/html/basic__triview_8h__dep__incl.png +doc/api/html/basic__triview_8h__incl.png +doc/api/html/basic__view3d_8h__dep__incl.png +doc/api/html/bc_s.png +doc/api/html/c__array__struct_8hpp__dep__incl.png +doc/api/html/classc__array__coll__graph.png +doc/api/html/classc__array__inherit__graph.png +doc/api/html/classImage2DSimple__coll__graph.png +doc/api/html/classTransaction__inherit__graph.png +doc/api/html/classUpdateTVTransaction__coll__graph.png +doc/api/html/classUpdateTVTransaction__inherit__graph.png +doc/api/html/classV3DPluginCallback2__coll__graph.png +doc/api/html/classV3DPluginCallback2__inherit__graph.png +doc/api/html/classV3DPluginCallback__inherit__graph.png +doc/api/html/classV3DPluginInterface2__1__coll__graph.png +doc/api/html/classV3DPluginInterface2__1__inherit__graph.png +doc/api/html/classV3DPluginInterface2__inherit__graph.png +doc/api/html/classV3DSingleImageInterface2__1__coll__graph.png +doc/api/html/classV3DSingleImageInterface2__1__inherit__graph.png +doc/api/html/classV3DSingleImageInterface__inherit__graph.png +doc/api/html/classVol3DSimple__coll__graph.png +doc/api/html/closed.png +doc/api/html/color__xyz_8h__dep__incl.png +doc/api/html/color__xyz_8h__incl.png +doc/api/html/dir_37aba53db48e6e9a88f62b3471dbd79b_dep.png +doc/api/html/dir_517a1b8ff811a6b9c05fa7b7282fc397_dep.png +doc/api/html/dir_79c2461e7879020e14a293460a193225_dep.png +doc/api/html/doxygen.png +doc/api/html/ftv2blank.png +doc/api/html/ftv2doc.png +doc/api/html/ftv2folderclosed.png +doc/api/html/ftv2folderopen.png +doc/api/html/ftv2lastnode.png +doc/api/html/ftv2link.png +doc/api/html/ftv2mlastnode.png +doc/api/html/ftv2mnode.png +doc/api/html/ftv2node.png +doc/api/html/ftv2plastnode.png +doc/api/html/ftv2pnode.png +doc/api/html/ftv2splitbar.png +doc/api/html/ftv2vertline.png +doc/api/html/graph_legend.png +doc/api/html/imageio__mylib_8cpp__incl.png +doc/api/html/imageio__mylib_8h__dep__incl.png +doc/api/html/img__definition_8h__incl.png +doc/api/html/inherit_graph_0.png +doc/api/html/inherit_graph_1.png +doc/api/html/inherit_graph_10.png +doc/api/html/inherit_graph_11.png +doc/api/html/inherit_graph_12.png +doc/api/html/inherit_graph_13.png +doc/api/html/inherit_graph_14.png +doc/api/html/inherit_graph_15.png +doc/api/html/inherit_graph_16.png +doc/api/html/inherit_graph_17.png +doc/api/html/inherit_graph_18.png +doc/api/html/inherit_graph_19.png +doc/api/html/inherit_graph_2.png +doc/api/html/inherit_graph_20.png +doc/api/html/inherit_graph_21.png +doc/api/html/inherit_graph_22.png +doc/api/html/inherit_graph_23.png +doc/api/html/inherit_graph_24.png +doc/api/html/inherit_graph_25.png +doc/api/html/inherit_graph_26.png +doc/api/html/inherit_graph_27.png +doc/api/html/inherit_graph_28.png +doc/api/html/inherit_graph_29.png +doc/api/html/inherit_graph_3.png +doc/api/html/inherit_graph_30.png +doc/api/html/inherit_graph_31.png +doc/api/html/inherit_graph_32.png +doc/api/html/inherit_graph_33.png +doc/api/html/inherit_graph_34.png +doc/api/html/inherit_graph_35.png +doc/api/html/inherit_graph_36.png +doc/api/html/inherit_graph_37.png +doc/api/html/inherit_graph_38.png +doc/api/html/inherit_graph_39.png +doc/api/html/inherit_graph_4.png +doc/api/html/inherit_graph_40.png +doc/api/html/inherit_graph_41.png +doc/api/html/inherit_graph_42.png +doc/api/html/inherit_graph_43.png +doc/api/html/inherit_graph_44.png +doc/api/html/inherit_graph_45.png +doc/api/html/inherit_graph_46.png +doc/api/html/inherit_graph_47.png +doc/api/html/inherit_graph_48.png +doc/api/html/inherit_graph_49.png +doc/api/html/inherit_graph_5.png +doc/api/html/inherit_graph_6.png +doc/api/html/inherit_graph_7.png +doc/api/html/inherit_graph_8.png +doc/api/html/inherit_graph_9.png +doc/api/html/jquery.js +doc/api/html/mg__image__lib_8cpp__incl.png +doc/api/html/mg__image__lib_8h__dep__incl.png +doc/api/html/mg__image__lib_8h__incl.png +doc/api/html/mg__utilities_8cpp__incl.png +doc/api/html/mg__utilities_8h__dep__incl.png +doc/api/html/mg__utilities_8h__incl.png +doc/api/html/nav_f.png +doc/api/html/nav_h.png +doc/api/html/navtree.js +doc/api/html/open.png +doc/api/html/resize.js +doc/api/html/search/close.png +doc/api/html/search/mag_sel.png +doc/api/html/search/search.js +doc/api/html/search/search_l.png +doc/api/html/search/search_m.png +doc/api/html/search/search_r.png +doc/api/html/stackutil_8cpp__incl.png +doc/api/html/stackutil_8h__dep__incl.png +doc/api/html/stackutil_8h__incl.png +doc/api/html/struct____Image__coll__graph.png +doc/api/html/struct____Stack__coll__graph.png +doc/api/html/structABGR8__coll__graph.png +doc/api/html/structArg__Details__coll__graph.png +doc/api/html/structBasicSurfObj__coll__graph.png +doc/api/html/structBasicSurfObj__inherit__graph.png +doc/api/html/structBGR8__coll__graph.png +doc/api/html/structBGRA8__coll__graph.png +doc/api/html/structCellAPO__coll__graph.png +doc/api/html/structCellAPO__inherit__graph.png +doc/api/html/structImageMarker__coll__graph.png +doc/api/html/structImageMarker__inherit__graph.png +doc/api/html/structLabelSurf__coll__graph.png +doc/api/html/structLabelSurf__inherit__graph.png +doc/api/html/structLocationSimple__coll__graph.png +doc/api/html/structNeuronSWC__coll__graph.png +doc/api/html/structNeuronSWC__inherit__graph.png +doc/api/html/structNeuronTree__coll__graph.png +doc/api/html/structNeuronTree__inherit__graph.png +doc/api/html/structRGB16i__coll__graph.png +doc/api/html/structRGB32f__coll__graph.png +doc/api/html/structRGB32i__coll__graph.png +doc/api/html/structRGB8__coll__graph.png +doc/api/html/structRGBA16i__coll__graph.png +doc/api/html/structRGBA32f__coll__graph.png +doc/api/html/structRGBA32i__coll__graph.png +doc/api/html/structRGBA8__coll__graph.png +doc/api/html/structv3d__imaging__paras__coll__graph.png +doc/api/html/structXYZ__coll__graph.png +doc/api/html/tab_a.png +doc/api/html/tab_b.png +doc/api/html/tab_h.png +doc/api/html/tab_s.png +doc/api/html/v3d__basicdatatype_8h__dep__incl.png +doc/api/html/v3d__curvetracepara_8h__incl.png +doc/api/html/v3d__global__preference_8h__dep__incl.png +doc/api/html/v3d__imaging__para_8h__incl.png +doc/api/html/v3d__interface_8h__dep__incl.png +doc/api/html/v3d__interface_8h__incl.png +doc/api/html/v3d__message_8cpp__incl.png +doc/api/html/v3d__message_8h__dep__incl.png +doc/api/html/v3d__message_8h__incl.png +doc/api/html/v3d__multithreadimageio__para_8h__incl.png +doc/api/html/vcdiff_8cpp__incl.png +doc/api/html/vcdiff_8h__dep__incl.png +doc/api/html/vcdiff_8h__incl.png +doc/api/html/volimg__proc_8h__incl.png +doc/api/html/volimg__proc__declare_8h__dep__incl.png +doc/api/html/volimg__proc__declare_8h__incl.png +doc/release_checklist.txt +matlab_io_basicdatatype/basic_memory.cpp +matlab_io_basicdatatype/basic_memory.h +matlab_io_basicdatatype/checkMachineEndian.cpp +matlab_io_basicdatatype/elementmexheader.h +matlab_io_basicdatatype/load_v3d_apo_file.m +matlab_io_basicdatatype/load_v3d_marker_file.m +matlab_io_basicdatatype/load_v3d_neuron_file.m +matlab_io_basicdatatype/load_v3d_pointcloud_file.m +matlab_io_basicdatatype/load_v3d_raw_img_file.m +matlab_io_basicdatatype/load_v3d_swc_file.m +matlab_io_basicdatatype/loadfilelist.m +matlab_io_basicdatatype/loadRaw2Stack.m +matlab_io_basicdatatype/loadRaw2Stack_c.cpp +matlab_io_basicdatatype/loadRaw2Stack_c_2byte.cpp +matlab_io_basicdatatype/makeosmex_rawfile_io.m +matlab_io_basicdatatype/mg_image_lib.cpp +matlab_io_basicdatatype/mg_image_lib.h +matlab_io_basicdatatype/mg_utilities.cpp +matlab_io_basicdatatype/mg_utilities.h +matlab_io_basicdatatype/README.txt +matlab_io_basicdatatype/save_v3d_apo_file.m +matlab_io_basicdatatype/save_v3d_marker_file.m +matlab_io_basicdatatype/save_v3d_pointcloud_file.m +matlab_io_basicdatatype/save_v3d_raw_img_file.m +matlab_io_basicdatatype/save_v3d_swc_file.m +matlab_io_basicdatatype/savefilelist.m +matlab_io_basicdatatype/saveStack2File_c.cpp +matlab_io_basicdatatype/stackutil.cpp +matlab_io_basicdatatype/stackutil.h +matlab_io_basicdatatype/trimmed_str.m +released_plugins/CMake/PluginConfiguration.cmake +released_plugins/CMakeLists.txt +released_plugins/CTestConfig.cmake +released_plugins/special_v3d_plugins/bioformat/bioFormat_ex.cpp +released_plugins/special_v3d_plugins/bioformat/bioFormat_ex.h +released_plugins/special_v3d_plugins/bioformat/bioFormat_ex_32.pro +released_plugins/special_v3d_plugins/bioformat/bioFormat_ex_64.pro +released_plugins/special_v3d_plugins/bioformat/bioFormat_ex_win32.pro +released_plugins/special_v3d_plugins/bioformat/bioFormat_ex_win64.pro +released_plugins/special_v3d_plugins/bioformat/CMakeLists.txt +released_plugins/special_v3d_plugins/bioformat/dependent/CMakeLists.txt +released_plugins/special_v3d_plugins/bioformat/dependent/include/bio-formats.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/BaseException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/counted_ptr.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/ElementProxy.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/ElementProxyHelper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JArguments.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JArray.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JArrayHelper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/javacast.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JClass.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JClassImpl.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JConstructor.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JEnlister.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JFactory.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JField.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JFieldHelper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JFieldProxy.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JFieldProxyHelper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JMethod.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JNIException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JNIHelper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/JSignature.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/namespace.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/OptionList.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/os_dep.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/Peer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/color/ColorSpace.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/Component.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/Container.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/event/ActionListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/event/KeyListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/event/MouseMotionListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/Frame.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/image/ColorModel.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/image/DataBuffer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/image/ImageObserver.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/MenuContainer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/Transparency.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/Window.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/beans/PropertyChangeListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/Closeable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/DataInput.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/DataOutput.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/FileFilter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/Flushable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/InputStream.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/IOException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/OutputStream.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io/Serializable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Boolean.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Byte.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Character.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/CharSequence.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Cloneable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Comparable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Double.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Enum.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Exception.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Float.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Integer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Iterable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Long.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Number.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Object.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Runnable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Short.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/String.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Thread.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang/Throwable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/AbstractCollection.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/AbstractList.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/AbstractMap.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/ArrayList.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/Collection.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/Comparator.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/Dictionary.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/EventListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/HashMap.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/Hashtable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/List.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/Map.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util/RandomAccess.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/accessibility/Accessible.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/event/ChangeListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/filechooser/FileFilter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/JComponent.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/JFrame.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/JLabel.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/JPanel.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/RootPaneContainer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/SwingConstants.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/tree/DefaultTreeCellRenderer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/tree/TreeCellRenderer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/WindowConstants.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/JObject.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/JValue.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/ByteArrayHandle.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/BZip2Handle.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/CBZip2InputStream.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/CompressedRandomAccess.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/CRC.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/DataTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/DateTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/FileHandle.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/GZipHandle.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/HandleException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/IniList.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/IniParser.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/IniTable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/IRandomAccess.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/Location.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/Log.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/LogTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/RandomAccessInputStream.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/RandomAccessOutputStream.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/ReflectedUniverse.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/ReflectException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/Region.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/URLHandle.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/XMLTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common/ZipHandle.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/AxisGuesser.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/ByteArraySource.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/Cache.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CacheEvent.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CacheException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CacheListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CacheReporter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CacheSource.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CacheStrategy.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CacheUpdater.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/CrosshairStrategy.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/ICacheSource.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/ICacheStrategy.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache/RectangleStrategy.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ChannelFiller.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ChannelMerger.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ChannelSeparator.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ClassList.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/Base64Codec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/BaseCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/BitBuffer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/BitWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/ByteVector.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/Codec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/CodecOptions.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/HuffmanCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/HuffmanCodecOptions.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/JPEG2000Codec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/JPEG2000CodecOptions.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/JPEGCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/LosslessJPEGCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/LuraWaveCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/LZOCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/LZWCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/MJPBCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/MJPBCodecOptions.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/MSRLECodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/MSVideoCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/NikonCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/NikonCodecOptions.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/PackbitsCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/QTRLECodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/RPZACodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec/ZlibCodec.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/CoreMetadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/DelegateReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/DimensionSwapper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/AcquisitionMode.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/ArcType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/Binning.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/ContrastMethod.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/Correction.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/DetectorType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/DimensionOrder.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/Enumeration.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/EnumerationException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/EnumerationProvider.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/ExperimentType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/FilamentType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/FilterType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/FontFamily.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/FontStyle.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/AcquisitionModeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/ArcTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/BinningEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/ContrastMethodEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/CorrectionEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/DetectorTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/DimensionOrderEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/ExperimentTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/FilamentTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/FilterTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/FontFamilyEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/FontStyleEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/IEnumerationHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/IlluminationTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/ImmersionEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/LaserMediumEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/LaserTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/LineCapEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/MarkerEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/MediumEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/MicrobeamManipulationTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/MicroscopeTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/NamingConventionEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/PixelTypeEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler/PulseEnumHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/IEnumerationProvider.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/IlluminationType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/Immersion.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/LaserMedium.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/LaserType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/LineCap.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/Marker.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/Medium.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/MicrobeamManipulationType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/MicroscopeType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/NamingConvention.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/PixelType.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/Pulse.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FileInfo.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FilePattern.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FileStitcher.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FormatException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FormatHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FormatReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FormatTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/FormatWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/AWTImageTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/AWTTiffTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/BufferedImageReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/BufferedImageSource.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/BufferedImageWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/CacheComponent.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/CacheIndicator.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/ComboFileFilter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/DataConverter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/ExtensionFileFilter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/FormatFileFilter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/GUITools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/ImageViewer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/Index16ColorModel.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/LegacyQTTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/NoExtensionFileFilter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/PreviewPane.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/SignedByteBuffer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/SignedColorModel.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/SignedShortBuffer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/TwoChannelColorSpace.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/UnsignedIntBuffer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/UnsignedIntColorModel.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/XMLCellRenderer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui/XMLWindow.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/IFormatHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/IFormatReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/IFormatWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ImageReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ImageTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ImageWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/AliconaReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/AmiraReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/AnalyzeReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/APLReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/APNGReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ARFReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/AVIReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/BaseTiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/BioRadReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/BMPReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/CellomicsReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/DeltavisionReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/DicomReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/EPSReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/FakeReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/FEIReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/FitsReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/FlexReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/FluoviewReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/FV1000Reader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/GatanReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/GelReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/GIFReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ICSReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ImageIOReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ImarisHDFReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ImarisReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ImarisTiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ImprovisionTiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/InCellReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/IPLabReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/IPWReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/IvisionReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/JPEG2000Reader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/JPEGReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/KhorosReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/L2DReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/LegacyND2Reader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/LegacyQTReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/LeicaHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/LeicaReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/LiFlimReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/LIFReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/LIMReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MDBParser.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MetamorphHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MetamorphReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MetamorphTiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MIASReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MicromanagerReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MINCReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MinimalTiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MNGReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MRCReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/MRWReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/NAFReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/NativeND2Reader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/NativeQTReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ND2Reader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/NiftiReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/NikonReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/NikonTiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/NRRDReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/OMETiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/OMEXMLReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/OpenlabRawReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/OpenlabReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/PCIReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/PCXReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/PerkinElmerReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/PGMReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/PictReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/PrairieReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/PSDReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/QTReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ScanrReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/SDTInfo.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/SDTReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/SEQReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/SlidebookReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/SVSReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/TCSReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/TiffReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/TillVisionReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/VisitechReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ZeissLSMReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ZeissZVIReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in/ZipReader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/AggregateMetadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/DummyMetadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/FilterMetadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/IMetadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/IMinMaxStore.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/MetadataConverter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/MetadataRetrieve.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta/MetadataStore.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/MetadataTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/MinMaxCalculator.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/MissingLibraryException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/NetcdfTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/NumberFilter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome/OmeisException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome/OmeisImporter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome/OMEXML2003FCMetadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome/OMEXML200706Metadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome/OMEXML200802Metadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome/OMEXML200809Metadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome/OMEXMLMetadata.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/APNGWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/AVIWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/EPSWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/ICSWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/ImageIOWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/JPEG2000Writer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/JPEGWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/LegacyQTWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/OMETiffWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/OMEXMLWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/QTWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out/TiffWriter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/POITools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ReaderWrapper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/StatusEvent.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/StatusListener.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/StatusReporter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/IFD.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/IFDList.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/PhotoInterp.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/TiffCompression.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/TiffConstants.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/TiffIFDEntry.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/TiffParser.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/TiffRational.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/TiffSaver.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff/TiffTools.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/AmiraParameters.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/CacheConsole.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/EditTiffG.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/ImageConverter.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/ImageInfo.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/PrintDomains.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/PrintFormatTable.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/StatusEchoer.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/TiffComment.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/XMLIndent.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools/XMLValidate.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/UnknownFormatException.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/WriterWrapper.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/org/xml/sax/ContentHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/org/xml/sax/DTDHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/org/xml/sax/EntityResolver.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/org/xml/sax/ErrorHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/org/xml/sax/helpers/DefaultHandler.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JBoolean.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JByte.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JChar.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JDouble.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JFloat.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JInt.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JLong.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JShort.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types/JVoid.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/StaticVmLoader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/UnixVmLoader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/VmLoader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/Win32VmLoader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/WrapperVmLoader.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace.h +released_plugins/special_v3d_plugins/bioformat/dependent/include/loci-common.h +released_plugins/special_v3d_plugins/bioformat/imageIO_bioformat.cpp +released_plugins/special_v3d_plugins/bioformat/imageIO_bioformat.h +released_plugins/special_v3d_plugins/CMakeLists.txt +released_plugins/v3d_plugins/5dstackconverter/CMakeLists.txt +released_plugins/v3d_plugins/5dstackconverter/movieZCswitch.cpp +released_plugins/v3d_plugins/5dstackconverter/movieZCswitch.h +released_plugins/v3d_plugins/5dstackconverter/movieZCswitch.pro +released_plugins/v3d_plugins/ada_threshold/ada_threshold.cpp +released_plugins/v3d_plugins/ada_threshold/ada_threshold.h +released_plugins/v3d_plugins/ada_threshold/ada_threshold.pro +released_plugins/v3d_plugins/ada_threshold/CMakeLists.txt +released_plugins/v3d_plugins/canvas_eraser/canvas_eraser.cpp +released_plugins/v3d_plugins/canvas_eraser/canvas_eraser.h +released_plugins/v3d_plugins/canvas_eraser/canvas_eraser.pro +released_plugins/v3d_plugins/canvas_eraser/CMakeLists.txt +released_plugins/v3d_plugins/change_pixel_value/change_pixel_value.pro +released_plugins/v3d_plugins/change_pixel_value/CMakeLists.txt +released_plugins/v3d_plugins/change_pixel_value/updatepxlvalplugin.cpp +released_plugins/v3d_plugins/change_pixel_value/updatepxlvalplugin.h +released_plugins/v3d_plugins/CMakeLists.txt +released_plugins/v3d_plugins/datatype_cnvrt/CMakeLists.txt +released_plugins/v3d_plugins/datatype_cnvrt/datatypecnvrt.cpp +released_plugins/v3d_plugins/datatype_cnvrt/datatypecnvrt.h +released_plugins/v3d_plugins/datatype_cnvrt/datatypecnvrt.pro +released_plugins/v3d_plugins/dt/CMakeLists.txt +released_plugins/v3d_plugins/dt/dt.cpp +released_plugins/v3d_plugins/dt/dt.h +released_plugins/v3d_plugins/dt/dt.pro +released_plugins/v3d_plugins/dt/FL_bwdist.h +released_plugins/v3d_plugins/edge_of_maskimg/CMakeLists.txt +released_plugins/v3d_plugins/edge_of_maskimg/edge_of_maskimg.cpp +released_plugins/v3d_plugins/edge_of_maskimg/edge_of_maskimg.h +released_plugins/v3d_plugins/edge_of_maskimg/edge_of_maskimg.pro +released_plugins/v3d_plugins/gaussianfilter/CMakeLists.txt +released_plugins/v3d_plugins/gaussianfilter/gaussianfilter.pro +released_plugins/v3d_plugins/gaussianfilter/gaussianfilterplugin.cpp +released_plugins/v3d_plugins/gaussianfilter/gaussianfilterplugin.h +released_plugins/v3d_plugins/image_xyz_resolution/CMakeLists.txt +released_plugins/v3d_plugins/image_xyz_resolution/reset_xyz_resolution.cpp +released_plugins/v3d_plugins/image_xyz_resolution/reset_xyz_resolution.h +released_plugins/v3d_plugins/image_xyz_resolution/reset_xyz_resolution.pro +released_plugins/v3d_plugins/istitch/CMakeLists.txt +released_plugins/v3d_plugins/istitch/istitch.cpp +released_plugins/v3d_plugins/istitch/istitch.h +released_plugins/v3d_plugins/istitch/istitch.pro +released_plugins/v3d_plugins/istitch/istitch_gui.h +released_plugins/v3d_plugins/istitch/y_imglib.h +released_plugins/v3d_plugins/linkerfile_generator/CMakeLists.txt +released_plugins/v3d_plugins/linkerfile_generator/linker_file_generator.cpp +released_plugins/v3d_plugins/linkerfile_generator/linker_file_generator.h +released_plugins/v3d_plugins/linkerfile_generator/linker_file_generator.pro +released_plugins/v3d_plugins/minMaxfilter/CMakeLists.txt +released_plugins/v3d_plugins/minMaxfilter/minMaxfilter.pro +released_plugins/v3d_plugins/minMaxfilter/minMaxfilterplugin.cpp +released_plugins/v3d_plugins/minMaxfilter/minMaxfilterplugin.h +released_plugins/v3d_plugins/montage_image_z_sections/CMakeLists.txt +released_plugins/v3d_plugins/montage_image_z_sections/montage_image_sections.cpp +released_plugins/v3d_plugins/montage_image_z_sections/montage_image_sections.h +released_plugins/v3d_plugins/montage_image_z_sections/montage_image_sections.pro +released_plugins/v3d_plugins/principalskeleton_detection/main/main_principalskeleton_detection_domain.pro +released_plugins/v3d_plugins/principalskeleton_detection/main_principalskeleton_detection_domain.cpp +released_plugins/v3d_plugins/principalskeleton_detection/plugin_principalskeleton_detection.cpp +released_plugins/v3d_plugins/principalskeleton_detection/plugin_principalskeleton_detection.h +released_plugins/v3d_plugins/principalskeleton_detection/plugin_principalskeleton_detection.pro +released_plugins/v3d_plugins/principalskeleton_detection/q_morphology.cpp +released_plugins/v3d_plugins/principalskeleton_detection/q_morphology.h +released_plugins/v3d_plugins/principalskeleton_detection/q_neurontree_segmentation.cpp +released_plugins/v3d_plugins/principalskeleton_detection/q_neurontree_segmentation.h +released_plugins/v3d_plugins/principalskeleton_detection/q_principalskeleton_detection.cpp +released_plugins/v3d_plugins/principalskeleton_detection/q_principalskeleton_detection.h +released_plugins/v3d_plugins/principalskeleton_detection/q_skeletonbased_warp_sub2tar.cpp +released_plugins/v3d_plugins/principalskeleton_detection/q_skeletonbased_warp_sub2tar.h +released_plugins/v3d_plugins/recenterimage/CMakeLists.txt +released_plugins/v3d_plugins/recenterimage/recenterimage.pro +released_plugins/v3d_plugins/recenterimage/recenterimageplugin.cpp +released_plugins/v3d_plugins/recenterimage/recenterimageplugin.h +released_plugins/v3d_plugins/regiongrow/CMakeLists.txt +released_plugins/v3d_plugins/regiongrow/regiongrow.cpp +released_plugins/v3d_plugins/regiongrow/regiongrow.h +released_plugins/v3d_plugins/regiongrow/regiongrow.pro +released_plugins/v3d_plugins/roi_editor/CMakeLists.txt +released_plugins/v3d_plugins/roi_editor/roi_editor.cpp +released_plugins/v3d_plugins/roi_editor/roi_editor.h +released_plugins/v3d_plugins/roi_editor/roi_editor.pro +released_plugins/v3d_plugins/rotateimg90/CMakeLists.txt +released_plugins/v3d_plugins/rotateimg90/rotateimg90.cpp +released_plugins/v3d_plugins/rotateimg90/rotateimg90.h +released_plugins/v3d_plugins/rotateimg90/rotateimg90.pro +released_plugins/v3d_plugins/simple_movie_from3dviewer/CMakeLists.txt +released_plugins/v3d_plugins/simple_movie_from3dviewer/plugin_moviefrom3dviewer.cpp +released_plugins/v3d_plugins/simple_movie_from3dviewer/plugin_moviefrom3dviewer.h +released_plugins/v3d_plugins/simple_movie_from3dviewer/plugin_moviefrom3dviewer.pro +released_plugins/v3d_plugins/swc_to_maskimage/CMakeLists.txt +released_plugins/v3d_plugins/swc_to_maskimage/swc_to_maskimage.cpp +released_plugins/v3d_plugins/swc_to_maskimage/swc_to_maskimage.h +released_plugins/v3d_plugins/swc_to_maskimage/swc_to_maskimage.pro +released_plugins/v3d_plugins/v3dplugin_call_each_other_example/CMakeLists.txt +released_plugins/v3d_plugins/v3dplugin_call_each_other_example/ex_call.cpp +released_plugins/v3d_plugins/v3dplugin_call_each_other_example/ex_call.h +released_plugins/v3d_plugins/v3dplugin_call_each_other_example/ex_call.pro +released_plugins/v3d_plugins/v3dplugin_call_each_other_example/ex_matrix.cpp +released_plugins/v3d_plugins/v3dplugin_call_each_other_example/ex_matrix.h +released_plugins/v3d_plugins/v3dplugin_call_each_other_example/ex_matrix.pro +released_plugins/v3d_plugins/v3dplugin_multi_image_interface_example/CMakeLists.txt +released_plugins/v3d_plugins/v3dplugin_multi_image_interface_example/newwindow.pro +released_plugins/v3d_plugins/v3dplugin_multi_image_interface_example/newwindowplugin.cpp +released_plugins/v3d_plugins/v3dplugin_multi_image_interface_example/newwindowplugin.h +released_plugins/v3d_plugins/v3dplugin_push_image_and_object_example/CMakeLists.txt +released_plugins/v3d_plugins/v3dplugin_push_image_and_object_example/ex_push.cpp +released_plugins/v3d_plugins/v3dplugin_push_image_and_object_example/ex_push.h +released_plugins/v3d_plugins/v3dplugin_push_image_and_object_example/ex_push.pro +released_plugins/v3d_plugins/v3dplugin_single_image_interface_example/CMakeLists.txt +released_plugins/v3d_plugins/v3dplugin_single_image_interface_example/extrafilters.pro +released_plugins/v3d_plugins/v3dplugin_single_image_interface_example/extrafiltersplugin.cpp +released_plugins/v3d_plugins/v3dplugin_single_image_interface_example/extrafiltersplugin.h +v3d_main/3drenderer/3drenderer.pro +v3d_main/3drenderer/3drenderer.qrc +v3d_main/3drenderer/barFigureDialog.cpp +v3d_main/3drenderer/barFigureDialog.h +v3d_main/3drenderer/CMakeLists.txt +v3d_main/3drenderer/freeglut_geometry_r.c +v3d_main/3drenderer/GLee_r.c +v3d_main/3drenderer/GLee_r.h +v3d_main/3drenderer/glsl_r.cpp +v3d_main/3drenderer/glsl_r.h +v3d_main/3drenderer/gradients.cpp +v3d_main/3drenderer/gradients.h +v3d_main/3drenderer/hoverpoints.cpp +v3d_main/3drenderer/hoverpoints.h +v3d_main/3drenderer/ItemEditor.cpp +v3d_main/3drenderer/ItemEditor.h +v3d_main/3drenderer/marchingcubes.cpp +v3d_main/3drenderer/marchingcubes.h +v3d_main/3drenderer/qtr_widget.h +v3d_main/3drenderer/README.txt +v3d_main/3drenderer/renderer.cpp +v3d_main/3drenderer/renderer.h +v3d_main/3drenderer/Renderer_gl2.cpp +v3d_main/3drenderer/Renderer_gl2.h +v3d_main/3drenderer/renderer_hit2.cpp +v3d_main/3drenderer/renderer_labelfield.cpp +v3d_main/3drenderer/renderer_obj2.cpp +v3d_main/3drenderer/renderer_tex2.cpp +v3d_main/3drenderer/renderer_tex2.h +v3d_main/3drenderer/shader/color_fragment.txt +v3d_main/3drenderer/shader/color_vertex.txt +v3d_main/3drenderer/shader/lighting.txt +v3d_main/3drenderer/shader/obj_fragment.txt +v3d_main/3drenderer/shader/tex_fragment.txt +v3d_main/3drenderer/shader/vertex_normal.txt +v3d_main/3drenderer/test_main.cpp +v3d_main/3drenderer/v3dr_colormapDialog.cpp +v3d_main/3drenderer/v3dr_colormapDialog.h +v3d_main/3drenderer/v3dr_common.h +v3d_main/3drenderer/v3dr_control_signal.cpp +v3d_main/3drenderer/v3dr_glwidget.cpp +v3d_main/3drenderer/v3dr_glwidget.h +v3d_main/3drenderer/v3dr_mainwindow.cpp +v3d_main/3drenderer/v3dr_mainwindow.h +v3d_main/3drenderer/v3dr_surfaceDialog.cpp +v3d_main/3drenderer/v3dr_surfaceDialog.h +v3d_main/basic_c_fun/basic_4dimage.cpp +v3d_main/basic_c_fun/basic_4dimage.h +v3d_main/basic_c_fun/basic_landmark.h +v3d_main/basic_c_fun/basic_memory.cpp +v3d_main/basic_c_fun/basic_memory.h +v3d_main/basic_c_fun/basic_surf_objs.cpp +v3d_main/basic_c_fun/basic_surf_objs.h +v3d_main/basic_c_fun/basic_thread.h +v3d_main/basic_c_fun/basic_triview.h +v3d_main/basic_c_fun/basic_view3d.h +v3d_main/basic_c_fun/c_array_struct.hpp +v3d_main/basic_c_fun/CMakeLists.txt +v3d_main/basic_c_fun/color_xyz.h +v3d_main/basic_c_fun/customary_structs/v3d_imaging_para.h +v3d_main/basic_c_fun/customary_structs/v3d_multithreadimageio_para.h +v3d_main/basic_c_fun/imageio_mylib.cpp +v3d_main/basic_c_fun/imageio_mylib.h +v3d_main/basic_c_fun/img_definition.h +v3d_main/basic_c_fun/mg_image_lib.cpp +v3d_main/basic_c_fun/mg_image_lib.h +v3d_main/basic_c_fun/mg_utilities.cpp +v3d_main/basic_c_fun/mg_utilities.h +v3d_main/basic_c_fun/os_cpu.h +v3d_main/basic_c_fun/stackutil.cpp +v3d_main/basic_c_fun/stackutil.h +v3d_main/basic_c_fun/v3d_basicdatatype.h +v3d_main/basic_c_fun/v3d_curvetracepara.h +v3d_main/basic_c_fun/v3d_global_preference.h +v3d_main/basic_c_fun/v3d_interface.h +v3d_main/basic_c_fun/v3d_message.cpp +v3d_main/basic_c_fun/v3d_message.h +v3d_main/basic_c_fun/vcdiff.cpp +v3d_main/basic_c_fun/vcdiff.h +v3d_main/basic_c_fun/volimg_proc.h +v3d_main/basic_c_fun/volimg_proc_declare.h +v3d_main/cellseg/bwlabel.h +v3d_main/cellseg/CMakeLists.txt +v3d_main/cellseg/FL_accessory.h +v3d_main/cellseg/FL_adaptiveThreshold3D.h +v3d_main/cellseg/FL_bwdist.h +v3d_main/cellseg/FL_bwlabel2D3D.h +v3d_main/cellseg/FL_cellSegmentation3D.h +v3d_main/cellseg/FL_coordDefinition.h +v3d_main/cellseg/FL_defType.h +v3d_main/cellseg/FL_distanceTransform3D.h +v3d_main/cellseg/FL_downSample3D.h +v3d_main/cellseg/FL_filter3D.h +v3d_main/cellseg/FL_gvfCellSeg.h +v3d_main/cellseg/FL_interpolateCoordCubic3D.h +v3d_main/cellseg/FL_interpolateCoordLinear3D.h +v3d_main/cellseg/FL_main_brainseg.h +v3d_main/cellseg/FL_morphology.h +v3d_main/cellseg/FL_neighborhood.h +v3d_main/cellseg/FL_neighborhoodWalker.h +v3d_main/cellseg/FL_queue.h +v3d_main/cellseg/FL_regionProps.h +v3d_main/cellseg/FL_sort.h +v3d_main/cellseg/FL_sort2.h +v3d_main/cellseg/FL_threshold.h +v3d_main/cellseg/FL_unionFind.h +v3d_main/cellseg/FL_upSample3D.h +v3d_main/cellseg/FL_volimgProcLib.h +v3d_main/cellseg/FL_watershed_vs.h +v3d_main/cellseg/nrutil.h +v3d_main/cellseg/seg_parameter.h +v3d_main/cellseg/template_matching_seg.cpp +v3d_main/cellseg/template_matching_seg.h +v3d_main/cellseg/test.h +v3d_main/CMake/FindNEWMAT.cmake +v3d_main/CMake/package/v3d_dmg_bgd.png +v3d_main/CMake/package/windows/v3d.ico +v3d_main/CMake/package/windows/v3dInBox128.png +v3d_main/cmake_installer/CMakeLists.txt +v3d_main/CMakeLists.txt +v3d_main/common_lib/CMakeLists.txt +v3d_main/common_lib/mingw32/include/_mingw.h +v3d_main/common_lib/mingw32/include/accctrl.h +v3d_main/common_lib/mingw32/include/aclapi.h +v3d_main/common_lib/mingw32/include/aclui.h +v3d_main/common_lib/mingw32/include/adsprop.h +v3d_main/common_lib/mingw32/include/afxres.h +v3d_main/common_lib/mingw32/include/amaudio.h +v3d_main/common_lib/mingw32/include/amvideo.h +v3d_main/common_lib/mingw32/include/ansidecl.h +v3d_main/common_lib/mingw32/include/assert.h +v3d_main/common_lib/mingw32/include/audevcod.h +v3d_main/common_lib/mingw32/include/aviriff.h +v3d_main/common_lib/mingw32/include/aygshell.h +v3d_main/common_lib/mingw32/include/basetsd.h +v3d_main/common_lib/mingw32/include/basetyps.h +v3d_main/common_lib/mingw32/include/bdatypes.h +v3d_main/common_lib/mingw32/include/bfd.h +v3d_main/common_lib/mingw32/include/bfdlink.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/algo.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/algobase.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/alloc.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/backward_warning.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/bvector.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/complex.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/defalloc.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/deque.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/fstream.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/function.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/hash_map.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/hash_set.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/hashtable.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/heap.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/iomanip.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/iostream.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/istream.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/iterator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/list.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/map.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/multimap.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/multiset.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/new.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/ostream.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/pair.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/queue.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/rope.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/set.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/slist.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/stack.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/stream.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/streambuf.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/tempbuf.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/tree.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward/vector.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/atomicity.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/basic_ios.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/basic_string.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/boost_concept_check.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/char_traits.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/codecvt.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/concept_check.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/concurrence.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/cpp_type_traits.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/functexcept.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/gslice.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/gslice_array.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/indirect_array.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/ios_base.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/locale_classes.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/locale_facets.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/localefwd.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/mask_array.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/postypes.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/slice_array.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_algo.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_algobase.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_bvector.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_construct.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_deque.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_function.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_heap.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_iterator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_iterator_base_funcs.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_iterator_base_types.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_list.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_map.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_multimap.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_multiset.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_numeric.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_pair.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_queue.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_raw_storage_iter.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_relops.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_set.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_stack.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_tempbuf.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_threads.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_tree.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_uninitialized.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stl_vector.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stream_iterator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/streambuf_iterator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/stringfwd.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/type_traits.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/valarray_after.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/valarray_array.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits/valarray_before.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/cxxabi.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/debug.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/formatter.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/hash_map.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/hash_multimap.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/hash_multiset.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/hash_set.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/map.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/multimap.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/multiset.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/safe_base.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/safe_iterator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/safe_sequence.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug/set.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/exception_defines.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/bitmap_allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/debug_allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/enc_filebuf.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/hash_fun.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/hashtable.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/malloc_allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/mt_allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/new_allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/pod_char_traits.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/pool_allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/ropeimpl.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/stdio_filebuf.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext/stdio_sync_filebuf.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/atomic_word.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/basic_file.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/c++allocator.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/c++config.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/c++io.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/c++locale.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/codecvt_specializations.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/ctype_base.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/ctype_inline.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/ctype_noninline.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/gthr-default.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/gthr-posix.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/gthr-single.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/gthr.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/messages_members.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/os_defines.h +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits/time_members.h +v3d_main/common_lib/mingw32/include/cderr.h +v3d_main/common_lib/mingw32/include/cguid.h +v3d_main/common_lib/mingw32/include/cmnquery.h +v3d_main/common_lib/mingw32/include/comcat.h +v3d_main/common_lib/mingw32/include/commctrl.h +v3d_main/common_lib/mingw32/include/commdlg.h +v3d_main/common_lib/mingw32/include/complex.h +v3d_main/common_lib/mingw32/include/conio.h +v3d_main/common_lib/mingw32/include/control.h +v3d_main/common_lib/mingw32/include/cpl.h +v3d_main/common_lib/mingw32/include/cplext.h +v3d_main/common_lib/mingw32/include/ctype.h +v3d_main/common_lib/mingw32/include/custcntl.h +v3d_main/common_lib/mingw32/include/d3d9.h +v3d_main/common_lib/mingw32/include/d3d9caps.h +v3d_main/common_lib/mingw32/include/d3d9types.h +v3d_main/common_lib/mingw32/include/dbt.h +v3d_main/common_lib/mingw32/include/dde.h +v3d_main/common_lib/mingw32/include/ddeml.h +v3d_main/common_lib/mingw32/include/ddk/atm.h +v3d_main/common_lib/mingw32/include/ddk/batclass.h +v3d_main/common_lib/mingw32/include/ddk/cfg.h +v3d_main/common_lib/mingw32/include/ddk/cfgmgr32.h +v3d_main/common_lib/mingw32/include/ddk/d4drvif.h +v3d_main/common_lib/mingw32/include/ddk/d4iface.h +v3d_main/common_lib/mingw32/include/ddk/ddkmapi.h +v3d_main/common_lib/mingw32/include/ddk/hidclass.h +v3d_main/common_lib/mingw32/include/ddk/hidpi.h +v3d_main/common_lib/mingw32/include/ddk/hidsdi.h +v3d_main/common_lib/mingw32/include/ddk/hidusage.h +v3d_main/common_lib/mingw32/include/ddk/kbdmou.h +v3d_main/common_lib/mingw32/include/ddk/mcd.h +v3d_main/common_lib/mingw32/include/ddk/miniport.h +v3d_main/common_lib/mingw32/include/ddk/minitape.h +v3d_main/common_lib/mingw32/include/ddk/mountdev.h +v3d_main/common_lib/mingw32/include/ddk/mountmgr.h +v3d_main/common_lib/mingw32/include/ddk/ndis.h +v3d_main/common_lib/mingw32/include/ddk/ndisguid.h +v3d_main/common_lib/mingw32/include/ddk/ndistapi.h +v3d_main/common_lib/mingw32/include/ddk/ndiswan.h +v3d_main/common_lib/mingw32/include/ddk/netevent.h +v3d_main/common_lib/mingw32/include/ddk/netpnp.h +v3d_main/common_lib/mingw32/include/ddk/newdev.h +v3d_main/common_lib/mingw32/include/ddk/ntapi.h +v3d_main/common_lib/mingw32/include/ddk/ntdd8042.h +v3d_main/common_lib/mingw32/include/ddk/ntddbeep.h +v3d_main/common_lib/mingw32/include/ddk/ntddcdrm.h +v3d_main/common_lib/mingw32/include/ddk/ntddcdvd.h +v3d_main/common_lib/mingw32/include/ddk/ntddchgr.h +v3d_main/common_lib/mingw32/include/ddk/ntdddisk.h +v3d_main/common_lib/mingw32/include/ddk/ntddk.h +v3d_main/common_lib/mingw32/include/ddk/ntddkbd.h +v3d_main/common_lib/mingw32/include/ddk/ntddmou.h +v3d_main/common_lib/mingw32/include/ddk/ntddndis.h +v3d_main/common_lib/mingw32/include/ddk/ntddpar.h +v3d_main/common_lib/mingw32/include/ddk/ntddpcm.h +v3d_main/common_lib/mingw32/include/ddk/ntddscsi.h +v3d_main/common_lib/mingw32/include/ddk/ntddser.h +v3d_main/common_lib/mingw32/include/ddk/ntddstor.h +v3d_main/common_lib/mingw32/include/ddk/ntddtape.h +v3d_main/common_lib/mingw32/include/ddk/ntddtdi.h +v3d_main/common_lib/mingw32/include/ddk/ntddvdeo.h +v3d_main/common_lib/mingw32/include/ddk/ntddvol.h +v3d_main/common_lib/mingw32/include/ddk/ntifs.h +v3d_main/common_lib/mingw32/include/ddk/ntpoapi.h +v3d_main/common_lib/mingw32/include/ddk/ntstatus.h +v3d_main/common_lib/mingw32/include/ddk/parallel.h +v3d_main/common_lib/mingw32/include/ddk/pfhook.h +v3d_main/common_lib/mingw32/include/ddk/poclass.h +v3d_main/common_lib/mingw32/include/ddk/scsi.h +v3d_main/common_lib/mingw32/include/ddk/scsiscan.h +v3d_main/common_lib/mingw32/include/ddk/scsiwmi.h +v3d_main/common_lib/mingw32/include/ddk/smbus.h +v3d_main/common_lib/mingw32/include/ddk/srb.h +v3d_main/common_lib/mingw32/include/ddk/storport.h +v3d_main/common_lib/mingw32/include/ddk/tdi.h +v3d_main/common_lib/mingw32/include/ddk/tdiinfo.h +v3d_main/common_lib/mingw32/include/ddk/tdikrnl.h +v3d_main/common_lib/mingw32/include/ddk/tdistat.h +v3d_main/common_lib/mingw32/include/ddk/tvout.h +v3d_main/common_lib/mingw32/include/ddk/upssvc.h +v3d_main/common_lib/mingw32/include/ddk/usb.h +v3d_main/common_lib/mingw32/include/ddk/usb100.h +v3d_main/common_lib/mingw32/include/ddk/usbcamdi.h +v3d_main/common_lib/mingw32/include/ddk/usbdi.h +v3d_main/common_lib/mingw32/include/ddk/usbioctl.h +v3d_main/common_lib/mingw32/include/ddk/usbiodef.h +v3d_main/common_lib/mingw32/include/ddk/usbscan.h +v3d_main/common_lib/mingw32/include/ddk/usbuser.h +v3d_main/common_lib/mingw32/include/ddk/video.h +v3d_main/common_lib/mingw32/include/ddk/videoagp.h +v3d_main/common_lib/mingw32/include/ddk/win2k.h +v3d_main/common_lib/mingw32/include/ddk/winddi.h +v3d_main/common_lib/mingw32/include/ddk/winddk.h +v3d_main/common_lib/mingw32/include/ddk/winnt4.h +v3d_main/common_lib/mingw32/include/ddk/winxp.h +v3d_main/common_lib/mingw32/include/ddk/ws2san.h +v3d_main/common_lib/mingw32/include/ddk/xfilter.h +v3d_main/common_lib/mingw32/include/devguid.h +v3d_main/common_lib/mingw32/include/dhcpcsdk.h +v3d_main/common_lib/mingw32/include/dir.h +v3d_main/common_lib/mingw32/include/direct.h +v3d_main/common_lib/mingw32/include/dirent.h +v3d_main/common_lib/mingw32/include/dis-asm.h +v3d_main/common_lib/mingw32/include/dlgs.h +v3d_main/common_lib/mingw32/include/docobj.h +v3d_main/common_lib/mingw32/include/dos.h +v3d_main/common_lib/mingw32/include/dsadmin.h +v3d_main/common_lib/mingw32/include/dsclient.h +v3d_main/common_lib/mingw32/include/dsgetdc.h +v3d_main/common_lib/mingw32/include/dshow.h +v3d_main/common_lib/mingw32/include/dsquery.h +v3d_main/common_lib/mingw32/include/dsrole.h +v3d_main/common_lib/mingw32/include/dvdevcod.h +v3d_main/common_lib/mingw32/include/dvdmedia.h +v3d_main/common_lib/mingw32/include/dxerr8.h +v3d_main/common_lib/mingw32/include/dxerr9.h +v3d_main/common_lib/mingw32/include/edevdefs.h +v3d_main/common_lib/mingw32/include/errno.h +v3d_main/common_lib/mingw32/include/errorrep.h +v3d_main/common_lib/mingw32/include/errors.h +v3d_main/common_lib/mingw32/include/evcode.h +v3d_main/common_lib/mingw32/include/excpt.h +v3d_main/common_lib/mingw32/include/exdisp.h +v3d_main/common_lib/mingw32/include/exdispid.h +v3d_main/common_lib/mingw32/include/fcntl.h +v3d_main/common_lib/mingw32/include/fenv.h +v3d_main/common_lib/mingw32/include/float.h +v3d_main/common_lib/mingw32/include/fltdefs.h +v3d_main/common_lib/mingw32/include/getopt.h +v3d_main/common_lib/mingw32/include/GL/gl.h +v3d_main/common_lib/mingw32/include/GL/glext.h +v3d_main/common_lib/mingw32/include/GL/glu.h +v3d_main/common_lib/mingw32/include/gmon.h +v3d_main/common_lib/mingw32/include/httpext.h +v3d_main/common_lib/mingw32/include/icm.h +v3d_main/common_lib/mingw32/include/idispids.h +v3d_main/common_lib/mingw32/include/il21dec.h +v3d_main/common_lib/mingw32/include/imagehlp.h +v3d_main/common_lib/mingw32/include/imm.h +v3d_main/common_lib/mingw32/include/initguid.h +v3d_main/common_lib/mingw32/include/intshcut.h +v3d_main/common_lib/mingw32/include/inttypes.h +v3d_main/common_lib/mingw32/include/io.h +v3d_main/common_lib/mingw32/include/ipexport.h +v3d_main/common_lib/mingw32/include/iphlpapi.h +v3d_main/common_lib/mingw32/include/ipifcons.h +v3d_main/common_lib/mingw32/include/ipinfoid.h +v3d_main/common_lib/mingw32/include/iprtrmib.h +v3d_main/common_lib/mingw32/include/iptypes.h +v3d_main/common_lib/mingw32/include/ipxconst.h +v3d_main/common_lib/mingw32/include/ipxrtdef.h +v3d_main/common_lib/mingw32/include/ipxtfflt.h +v3d_main/common_lib/mingw32/include/isguids.h +v3d_main/common_lib/mingw32/include/ks.h +v3d_main/common_lib/mingw32/include/ksmedia.h +v3d_main/common_lib/mingw32/include/largeint.h +v3d_main/common_lib/mingw32/include/libgen.h +v3d_main/common_lib/mingw32/include/limits.h +v3d_main/common_lib/mingw32/include/lm.h +v3d_main/common_lib/mingw32/include/lmaccess.h +v3d_main/common_lib/mingw32/include/lmalert.h +v3d_main/common_lib/mingw32/include/lmapibuf.h +v3d_main/common_lib/mingw32/include/lmat.h +v3d_main/common_lib/mingw32/include/lmaudit.h +v3d_main/common_lib/mingw32/include/lmbrowsr.h +v3d_main/common_lib/mingw32/include/lmchdev.h +v3d_main/common_lib/mingw32/include/lmconfig.h +v3d_main/common_lib/mingw32/include/lmcons.h +v3d_main/common_lib/mingw32/include/lmerr.h +v3d_main/common_lib/mingw32/include/lmerrlog.h +v3d_main/common_lib/mingw32/include/lmmsg.h +v3d_main/common_lib/mingw32/include/lmremutl.h +v3d_main/common_lib/mingw32/include/lmrepl.h +v3d_main/common_lib/mingw32/include/lmserver.h +v3d_main/common_lib/mingw32/include/lmshare.h +v3d_main/common_lib/mingw32/include/lmsname.h +v3d_main/common_lib/mingw32/include/lmstats.h +v3d_main/common_lib/mingw32/include/lmsvc.h +v3d_main/common_lib/mingw32/include/lmuse.h +v3d_main/common_lib/mingw32/include/lmuseflg.h +v3d_main/common_lib/mingw32/include/lmwksta.h +v3d_main/common_lib/mingw32/include/locale.h +v3d_main/common_lib/mingw32/include/lzexpand.h +v3d_main/common_lib/mingw32/include/malloc.h +v3d_main/common_lib/mingw32/include/mapi.h +v3d_main/common_lib/mingw32/include/math.h +v3d_main/common_lib/mingw32/include/mbctype.h +v3d_main/common_lib/mingw32/include/mbstring.h +v3d_main/common_lib/mingw32/include/mciavi.h +v3d_main/common_lib/mingw32/include/mcx.h +v3d_main/common_lib/mingw32/include/mem.h +v3d_main/common_lib/mingw32/include/memory.h +v3d_main/common_lib/mingw32/include/mgm.h +v3d_main/common_lib/mingw32/include/mgmtapi.h +v3d_main/common_lib/mingw32/include/mlang.h +v3d_main/common_lib/mingw32/include/mmreg.h +v3d_main/common_lib/mingw32/include/mmsystem.h +v3d_main/common_lib/mingw32/include/mpegtype.h +v3d_main/common_lib/mingw32/include/mprapi.h +v3d_main/common_lib/mingw32/include/mq.h +v3d_main/common_lib/mingw32/include/msacm.h +v3d_main/common_lib/mingw32/include/mshtml.h +v3d_main/common_lib/mingw32/include/mswsock.h +v3d_main/common_lib/mingw32/include/nb30.h +v3d_main/common_lib/mingw32/include/nddeapi.h +v3d_main/common_lib/mingw32/include/nspapi.h +v3d_main/common_lib/mingw32/include/ntdef.h +v3d_main/common_lib/mingw32/include/ntdll.h +v3d_main/common_lib/mingw32/include/ntdsapi.h +v3d_main/common_lib/mingw32/include/ntdsbcli.h +v3d_main/common_lib/mingw32/include/ntldap.h +v3d_main/common_lib/mingw32/include/ntsecapi.h +v3d_main/common_lib/mingw32/include/ntsecpkg.h +v3d_main/common_lib/mingw32/include/oaidl.h +v3d_main/common_lib/mingw32/include/objbase.h +v3d_main/common_lib/mingw32/include/objfwd.h +v3d_main/common_lib/mingw32/include/objidl.h +v3d_main/common_lib/mingw32/include/objsafe.h +v3d_main/common_lib/mingw32/include/objsel.h +v3d_main/common_lib/mingw32/include/ocidl.h +v3d_main/common_lib/mingw32/include/odbcinst.h +v3d_main/common_lib/mingw32/include/ole.h +v3d_main/common_lib/mingw32/include/ole2.h +v3d_main/common_lib/mingw32/include/ole2ver.h +v3d_main/common_lib/mingw32/include/oleacc.h +v3d_main/common_lib/mingw32/include/oleauto.h +v3d_main/common_lib/mingw32/include/olectl.h +v3d_main/common_lib/mingw32/include/olectlid.h +v3d_main/common_lib/mingw32/include/oledlg.h +v3d_main/common_lib/mingw32/include/oleidl.h +v3d_main/common_lib/mingw32/include/pbt.h +v3d_main/common_lib/mingw32/include/poppack.h +v3d_main/common_lib/mingw32/include/powrprof.h +v3d_main/common_lib/mingw32/include/process.h +v3d_main/common_lib/mingw32/include/profil.h +v3d_main/common_lib/mingw32/include/profile.h +v3d_main/common_lib/mingw32/include/prsht.h +v3d_main/common_lib/mingw32/include/psapi.h +v3d_main/common_lib/mingw32/include/pshpack1.h +v3d_main/common_lib/mingw32/include/pshpack2.h +v3d_main/common_lib/mingw32/include/pshpack4.h +v3d_main/common_lib/mingw32/include/pshpack8.h +v3d_main/common_lib/mingw32/include/qedit.h +v3d_main/common_lib/mingw32/include/rapi.h +v3d_main/common_lib/mingw32/include/ras.h +v3d_main/common_lib/mingw32/include/rasdlg.h +v3d_main/common_lib/mingw32/include/raserror.h +v3d_main/common_lib/mingw32/include/rassapi.h +v3d_main/common_lib/mingw32/include/reason.h +v3d_main/common_lib/mingw32/include/regstr.h +v3d_main/common_lib/mingw32/include/richedit.h +v3d_main/common_lib/mingw32/include/richole.h +v3d_main/common_lib/mingw32/include/routprot.h +v3d_main/common_lib/mingw32/include/rpc.h +v3d_main/common_lib/mingw32/include/rpcdce.h +v3d_main/common_lib/mingw32/include/rpcdce2.h +v3d_main/common_lib/mingw32/include/rpcdcep.h +v3d_main/common_lib/mingw32/include/rpcndr.h +v3d_main/common_lib/mingw32/include/rpcnsi.h +v3d_main/common_lib/mingw32/include/rpcnsip.h +v3d_main/common_lib/mingw32/include/rpcnterr.h +v3d_main/common_lib/mingw32/include/rpcproxy.h +v3d_main/common_lib/mingw32/include/rtutils.h +v3d_main/common_lib/mingw32/include/schannel.h +v3d_main/common_lib/mingw32/include/schnlsp.h +v3d_main/common_lib/mingw32/include/scrnsave.h +v3d_main/common_lib/mingw32/include/sddl.h +v3d_main/common_lib/mingw32/include/search.h +v3d_main/common_lib/mingw32/include/secext.h +v3d_main/common_lib/mingw32/include/security.h +v3d_main/common_lib/mingw32/include/servprov.h +v3d_main/common_lib/mingw32/include/setjmp.h +v3d_main/common_lib/mingw32/include/setupapi.h +v3d_main/common_lib/mingw32/include/share.h +v3d_main/common_lib/mingw32/include/shellapi.h +v3d_main/common_lib/mingw32/include/shldisp.h +v3d_main/common_lib/mingw32/include/shlguid.h +v3d_main/common_lib/mingw32/include/shlobj.h +v3d_main/common_lib/mingw32/include/shlwapi.h +v3d_main/common_lib/mingw32/include/signal.h +v3d_main/common_lib/mingw32/include/snmp.h +v3d_main/common_lib/mingw32/include/specstrings.h +v3d_main/common_lib/mingw32/include/sql.h +v3d_main/common_lib/mingw32/include/sqlext.h +v3d_main/common_lib/mingw32/include/sqltypes.h +v3d_main/common_lib/mingw32/include/sqlucode.h +v3d_main/common_lib/mingw32/include/sspi.h +v3d_main/common_lib/mingw32/include/stdint.h +v3d_main/common_lib/mingw32/include/stdio.h +v3d_main/common_lib/mingw32/include/stdlib.h +v3d_main/common_lib/mingw32/include/stm.h +v3d_main/common_lib/mingw32/include/string.h +v3d_main/common_lib/mingw32/include/strings.h +v3d_main/common_lib/mingw32/include/strmif.h +v3d_main/common_lib/mingw32/include/subauth.h +v3d_main/common_lib/mingw32/include/svcguid.h +v3d_main/common_lib/mingw32/include/symcat.h +v3d_main/common_lib/mingw32/include/sys/fcntl.h +v3d_main/common_lib/mingw32/include/sys/file.h +v3d_main/common_lib/mingw32/include/sys/locking.h +v3d_main/common_lib/mingw32/include/sys/param.h +v3d_main/common_lib/mingw32/include/sys/stat.h +v3d_main/common_lib/mingw32/include/sys/time.h +v3d_main/common_lib/mingw32/include/sys/timeb.h +v3d_main/common_lib/mingw32/include/sys/types.h +v3d_main/common_lib/mingw32/include/sys/unistd.h +v3d_main/common_lib/mingw32/include/sys/utime.h +v3d_main/common_lib/mingw32/include/tchar.h +v3d_main/common_lib/mingw32/include/time.h +v3d_main/common_lib/mingw32/include/tlhelp32.h +v3d_main/common_lib/mingw32/include/tmschema.h +v3d_main/common_lib/mingw32/include/unistd.h +v3d_main/common_lib/mingw32/include/unknwn.h +v3d_main/common_lib/mingw32/include/userenv.h +v3d_main/common_lib/mingw32/include/usp10.h +v3d_main/common_lib/mingw32/include/utime.h +v3d_main/common_lib/mingw32/include/uxtheme.h +v3d_main/common_lib/mingw32/include/values.h +v3d_main/common_lib/mingw32/include/varargs.h +v3d_main/common_lib/mingw32/include/vfw.h +v3d_main/common_lib/mingw32/include/vidcap.h +v3d_main/common_lib/mingw32/include/vmr9.h +v3d_main/common_lib/mingw32/include/vptype.h +v3d_main/common_lib/mingw32/include/w32api.h +v3d_main/common_lib/mingw32/include/wchar.h +v3d_main/common_lib/mingw32/include/wctype.h +v3d_main/common_lib/mingw32/include/winable.h +v3d_main/common_lib/mingw32/include/winbase.h +v3d_main/common_lib/mingw32/include/winber.h +v3d_main/common_lib/mingw32/include/wincon.h +v3d_main/common_lib/mingw32/include/wincrypt.h +v3d_main/common_lib/mingw32/include/windef.h +v3d_main/common_lib/mingw32/include/windns.h +v3d_main/common_lib/mingw32/include/windows.h +v3d_main/common_lib/mingw32/include/windowsx.h +v3d_main/common_lib/mingw32/include/winerror.h +v3d_main/common_lib/mingw32/include/wingdi.h +v3d_main/common_lib/mingw32/include/wininet.h +v3d_main/common_lib/mingw32/include/winioctl.h +v3d_main/common_lib/mingw32/include/winldap.h +v3d_main/common_lib/mingw32/include/winnetwk.h +v3d_main/common_lib/mingw32/include/winnls.h +v3d_main/common_lib/mingw32/include/winnt.h +v3d_main/common_lib/mingw32/include/winperf.h +v3d_main/common_lib/mingw32/include/winreg.h +v3d_main/common_lib/mingw32/include/winresrc.h +v3d_main/common_lib/mingw32/include/winsnmp.h +v3d_main/common_lib/mingw32/include/winsock.h +v3d_main/common_lib/mingw32/include/winsock2.h +v3d_main/common_lib/mingw32/include/winspool.h +v3d_main/common_lib/mingw32/include/winsvc.h +v3d_main/common_lib/mingw32/include/winuser.h +v3d_main/common_lib/mingw32/include/winver.h +v3d_main/common_lib/mingw32/include/ws2spi.h +v3d_main/common_lib/mingw32/include/ws2tcpip.h +v3d_main/common_lib/mingw32/include/wsahelp.h +v3d_main/common_lib/mingw32/include/wsipx.h +v3d_main/common_lib/mingw32/include/wsnetbs.h +v3d_main/common_lib/mingw32/include/wtsapi32.h +v3d_main/common_lib/mingw32/include/wtypes.h +v3d_main/common_lib/mingw32/include/xprtdefs.h +v3d_main/common_lib/mingw32/include/zmouse.h +v3d_main/common_lib/src_packages/CMakeLists.txt +v3d_main/common_lib/src_packages/mylib_tiff/array.c +v3d_main/common_lib/src_packages/mylib_tiff/array.h +v3d_main/common_lib/src_packages/mylib_tiff/cdf.c +v3d_main/common_lib/src_packages/mylib_tiff/cdf.h +v3d_main/common_lib/src_packages/mylib_tiff/CMakeLists.txt +v3d_main/common_lib/src_packages/mylib_tiff/draw.h +v3d_main/common_lib/src_packages/mylib_tiff/fct.min.c +v3d_main/common_lib/src_packages/mylib_tiff/fct.min.h +v3d_main/common_lib/src_packages/mylib_tiff/fct.root.c +v3d_main/common_lib/src_packages/mylib_tiff/fct.root.h +v3d_main/common_lib/src_packages/mylib_tiff/hash.c +v3d_main/common_lib/src_packages/mylib_tiff/hash.h +v3d_main/common_lib/src_packages/mylib_tiff/histogram.c +v3d_main/common_lib/src_packages/mylib_tiff/histogram.h +v3d_main/common_lib/src_packages/mylib_tiff/image.c +v3d_main/common_lib/src_packages/mylib_tiff/image.h +v3d_main/common_lib/src_packages/mylib_tiff/linear.algebra.c +v3d_main/common_lib/src_packages/mylib_tiff/linear.algebra.h +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/app.color.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/app.convert.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/app.mrc2.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/app.show.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/app.tagger.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/CMakeLists.txt +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/tiff.image.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/tiff.image.h +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/tiff.io.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/tiff.io.h +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/utilities.c +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF/utilities.h +v3d_main/common_lib/src_packages/mylib_tiff/parameters.h +v3d_main/common_lib/src_packages/mylib_tiff/utilities.c +v3d_main/common_lib/src_packages/mylib_tiff/utilities.h +v3d_main/CTestConfig.cmake +v3d_main/fly_ws_v3d/CMakeLists.txt +v3d_main/fly_ws_v3d/Fly3DWidget.h +v3d_main/fly_ws_v3d/images/mip_all_thumb.png +v3d_main/fly_ws_v3d/images/v3d_multi_neuron_view.png +v3d_main/fly_ws_v3d/v3d_flyws_main.cpp +v3d_main/fly_ws_v3d/V3DFlyMainWindow.cpp +v3d_main/fly_ws_v3d/V3DFlyMainWindow.h +v3d_main/fly_ws_v3d/V3DFlyMainWindow.ui +v3d_main/gmm/fit_gmm.cpp +v3d_main/gmm/fit_gmm.h +v3d_main/graph/CMakeLists.txt +v3d_main/graph/dijk.cpp +v3d_main/graph/dijk.h +v3d_main/graph/elementmexheader.h +v3d_main/graph/graph.h +v3d_main/graph/graph_basic.h +v3d_main/imaging/CMakeLists.txt +v3d_main/imaging/v3d_imaging.cpp +v3d_main/imaging/v3d_imaging.h +v3d_main/issues/bug_list.txt +v3d_main/issues/how_to_build.txt +v3d_main/issues/issuesolve_msg_qmakespec_unset.txt +v3d_main/issues/qt_version_comments.txt +v3d_main/issues/some_other_old_issues.txt +v3d_main/issues/v3d_32bit_compile.txt +v3d_main/issues/v3d_64bit_compile.txt +v3d_main/jba/c++/CMakeLists.txt +v3d_main/jba/c++/convert_type2uint8.h +v3d_main/jba/c++/displacefield_comput.h +v3d_main/jba/c++/histeq.cpp +v3d_main/jba/c++/histeq.h +v3d_main/jba/c++/jba_affine_xform.h +v3d_main/jba/c++/jba_mainfunc.h +v3d_main/jba/c++/jba_match_landmarks.h +v3d_main/jba/c++/remove_nonaffine_points.h +v3d_main/jba/c++/seg_fly_brain.h +v3d_main/jba/c++/wkernel.h +v3d_main/jba/CMakeLists.txt +v3d_main/jba/newmat11/add_time.png +v3d_main/jba/newmat11/bandmat.cpp +v3d_main/jba/newmat11/cholesky.cpp +v3d_main/jba/newmat11/CMakeLists.txt +v3d_main/jba/newmat11/controlw.h +v3d_main/jba/newmat11/evalue.cpp +v3d_main/jba/newmat11/example.cpp +v3d_main/jba/newmat11/example.txt +v3d_main/jba/newmat11/fft.cpp +v3d_main/jba/newmat11/garch.cpp +v3d_main/jba/newmat11/garch.txt +v3d_main/jba/newmat11/hholder.cpp +v3d_main/jba/newmat11/include.h +v3d_main/jba/newmat11/jacobi.cpp +v3d_main/jba/newmat11/myexcept.cpp +v3d_main/jba/newmat11/myexcept.h +v3d_main/jba/newmat11/newfft.cpp +v3d_main/jba/newmat11/newmat.h +v3d_main/jba/newmat11/newmat1.cpp +v3d_main/jba/newmat11/newmat2.cpp +v3d_main/jba/newmat11/newmat3.cpp +v3d_main/jba/newmat11/newmat4.cpp +v3d_main/jba/newmat11/newmat5.cpp +v3d_main/jba/newmat11/newmat6.cpp +v3d_main/jba/newmat11/newmat7.cpp +v3d_main/jba/newmat11/newmat8.cpp +v3d_main/jba/newmat11/newmat9.cpp +v3d_main/jba/newmat11/newmatap.h +v3d_main/jba/newmat11/newmatex.cpp +v3d_main/jba/newmat11/newmatio.h +v3d_main/jba/newmat11/newmatnl.cpp +v3d_main/jba/newmat11/newmatnl.h +v3d_main/jba/newmat11/newmatrc.h +v3d_main/jba/newmat11/newmatrm.cpp +v3d_main/jba/newmat11/newmatrm.h +v3d_main/jba/newmat11/nl_ex.cpp +v3d_main/jba/newmat11/nl_ex.txt +v3d_main/jba/newmat11/nm_ex1.cpp +v3d_main/jba/newmat11/nm_ex1.txt +v3d_main/jba/newmat11/nm_ex2.cpp +v3d_main/jba/newmat11/nm_ex2.txt +v3d_main/jba/newmat11/nm_misc.cpp +v3d_main/jba/newmat11/nm_targ.txt +v3d_main/jba/newmat11/precisio.h +v3d_main/jba/newmat11/readme.txt +v3d_main/jba/newmat11/sl_ex.cpp +v3d_main/jba/newmat11/sl_ex.txt +v3d_main/jba/newmat11/solution.cpp +v3d_main/jba/newmat11/solution.h +v3d_main/jba/newmat11/sort.cpp +v3d_main/jba/newmat11/submat.cpp +v3d_main/jba/newmat11/svd.cpp +v3d_main/jba/newmat11/test_exc.cpp +v3d_main/jba/newmat11/test_exc.txt +v3d_main/jba/newmat11/tmt.cpp +v3d_main/jba/newmat11/tmt.h +v3d_main/jba/newmat11/tmt.txt +v3d_main/jba/newmat11/tmt1.cpp +v3d_main/jba/newmat11/tmt2.cpp +v3d_main/jba/newmat11/tmt3.cpp +v3d_main/jba/newmat11/tmt4.cpp +v3d_main/jba/newmat11/tmt5.cpp +v3d_main/jba/newmat11/tmt6.cpp +v3d_main/jba/newmat11/tmt7.cpp +v3d_main/jba/newmat11/tmt8.cpp +v3d_main/jba/newmat11/tmt9.cpp +v3d_main/jba/newmat11/tmta.cpp +v3d_main/jba/newmat11/tmtb.cpp +v3d_main/jba/newmat11/tmtc.cpp +v3d_main/jba/newmat11/tmtd.cpp +v3d_main/jba/newmat11/tmte.cpp +v3d_main/jba/newmat11/tmtf.cpp +v3d_main/jba/newmat11/tmtg.cpp +v3d_main/jba/newmat11/tmth.cpp +v3d_main/jba/newmat11/tmti.cpp +v3d_main/jba/newmat11/tmtj.cpp +v3d_main/jba/newmat11/tmtk.cpp +v3d_main/jba/newmat11/tmtl.cpp +v3d_main/jba/newmat11/tmtm.cpp +v3d_main/multithreadimageIO/CMakeLists.txt +v3d_main/multithreadimageIO/v3d_multithreadimageIO.cpp +v3d_main/multithreadimageIO/v3d_multithreadimageIO.h +v3d_main/neuron_editing/apo_xforms.cpp +v3d_main/neuron_editing/apo_xforms.h +v3d_main/neuron_editing/CMakeLists.txt +v3d_main/neuron_editing/neuron_format_converter.cpp +v3d_main/neuron_editing/neuron_format_converter.h +v3d_main/neuron_editing/neuron_sim_scores.cpp +v3d_main/neuron_editing/neuron_sim_scores.h +v3d_main/neuron_editing/neuron_xforms.cpp +v3d_main/neuron_editing/neuron_xforms.h +v3d_main/neuron_editing/v_neuronswc.cpp +v3d_main/neuron_editing/v_neuronswc.h +v3d_main/neuron_matching/combination/char_comb_ex.cpp +v3d_main/neuron_matching/combination/combination.h +v3d_main/neuron_matching/combination/next_comb_ex.cpp +v3d_main/neuron_matching/combination/prev_comb_ex.cpp +v3d_main/neuron_matching/combination/recv_comb_ex.cpp +v3d_main/neuron_matching/combination/TestCombo/combination.h +v3d_main/neuron_matching/combination/TestCombo/ReadMe.txt +v3d_main/neuron_matching/combination/TestCombo/res/TestCombo.ico +v3d_main/neuron_matching/combination/TestCombo/resource.h +v3d_main/neuron_matching/combination/TestCombo/StdAfx.cpp +v3d_main/neuron_matching/combination/TestCombo/StdAfx.h +v3d_main/neuron_matching/combination/TestCombo/TestCombo.cpp +v3d_main/neuron_matching/combination/TestCombo/TestCombo.h +v3d_main/neuron_matching/combination/TestCombo/TestComboDlg.cpp +v3d_main/neuron_matching/combination/TestCombo/TestComboDlg.h +v3d_main/neuron_matching/combination/veccomb.h +v3d_main/neuron_matching/combination/veccomb_ex.cpp +v3d_main/neuron_matching/display_hierarchical_matching.m +v3d_main/neuron_matching/display_neuron_match.m +v3d_main/neuron_matching/display_neuron_match_nonmatch.m +v3d_main/neuron_matching/display_neuron_match_nonmatch2.m +v3d_main/neuron_matching/display_neuron_swcformat_FL.m +v3d_main/neuron_matching/exp_auto_manual.m +v3d_main/neuron_matching/exp_auto_manual_diff.m +v3d_main/neuron_matching/exp_auto_manual_phc.m +v3d_main/neuron_matching/exp_different_neurons.m +v3d_main/neuron_matching/exp_see_align_res.m +v3d_main/neuron_matching/exp_simulation.m +v3d_main/neuron_matching/exp_structrual_matching.m +v3d_main/neuron_matching/experiment.m +v3d_main/neuron_matching/FL_main_treeMatching.cpp +v3d_main/neuron_matching/FL_readWriteTxtFile.cpp +v3d_main/neuron_matching/FL_swcTree.cpp +v3d_main/neuron_matching/FL_swcTree.h +v3d_main/neuron_matching/FL_treeMatching.cpp +v3d_main/neuron_matching/FL_treeMatching.h +v3d_main/neuron_matching/FL_treeMatching_old.cpp +v3d_main/neuron_matching/gen_swc4v3d_hierarchical_matching.m +v3d_main/neuron_matching/gentestswc.m +v3d_main/neuron_matching/munkres.cpp +v3d_main/neuron_matching/munkres.h +v3d_main/neuron_matching/mymatrix.cpp +v3d_main/neuron_matching/mymatrix.h +v3d_main/neuron_matching/regPointCloudAffine.m +v3d_main/neuron_tracing/CMakeLists.txt +v3d_main/neuron_tracing/dij_bgl.cpp +v3d_main/neuron_tracing/neuron_tracing.h +v3d_main/neuron_tracing/stacksize.cpp +v3d_main/plugin_loader/CMakeLists.txt +v3d_main/plugin_loader/get_plugin_versions.cpp +v3d_main/plugin_loader/pluginDialog.cpp +v3d_main/plugin_loader/pluginDialog.h +v3d_main/plugin_loader/v3d_plugin_loader.cpp +v3d_main/plugin_loader/v3d_plugin_loader.h +v3d_main/testing/CMakeLists.txt +v3d_main/v3d/atlas_viewer.cpp +v3d_main/v3d/atlas_viewer.h +v3d_main/v3d/CMakeLists.txt +v3d_main/v3d/colormap.cpp +v3d_main/v3d/colormap.h +v3d_main/v3d/compute_win_diff.h +v3d_main/v3d/compute_win_pca.h +v3d_main/v3d/dialog_curve_trace.ui +v3d_main/v3d/dialog_curve_trace_para.h +v3d_main/v3d/dialog_imagecrop_bbox.h +v3d_main/v3d/dialog_imagecrop_bbox.ui +v3d_main/v3d/dialog_imageresample.h +v3d_main/v3d/dialog_imageresample.ui +v3d_main/v3d/dialog_keypoint_features.cpp +v3d_main/v3d/dialog_keypoint_features.h +v3d_main/v3d/dialog_keypoint_features.ui +v3d_main/v3d/dialog_maskroi.h +v3d_main/v3d/dialog_maskroi.ui +v3d_main/v3d/dialog_pointcloudatlas_linkerloader.cpp +v3d_main/v3d/dialog_pointcloudatlas_linkerloader.h +v3d_main/v3d/dialog_pointcloudatlas_linkerloader.ui +v3d_main/v3d/dialog_rotate.cpp +v3d_main/v3d/dialog_rotate.h +v3d_main/v3d/dialog_update_checking.ui +v3d_main/v3d/dialog_update_downloading.ui +v3d_main/v3d/dialog_update_list.ui +v3d_main/v3d/dialog_update_options.ui +v3d_main/v3d/dialog_update_v3d.ui +v3d_main/v3d/dialog_url_entry.ui +v3d_main/v3d/dialog_vano_linkerloader.ui +v3d_main/v3d/DownloadManager.cpp +v3d_main/v3d/DownloadManager.h +v3d_main/v3d/glwidget.cpp +v3d_main/v3d/glwidget.h +v3d_main/v3d/histogramsimple.cpp +v3d_main/v3d/histogramsimple.h +v3d_main/v3d/idrawmain.cpp +v3d_main/v3d/idrawmain.h +v3d_main/v3d/import_filelist_dialog.h +v3d_main/v3d/import_filelist_dialog.ui +v3d_main/v3d/import_filelistname.cpp +v3d_main/v3d/import_images_tool.ui +v3d_main/v3d/import_images_tool_dialog.h +v3d_main/v3d/import_tiffseries.cpp +v3d_main/v3d/landmark_property.ui +v3d_main/v3d/landmark_property_dialog.cpp +v3d_main/v3d/landmark_property_dialog.h +v3d_main/v3d/main.cpp +v3d_main/v3d/mainwindow.cpp +v3d_main/v3d/mainwindow.h +v3d_main/v3d/mainwindow_interface.cpp +v3d_main/v3d/mdichild.cpp +v3d_main/v3d/mdichild.h +v3d_main/v3d/my4dimage.cpp +v3d_main/v3d/opt_rotate.h +v3d_main/v3d/pic/atlasView.png +v3d_main/v3d/pic/atlasView128.png +v3d_main/v3d/pic/copy.png +v3d_main/v3d/pic/cut.png +v3d_main/v3d/pic/default_xy_pic.jpg +v3d_main/v3d/pic/default_yz_pic.jpg +v3d_main/v3d/pic/default_zx_pic.jpg +v3d_main/v3d/pic/help.png +v3d_main/v3d/pic/help1.png +v3d_main/v3d/pic/import.png +v3d_main/v3d/pic/Lockoff.png +v3d_main/v3d/pic/Lockon.png +v3d_main/v3d/pic/new.png +v3d_main/v3d/pic/open.png +v3d_main/v3d/pic/paste.png +v3d_main/v3d/pic/save.png +v3d_main/v3d/pic/v3dIcon.ico +v3d_main/v3d/pic/v3dIcon128.png +v3d_main/v3d/pic/web.png +v3d_main/v3d/rotate_image.cpp +v3d_main/v3d/rotate_image.h +v3d_main/v3d/surface_obj_annotation.ui +v3d_main/v3d/surfaceobj_annotation_dialog.h +v3d_main/v3d/surfaceobj_geometry_dialog.cpp +v3d_main/v3d/surfaceobj_geometry_dialog.h +v3d_main/v3d/surfaceobj_geometry_dialog.ui +v3d_main/v3d/template_matching_cellseg.ui +v3d_main/v3d/template_matching_cellseg_dialog.h +v3d_main/v3d/test1.txt +v3d_main/v3d/thread_regist.h +v3d_main/v3d/v3d.pro +v3d_main/v3d/v3d.qrc +v3d_main/v3d/v3d64.pro +v3d_main/v3d/v3d_actions.cpp +v3d_main/v3d/v3d_actions.h +v3d_main/v3d/v3d_commandlineparser.h +v3d_main/v3d/v3d_compile_constraints.h +v3d_main/v3d/v3d_compile_full.h +v3d_main/v3d/v3d_compile_lite.h +v3d_main/v3d/v3d_compile_pro.h +v3d_main/v3d/v3d_core.cpp +v3d_main/v3d/v3d_core.h +v3d_main/v3d/v3d_global_preference.ui +v3d_main/v3d/v3d_global_preference_dialog.h +v3d_main/v3d/v3d_icon2.png +v3d_main/v3d/v3d_logo.png +v3d_main/v3d/v3d_mactiger.pro +v3d_main/v3d/v3d_msvc.pro +v3d_main/v3d/v3d_test.pro +v3d_main/v3d/v3d_version_info.cpp +v3d_main/v3d/v3d_version_info.h +v3d_main/v3d/v3dimg_proc_neuron.cpp +v3d_main/v3d/v3dimgproc_entry.cpp +v3d_main/v3d/vano_linker_loader_dialog.cpp +v3d_main/v3d/vano_linker_loader_dialog.h +v3d_main/v3d/version_info/v3d_version_example.xml +v3d_main/v3d/xformwidget.h +v3d_main/v3dbase/CMakeLists.txt +v3d_main/worm_straighten_c/bdb_minus.cpp +v3d_main/worm_straighten_c/bdb_minus.h +v3d_main/worm_straighten_c/bdb_minus_bl.cpp +v3d_main/worm_straighten_c/bdb_minus_bl.h +v3d_main/worm_straighten_c/bfs.h +v3d_main/worm_straighten_c/bfs_1root.cpp +v3d_main/worm_straighten_c/CMakeLists.txt +v3d_main/worm_straighten_c/graph.h +v3d_main/worm_straighten_c/graphsupport.h +v3d_main/worm_straighten_c/main_worm_straightener.cpp +v3d_main/worm_straighten_c/mst_prim_c.cpp +v3d_main/worm_straighten_c/mst_prim_c.h +v3d_main/worm_straighten_c/spline_cubic.cpp +v3d_main/worm_straighten_c/spline_cubic.h +v3d_main/v3d/v3d_application.h +v3d_main/v3d/v3d_application.cpp +v3d_main/neuron_annotator/NaMainWindow.h +v3d_main/neuron_annotator/NaMainWindow.cpp +v3d_main/neuron_annotator/NaMainWindow.ui +v3d_main/neuron_annotator/Na3DWidget.h +v3d_main/v3d/CommandManager.h +v3d_main/v3d/CommandManager.cpp +v3d_main/neuron_annotator/ColorSeparatorConsolidator.h +v3d_main/neuron_annotator/ColorSeparatorConsolidator.cpp +v3d_main/neuron_annotator/FileTreeSearcher.h +v3d_main/neuron_annotator/FileTreeSearcher.cpp +v3d_main/neuron_annotator/AnnotationSession.h +v3d_main/neuron_annotator/AnnotationSession.cpp +v3d_main/neuron_annotator/NeuronMaskEntry.h +v3d_main/neuron_annotator/NeuronMaskEntry.cpp +v3d_main/neuron_annotator/MultiColorImageStackNode.h +v3d_main/neuron_annotator/MultiColorImageStackNode.cpp +v3d_main/neuron_annotator/NeuronAnnotatorResultNode.h +v3d_main/neuron_annotator/NeuronAnnotatorResultNode.cpp +v3d_main/neuron_annotator/TimebasedIdentifierGenerator.h +v3d_main/neuron_annotator/TimebasedIdentifierGenerator.cpp +v3d_main/neuron_annotator/Na3DWidget.cpp +v3d_main/neuron_annotator/RendererNeuronAnnotator.h +v3d_main/neuron_annotator/RendererNeuronAnnotator.cpp +v3d_main/neuron_annotator/NaZStackWidget.cpp +v3d_main/neuron_annotator/NaZStackWidget.h +v3d_main/neuron_annotator/NaLargeMIPWidget.cpp +v3d_main/neuron_annotator/NaLargeMIPWidget.h +v3d_main/webservice +v3d_main/webservice/v3dwebservice.hpp +v3d_main/webservice/v3dwebservice_conf.h +v3d_main/webservice/v3dwebserver.h +v3d_main/webservice/v3dwebservice.cpp +v3d_main/webservice/gsoap2/stdsoap2.cpp +v3d_main/webservice/gsoap2/stdsoap2.h +v3d_main/webservice/soapdep/v3dwebserver.wsdl +v3d_main/webservice/soapdep/v3dwebserver.v3dopenfile.res.xml +v3d_main/webservice/soapdep/v3dwebserver.v3dopenfile.req.xml +v3d_main/webservice/soapdep/v3dwebserver.nsmap +v3d_main/webservice/soapdep/v3dwebserver.msghandler.res.xml +v3d_main/webservice/soapdep/v3dwebserver.msghandler.req.xml +v3d_main/webservice/soapdep/v3dwebserver.helloworld.res.xml +v3d_main/webservice/soapdep/v3dwebserver.helloworld.req.xml +v3d_main/webservice/soapdep/soapv3dwebserverService.h +v3d_main/webservice/soapdep/soapv3dwebserverService.cpp +v3d_main/webservice/soapdep/soapStub.h +v3d_main/webservice/soapdep/soapH.h +v3d_main/webservice/soapdep/soapC.cpp +v3d_main/neuron_annotator/GalleryButton.h +v3d_main/neuron_annotator/GalleryButton.cpp +released_plugins/v3d_plugins/HDRfilter/hdrfilter.h +released_plugins/v3d_plugins/HDRfilter/hdrfilter_gui.h +released_plugins/v3d_plugins/HDRfilter/hdrfilter.cpp +v3d_main/neuron_annotator/NaViewer.h +v3d_main/neuron_annotator/NaViewer.cpp +v3d_main/neuron_annotator/CellCounter3D.h +v3d_main/neuron_annotator/CellCounter3D.cpp +v3d_main/neuron_annotator/Rotation3D.h +v3d_main/neuron_annotator/Rotation3D.cpp +v3d_main/neuron_annotator/Vector3D.h +v3d_main/neuron_annotator/Vector3D.cpp +v3d_main/neuron_annotator/CameraModel.h +v3d_main/neuron_annotator/CameraModel.cpp +v3d_main/neuron_annotator/GammaWidget.h +v3d_main/neuron_annotator/GammaWidget.cpp +v3d_main/neuron_annotator/NeuronSelector.cpp +v3d_main/neuron_annotator/NeuronSelector.h diff --git a/v3d.includes b/v3d.includes new file mode 100644 index 0000000000..72a6b0277d --- /dev/null +++ b/v3d.includes @@ -0,0 +1,122 @@ +/Library/Frameworks/QtGui.framework/Headers +/Library/Frameworks/QtCore.framework/Headers +/Library/Frameworks/QtOpenGL.framework/Headers +2010_hackathon/brunsc/channel_manager +2010_hackathon/brunsc/movie_maker +2010_hackathon/brunsc/python_console/python_editor +2010_hackathon/brunsc/python_console/SimTKcommon/internal +2010_hackathon/brunsc/python_console/SimTKcommon +2010_hackathon/brunsc/python_console +2010_hackathon/brunsc/stereo_renderer +2010_hackathon/grwu/DiffeomorphicDemons +2010_hackathon/ITK-V3D-Plugins/Source/Arithmetic +2010_hackathon/ITK-V3D-Plugins/Source/BinaryLogic +2010_hackathon/ITK-V3D-Plugins/Source/Classification +2010_hackathon/ITK-V3D-Plugins/Source/Common +2010_hackathon/ITK-V3D-Plugins/Source/DistanceMaps +2010_hackathon/ITK-V3D-Plugins/Source/EdgeDetection +2010_hackathon/ITK-V3D-Plugins/Source/ImageObjects +2010_hackathon/ITK-V3D-Plugins/Source/IntensityTransformation +2010_hackathon/ITK-V3D-Plugins/Source/LevelSets +2010_hackathon/ITK-V3D-Plugins/Source/LoadData +2010_hackathon/ITK-V3D-Plugins/Source/MathMorphology +2010_hackathon/ITK-V3D-Plugins/Source/RegionGrowing +2010_hackathon/ITK-V3D-Plugins/Source/Registration +2010_hackathon/ITK-V3D-Plugins/Source/Smoothing +2010_hackathon/ITK-V3D-Plugins/Source/Thresholding +2010_hackathon/ITK-V3D-Plugins/Source/Watershed +2010_hackathon/steerableFilters3d +2010_hackathon/wavelets +2010_hackathon/yang_jz/Canny +2010_hackathon/yang_jz/mapview +2010_hackathon/yang_jz/Tip_Detection +2010_hackathon/yuy/miviewer +matlab_io_basicdatatype +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/color +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/event +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt/image +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/awt +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/beans +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/io +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/lang +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/java/util +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/accessibility +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/event +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/filechooser +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing/tree +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/javax/swing +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/common +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/cache +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/codec +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums/handler +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/enums +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/gui +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/in +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/meta +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/ome +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/out +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tiff +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats/tools +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/loci/formats +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/org/xml/sax/helpers +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/org/xml/sax +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy/types +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace/proxy +released_plugins/special_v3d_plugins/bioformat/dependent/include/jace +released_plugins/special_v3d_plugins/bioformat/dependent/include +released_plugins/special_v3d_plugins/bioformat +released_plugins/v3d_plugins/5dstackconverter +released_plugins/v3d_plugins/ada_threshold +released_plugins/v3d_plugins/canvas_eraser +released_plugins/v3d_plugins/change_pixel_value +released_plugins/v3d_plugins/datatype_cnvrt +released_plugins/v3d_plugins/dt +released_plugins/v3d_plugins/edge_of_maskimg +released_plugins/v3d_plugins/gaussianfilter +released_plugins/v3d_plugins/image_xyz_resolution +released_plugins/v3d_plugins/istitch +released_plugins/v3d_plugins/linkerfile_generator +released_plugins/v3d_plugins/minMaxfilter +released_plugins/v3d_plugins/montage_image_z_sections +released_plugins/v3d_plugins/principalskeleton_detection +released_plugins/v3d_plugins/recenterimage +released_plugins/v3d_plugins/regiongrow +released_plugins/v3d_plugins/roi_editor +released_plugins/v3d_plugins/rotateimg90 +released_plugins/v3d_plugins/simple_movie_from3dviewer +released_plugins/v3d_plugins/swc_to_maskimage +released_plugins/v3d_plugins/v3dplugin_call_each_other_example +released_plugins/v3d_plugins/v3dplugin_multi_image_interface_example +released_plugins/v3d_plugins/v3dplugin_push_image_and_object_example +released_plugins/v3d_plugins/v3dplugin_single_image_interface_example +v3d_main/3drenderer +v3d_main/basic_c_fun/customary_structs +v3d_main/basic_c_fun +v3d_main/cellseg +v3d_main/common_lib/mingw32/include/c++/3.4.5/backward +v3d_main/common_lib/mingw32/include/c++/3.4.5/bits +v3d_main/common_lib/mingw32/include/c++/3.4.5/debug +v3d_main/common_lib/mingw32/include/c++/3.4.5/ext +v3d_main/common_lib/mingw32/include/c++/3.4.5/mingw32/bits +v3d_main/common_lib/mingw32/include/c++/3.4.5 +v3d_main/common_lib/mingw32/include/ddk +v3d_main/common_lib/mingw32/include/GL +v3d_main/common_lib/mingw32/include/sys +v3d_main/common_lib/mingw32/include +v3d_main/common_lib/src_packages/mylib_tiff/MY_TIFF +v3d_main/common_lib/src_packages/mylib_tiff +v3d_main/fly_ws_v3d +v3d_main/gmm +v3d_main/graph +v3d_main/imaging +v3d_main/jba/c++ +v3d_main/jba/newmat11 +v3d_main/multithreadimageIO +v3d_main/neuron_editing +v3d_main/neuron_matching/combination/TestCombo +v3d_main/neuron_matching/combination +v3d_main/neuron_matching +v3d_main/neuron_tracing +v3d_main/plugin_loader +v3d_main/v3d +v3d_main/worm_straighten_c diff --git a/v3d_main/3drenderer/3drenderer.qrc b/v3d_main/3drenderer/3drenderer.qrc index 36de7bcc81..f74153bd6d 100644 --- a/v3d_main/3drenderer/3drenderer.qrc +++ b/v3d_main/3drenderer/3drenderer.qrc @@ -6,5 +6,14 @@ shader/color_fragment.txt shader/obj_fragment.txt shader/tex_fragment.txt + icons/click1.svg + icons/click2.svg + icons/click3.svg + icons/stroke1.svg + icons/stroke2.svg + icons/stroke3.svg + icons/strokeN.svg + icons/start.svg + icons/trace.svg diff --git a/v3d_main/3drenderer/Renderer_gl2.cpp b/v3d_main/3drenderer/Renderer_gl2.cpp index 5f515b1213..894d00af72 100644 --- a/v3d_main/3drenderer/Renderer_gl2.cpp +++ b/v3d_main/3drenderer/Renderer_gl2.cpp @@ -659,6 +659,12 @@ void Renderer_gl2::setupTexStreamBuffer() BIND_UNPACK_PBO(0); } +void Renderer_gl2::setupStackTexture(bool bfirst) { + qDebug() << "Renderer_gl2::setupStackTexture() start"; + Renderer_tex2::setupStackTexture(bfirst); +} + + void Renderer_gl2::_streamTex(int stack_i, int slice_i, int step, int slice0, int slice1) { GLuint pbo = 0, tex = 0; diff --git a/v3d_main/3drenderer/Renderer_gl2.h b/v3d_main/3drenderer/Renderer_gl2.h index bafab595c0..b60cbac6e0 100644 --- a/v3d_main/3drenderer/Renderer_gl2.h +++ b/v3d_main/3drenderer/Renderer_gl2.h @@ -89,10 +89,13 @@ class Renderer_gl2 : public Renderer_tex2 virtual bool supported_TexStream(); // called by loadVol() virtual void setupTexStreamBuffer(); // called by subloadTex() virtual void cleanTexStreamBuffer(); // called by ~Renderer_gl2 // makeCurrent + virtual void setupStackTexture(bool bfirst); virtual bool _streamingTex(); virtual void _streamTex(int stack_i, int slice_i, int step, int slice0, int slice1); virtual void _streamTex_end(); +public: + RGBA8 colormap[FILL_CHANNEL][256]; // [n-channel][256-intensity] //////////////////////////////////// protected: @@ -100,7 +103,7 @@ class Renderer_gl2 : public Renderer_tex2 cwc::glShader *shader, *shaderTex2D, *shaderTex3D, *shaderObj; GLuint texColormap; // nearest filter, [x-coord for intensity][y-coord for channel] - RGBA8 colormap[FILL_CHANNEL][256]; // [n-channel][256-intensity] + // RGBA8 colormap[FILL_CHANNEL][256]; // [n-channel][256-intensity] QPolygonF colormap_curve[N_CHANNEL][4]; // [n-channel][RGBA] GLuint pboZ, pboY, pboX; diff --git a/v3d_main/3drenderer/icons/click1.svg b/v3d_main/3drenderer/icons/click1.svg new file mode 100644 index 0000000000..0ec331dc0e --- /dev/null +++ b/v3d_main/3drenderer/icons/click1.svg @@ -0,0 +1,9 @@ + + + + Layer 1 + + + + + diff --git a/v3d_main/3drenderer/icons/click2.svg b/v3d_main/3drenderer/icons/click2.svg new file mode 100644 index 0000000000..8fd1c1cdc9 --- /dev/null +++ b/v3d_main/3drenderer/icons/click2.svg @@ -0,0 +1,10 @@ + + + + Layer 1 + + + + + + diff --git a/v3d_main/3drenderer/icons/click3.svg b/v3d_main/3drenderer/icons/click3.svg new file mode 100644 index 0000000000..21ac2736db --- /dev/null +++ b/v3d_main/3drenderer/icons/click3.svg @@ -0,0 +1,12 @@ + + + + + Layer 1 + + + + + + + \ No newline at end of file diff --git a/v3d_main/3drenderer/icons/start.svg b/v3d_main/3drenderer/icons/start.svg new file mode 100644 index 0000000000..9a2217f1fc --- /dev/null +++ b/v3d_main/3drenderer/icons/start.svg @@ -0,0 +1,15 @@ + + + + + + + + + + Layer 1 + + + S + + \ No newline at end of file diff --git a/v3d_main/3drenderer/icons/stroke1.svg b/v3d_main/3drenderer/icons/stroke1.svg new file mode 100644 index 0000000000..a17b08566f --- /dev/null +++ b/v3d_main/3drenderer/icons/stroke1.svg @@ -0,0 +1,10 @@ + + + + + Layer 1 + + + + + \ No newline at end of file diff --git a/v3d_main/3drenderer/icons/stroke2.svg b/v3d_main/3drenderer/icons/stroke2.svg new file mode 100644 index 0000000000..d24094f41e --- /dev/null +++ b/v3d_main/3drenderer/icons/stroke2.svg @@ -0,0 +1,11 @@ + + + + + Layer 1 + + + + + + \ No newline at end of file diff --git a/v3d_main/3drenderer/icons/stroke3.svg b/v3d_main/3drenderer/icons/stroke3.svg new file mode 100644 index 0000000000..2863aee2f1 --- /dev/null +++ b/v3d_main/3drenderer/icons/stroke3.svg @@ -0,0 +1,12 @@ + + + + + Layer 1 + + + + + + + \ No newline at end of file diff --git a/v3d_main/3drenderer/icons/strokeN.svg b/v3d_main/3drenderer/icons/strokeN.svg new file mode 100644 index 0000000000..2a83016702 --- /dev/null +++ b/v3d_main/3drenderer/icons/strokeN.svg @@ -0,0 +1,13 @@ + + + + + Layer 1 + + + + + + + + \ No newline at end of file diff --git a/v3d_main/3drenderer/icons/trace.svg b/v3d_main/3drenderer/icons/trace.svg new file mode 100644 index 0000000000..5e9edddf7b --- /dev/null +++ b/v3d_main/3drenderer/icons/trace.svg @@ -0,0 +1,15 @@ + + + + + + + + + + Layer 1 + + + T + + \ No newline at end of file diff --git a/v3d_main/3drenderer/renderer.cpp b/v3d_main/3drenderer/renderer.cpp index 13bc5f3fab..0cb37b6e57 100644 --- a/v3d_main/3drenderer/renderer.cpp +++ b/v3d_main/3drenderer/renderer.cpp @@ -815,13 +815,16 @@ void data4dp_to_rgba3d(Image4DProxy& img4dp, V3DLONG dim5, (unsigned char)sampling3dUINT8( img4dp, (it*dim4/imageT + ic), \ ix, iy, iz, dx, dy, dz ) + #define SAMPLE2(si, ix,iy,iz, dx,dy,dz, dxyz) \ + (unsigned char)sampling3dUINT8_2( img4dp, si, ix, iy, iz, dx, dy, dz, dxyz) + // only convert 1<=dim4<=4 ==> RGBA V3DLONG imageX, imageY, imageZ, imageC, imageT; { imageX = bufSize[0]; imageY = bufSize[1]; imageZ = bufSize[2]; - imageC = MIN(4, size4); // <=4 + imageC = MIN(4, size4); // <=4 imageT = bufSize[4]; } if (imageX*imageY*imageZ*imageC*imageT==0) @@ -835,52 +838,85 @@ void data4dp_to_rgba3d(Image4DProxy& img4dp, V3DLONG dim5, dx = V3DLONG(sx); dy = V3DLONG(sy); dz = V3DLONG(sz); + V3DLONG dxyz = dx*dy*dz; MESSAGE_ASSERT(dx*dy*dz >=1); //down sampling V3DLONG ot; V3DLONG ox, oy, oz; V3DLONG ix, iy, iz; - for (ot=0; ot= 1) { - rgba.r = SAMPLE(ot, 0, ix,iy,iz, dx,dy,dz); - } else { - rgba.r = 0; - } - - if (imageC >= 2) { - rgba.g = SAMPLE(ot, 1, ix,iy,iz, dx,dy,dz); - } else { - rgba.g = 0; - } - - if (imageC >= 3) { - rgba.b = SAMPLE(ot, 2, ix,iy,iz, dx,dy,dz); - } else { - rgba.b = 0; - } - - if (imageC >= 4) { - rgba.a = SAMPLE(ot, 3, ix,iy,iz, dx,dy,dz); - } else { - float t = //MAX(rgba.r, MAX(rgba.g, rgba.b)); - ((0.f + rgba.r + rgba.g + rgba.b) / imageC); - rgba.a = (unsigned char)t; - //(unsigned char)(t*t/255); - //(unsigned char)(sqrt(t/255)*255); - } - - rgbaBuf[ot*(imageZ*imageY*imageX) + oz*(imageY*imageX) + oy*(imageX) + ox] = rgba; - } + V3DLONG otOffset, ozOffset, oyOffset, oxOffset; + + V3DLONG SAM0, SAM1, SAM2, SAM3; + + + for (ot=0; ot=4) { + for (ox=0;ox& img4dp, V3DLONG c, V3DLONG x, V3DLONG y, V3DLONG z, V3DLONG dx, V3DLONG dy, V3DLONG dz) @@ -991,6 +1028,23 @@ float sampling3dUINT8(Image4DProxy& img4dp, return avg; } +// There is a mystery as to why the above function, sampling3dUNIT8, uses a hard-coded 'img4dp.value8bit_at(x,y,z,c)' rather than +// sampling using the zi,yi,xi indices. Since it does not appear to use the indices, it is equivalent to the below implementation, +// which speeds-up the parent function quite a bit. Until we can resolve what is going on, we are temporarily using this +// fast version. +float sampling3dUINT8_2(Image4DProxy& img4dp, + V3DLONG c, + V3DLONG x, V3DLONG y, V3DLONG z, V3DLONG dx, V3DLONG dy, V3DLONG dz, V3DLONG dxyz) +{ + V3DLONG dim1=img4dp.sx; V3DLONG dim2=img4dp.sy; V3DLONG dim3=img4dp.sz; + float avg = 0; + if (dxyz>0 && x>=0 && y>=0 && z>=0 && x+dx<=dim1 && y+dy<=dim2 && z+dz<=dim3) + { + avg = img4dp.value8bit_at(x,y,z,c); + } + return avg; +} + //inline RGBA32f sampling3dRGBA8(/*RGBA32f& sample,*/ RGBA8* data, V3DLONG dim1, V3DLONG dim2, V3DLONG dim3, diff --git a/v3d_main/3drenderer/renderer.h b/v3d_main/3drenderer/renderer.h index dec0e0301e..d29b82d0e5 100644 --- a/v3d_main/3drenderer/renderer.h +++ b/v3d_main/3drenderer/renderer.h @@ -125,7 +125,9 @@ class Renderer // public View control interface public: - virtual float getViewDistance() {return viewDistance;} + virtual float getViewDistance() const {return viewDistance;} + virtual float getViewAngle() const {return viewAngle;} + virtual float getZoomRatio() const {return zoomRatio;} virtual void setZoom(float ratio); virtual int setVolumeTimePoint(int t) {volTimeOffset = t-volTimePoint; volTimePoint = t; return volTimePoint;} @@ -345,6 +347,11 @@ void data4dp_to_rgba3d(Image4DProxy& img4dp, V3DLONG dim5, float sampling3dUINT8(Image4DProxy& img4dp, V3DLONG c, V3DLONG x, V3DLONG y, V3DLONG z, V3DLONG dx, V3DLONG dy, V3DLONG dz); + +float sampling3dUINT8_2(Image4DProxy& img4dp, + V3DLONG c, + V3DLONG x, V3DLONG y, V3DLONG z, V3DLONG dx, V3DLONG dy, V3DLONG dz, V3DLONG dxyz); + //float sampling3dUINT8at(Image4DProxy& data, V3DLONG dim1, V3DLONG dim2, V3DLONG dim3, // float x, float y, float z); //float sampling3dUINT8atBounding(Image4DProxy& data, V3DLONG dim1, V3DLONG dim2, V3DLONG dim3, @@ -498,6 +505,9 @@ template float sampling3dAllTypes(T* data, V3DLONG dim1, V3DLONG dim2, { float avg = 0; float d = (dx*dy*dz); + + V3DLONG pagesz = dim1*dim2*dim3; + if (d>0 && x>=0 && y>=0 && z>=0 && x+dx<=dim1 && y+dy<=dim2 && z+dz<=dim3) { //float s = 0; @@ -508,7 +518,13 @@ template float sampling3dAllTypes(T* data, V3DLONG dim1, V3DLONG dim2, { //float w = MAX( (2-ABS(xi-0.5*dx)*2.0/dx), MAX( (2-ABS(yi-0.5*dy)*2.0/dy), (2-ABS(zi-0.5*dz)*2.0/dz) )); //090712 //s += w; - avg += data[(z + zi)*dim2*dim1 + (y + yi)*dim1 + (x + xi)];// *w; + + V3DLONG idx = (z + zi)*dim2*dim1 + (y + yi)*dim1 + (x + xi); + + if(idxsetSeparator(true); + listAct.append(actMarkerCreate1 = new QAction("1-right-click to define a marker (Esc to finish)", w)); + + actMarkerCreate1->setIcon(QIcon(":/icons/click1.svg")); + actMarkerCreate1->setVisible(true); + actMarkerCreate1->setIconVisibleInMenu(true); + listAct.append(actMarkerCreate2 = new QAction("2-right-clicks to define a marker", w)); + + actMarkerCreate2->setIcon(QIcon(":/icons/click2.svg")); + actMarkerCreate2->setVisible(true); + actMarkerCreate2->setIconVisibleInMenu(true); + listAct.append(actMarkerCreate3 = new QAction("3-right-clicks to define a marker", w)); + + actMarkerCreate3->setIcon(QIcon(":/icons/click3.svg")); + actMarkerCreate3->setVisible(true); + actMarkerCreate3->setIconVisibleInMenu(true); + //listAct.append(act = new QAction("", w)); act->setSeparator(true); #ifdef _ALLOW_AUTOMARKER_MENU_ listAct.append(actMarkerAutoSeed = new QAction("AutoMarker", w)); @@ -247,9 +263,28 @@ int Renderer_tex2::processHit(int namelen, int names[], int cx, int cy, bool b_m #ifdef _ALLOW_3D_CURVE_ listAct.append(act = new QAction("", w)); act->setSeparator(true); listAct.append(actCurveCreate1 = new QAction("1-right-stroke to define a 3D curve", w)); + + actCurveCreate1->setIcon(QIcon(":/icons/stroke1.svg")); + actCurveCreate1->setVisible(true); + actCurveCreate1->setIconVisibleInMenu(true); + listAct.append(actCurveCreate2 = new QAction("2-right-strokes to define a 3D curve", w)); + + actCurveCreate2->setIcon(QIcon(":/icons/stroke2.svg")); + actCurveCreate2->setVisible(true); + actCurveCreate2->setIconVisibleInMenu(true); + listAct.append(actCurveCreate3 = new QAction("3-right-strokes to define a 3D curve", w)); + + actCurveCreate3->setIcon(QIcon(":/icons/stroke3.svg")); + actCurveCreate3->setVisible(true); + actCurveCreate3->setIconVisibleInMenu(true); + listAct.append(actCurveCreate_pointclick = new QAction("Series of right-clicks to define a 3D polyline (Esc to finish)", w)); + + actCurveCreate_pointclick->setIcon(QIcon(":/icons/strokeN.svg")); + actCurveCreate_pointclick->setVisible(true); + actCurveCreate_pointclick->setIconVisibleInMenu(true); //if (!(((iDrawExternalParameter*)_idep)->b_local)) //only enable the menu for global 3d viewer. as it seems there is a bug in the local 3d viewer. by PHC, 100821 { @@ -338,11 +373,19 @@ int Renderer_tex2::processHit(int namelen, int names[], int cx, int cy, bool b_m if (listMarker.size()>=2) { listAct.append(actMarkerTraceFromOnePosToOtherMarkers = new QAction("trace from 1 start pos to all other markers", w)); + + actMarkerTraceFromOnePosToOtherMarkers->setIcon(QIcon(":/icons/trace.svg")); + actMarkerTraceFromOnePosToOtherMarkers->setVisible(true); + actMarkerTraceFromOnePosToOtherMarkers->setIconVisibleInMenu(true); } #endif #ifdef _ALLOW_NEURONTREE_ONE2ENTIREIMG_MENU_ listAct.append(actMarkerTraceFromOnePos = new QAction("trace from 1 start pos through entire image", w)); + + actMarkerTraceFromOnePos->setIcon(QIcon(":/icons/trace.svg")); + actMarkerTraceFromOnePos->setVisible(true); + actMarkerTraceFromOnePos->setIconVisibleInMenu(true); #endif #endif //_ALLOW_NEURONSEG_MENU_ @@ -364,6 +407,11 @@ int Renderer_tex2::processHit(int namelen, int names[], int cx, int cy, bool b_m #ifdef _ALLOW_NEURONSEG_MENU_ listAct.append(act = new QAction("", w)); act->setSeparator(true); listAct.append(actMarkerLabelAsStartPos = new QAction("label as starting pos for tracing/measuring", w)); //by PHC, 090119 + + actMarkerLabelAsStartPos->setIcon(QIcon(":/icons/start.svg")); + actMarkerLabelAsStartPos->setVisible(true); + actMarkerLabelAsStartPos->setIconVisibleInMenu(true); + if (curImg->last_hit_landmark >= 0 && curImg->last_hit_landmark!=currentMarkerName-1) { listAct.append(actMarkerTraceFromStartPos = new QAction("trace from the starting pos (and use the *1st* data channel)", w)); @@ -2674,7 +2722,6 @@ XYZ Renderer_tex2::getCenterOfLineProfile(XYZ P1, XYZ P2, double clip[4], int ch v3d_msg("Unsupported data type found. You should never see this.", 0); return loc; } - for (int i=0; i<200; i++) // iteration, (2-f)^200 is big enough { diff --git a/v3d_main/3drenderer/renderer_obj2.cpp b/v3d_main/3drenderer/renderer_obj2.cpp index 2c5cac00a0..8057c911b9 100644 --- a/v3d_main/3drenderer/renderer_obj2.cpp +++ b/v3d_main/3drenderer/renderer_obj2.cpp @@ -1119,7 +1119,7 @@ void Renderer_tex2::addCurveSWC(vector &loc_list, int chno) V3dR_GLWidget* w = (V3dR_GLWidget*)widget; My4DImage* curImg = v3dr_getImage4d(_idep); if (w && curImg) - { + { curImg->proj_trace_add_curve_segment(loc_list, chno); curImg->update_3drenderer_neuron_view(w, this); } diff --git a/v3d_main/3drenderer/renderer_tex2.cpp b/v3d_main/3drenderer/renderer_tex2.cpp index d66eca1cc6..8898fed089 100644 --- a/v3d_main/3drenderer/renderer_tex2.cpp +++ b/v3d_main/3drenderer/renderer_tex2.cpp @@ -84,7 +84,7 @@ Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) “Automatic reconstructi \ } - +RGBA8* Renderer_tex2::_safe3DBuf=0; //////////////////////////////////////////////////////////////////////////////// @@ -415,7 +415,7 @@ void Renderer_tex2::paint() disableViewClipPlane(); glPopMatrix(); //============================================================== } - } + } if (sShowMarkers>0 || sShowSurfObjects>0) { @@ -846,23 +846,23 @@ void Renderer_tex2::loadVol() bool ok; if ( !(ok = supported_TexNPT()) ) tryTexNPT = 0; - //qDebug()<< QString(" ARB_texture_non_power_of_two %1 supported ").arg(ok?"":"NOT"); + qDebug()<< QString(" ARB_texture_non_power_of_two %1 supported ").arg(ok?"":"NOT"); if ( !(ok = supported_TexCompression()) ) tryTexCompress = 0; - //qDebug()<< QString(" ARB_texture_compression %1 supported ").arg(ok?"":"NOT"); + qDebug()<< QString(" ARB_texture_compression %1 supported ").arg(ok?"":"NOT"); if ( !(ok = supported_Tex3D()) ) tryTex3D = 0; - //qDebug()<< QString(" EXT_texture3D (or OpenGL 2.0) %1 supported ").arg(ok?"":"NOT"); + qDebug()<< QString(" EXT_texture3D (or OpenGL 2.0) %1 supported ").arg(ok?"":"NOT"); if ( !(ok = supported_TexStream()) ) if (tryTexStream != -1) tryTexStream = 0; - //qDebug()<< QString(" texture stream (need PBO and GLSL) %1 supported ").arg(ok?"":"NOT"); + qDebug()<< QString(" texture stream (need PBO and GLSL) %1 supported ").arg(ok?"":"NOT"); ok = supported_GL2(); - //qDebug()<< QString(" GLSL (and OpenGL 2.0) %1 supported ").arg(ok?"":"NOT"); + qDebug()<< QString(" GLSL (and OpenGL 2.0) %1 supported ").arg(ok?"":"NOT"); if (imageT>1) //090802: TexSubImage conflicts against compressed texture2D, but is good for compressed texture3D @@ -904,12 +904,15 @@ void Renderer_tex2::loadVol() if (tryTex3D && supported_Tex3D()) { + qDebug() << "Renderer_tex2::loadVol() - creating 3D texture ID\n"; glGenTextures(1, &tex3D); //qDebug(" tex3D = %u", tex3D); } if (!tex3D || tryTexStream !=0) //stream = -1/1/2 { //tryTex3D = 0; //091015: no need, because tex3D & tex_stream_buffer is not related now. + qDebug() << "Renderer_tex2::loadVol() - creating data structures for managing 2D texture slice set\n"; + Ztex_list = new GLuint[imageZ+1]; //+1 for pbo tex Ytex_list = new GLuint[imageY+1]; Xtex_list = new GLuint[imageX+1]; @@ -978,6 +981,8 @@ void Renderer_tex2::subloadTex(V3DLONG timepoint, bool bfirst) timepoint = CLAMP(0, imageT-1, timepoint); rgbaBuf = total_rgbaBuf + timepoint*(imageZ*imageY*imageX); + qDebug() << "Calling setupStackTexture() from Renderer_tex2::subloadTex()"; + //if (tryTexStream<=0) // 091014: mix down-sampled & streamed method setupStackTexture(bfirst); // use a temporary buffer, so first @@ -1069,74 +1074,6 @@ void _copyYzxFromZyx(RGBA8* rgbaYzx, RGBA8* rgbaZyx, int bufX, int bufY, int buf } /////////////////////////////////////////////////////////////////////////////// -static RGBA8* _safe3DBuf = 0; /// (256^3)*4==64M (512x512x256)*4==256M -static void _safeRelease3DBuf() -{ - if (_safe3DBuf) delete[] _safe3DBuf; _safe3DBuf = 0; -} -static RGBA8* _safeReference3DBuf(RGBA8* rgbaBuf, int bufX, int bufY, int bufZ, - int &safeX, int &safeY, int &safeZ) -{ - _safeRelease3DBuf(); -// V3DLONG limitX = MAX_3DTEX_SIZE; -// V3DLONG limitY = MAX_3DTEX_SIZE; -// V3DLONG limitZ = MAX_3DTEX_SIZE; - V3DLONG limitX = LIMIT_VOLX; - V3DLONG limitY = LIMIT_VOLY; - V3DLONG limitZ = LIMIT_VOLZ; - V3DLONG fillX = power_of_two_ceil(bufX); - V3DLONG fillY = power_of_two_ceil(bufY); - V3DLONG fillZ = power_of_two_ceil(bufZ); - if (fillX<=limitX && fillY<=limitY && fillZ<=limitZ) - { - safeX = bufX; - safeY = bufY; - safeZ = bufZ; - return rgbaBuf; - } - - float sx, sy, sz; - V3DLONG dx, dy, dz; - sx = float(bufX)/MIN(limitX, bufX); - sy = float(bufY)/MIN(limitY, bufY); - sz = float(bufZ)/MIN(limitZ, bufZ); - dx = V3DLONG(sx); - dy = V3DLONG(sy); - dz = V3DLONG(sz); - MESSAGE_ASSERT(dx*dy*dz >=1); // down sampling - limitX = V3DLONG(bufX/sx); - limitY = V3DLONG(bufY/sy); - limitZ = V3DLONG(bufZ/sz); - safeX = limitX; - safeY = limitY; - safeZ = limitZ; - //qDebug(" safe = %dx%dx%d", limitX, limitY, limitZ); - - _safe3DBuf = new RGBA8[safeX*safeY*safeZ]; - //memset(_safe3DBuf, 0, sizeof(RGBA8)*safeX*safeY*safeZ); - V3DLONG ox, oy, oz; - V3DLONG ix, iy, iz; - for (oz = 0; oz < safeZ; oz++) - for (oy = 0; oy < safeY; oy++) - for (ox = 0; ox < safeX; ox++) - { - ix = CLAMP(0,bufX-1, IROUND(ox*sx)); - iy = CLAMP(0,bufY-1, IROUND(oy*sy)); - iz = CLAMP(0,bufZ-1, IROUND(oz*sz)); - - RGBA32f rgbaf; - RGBA8 rgba8; - rgbaf = sampling3dRGBA8( rgbaBuf, bufX, bufY, bufZ, ix, iy, iz, dx, dy, dz); - rgba8.r = (unsigned char)rgbaf.r; - rgba8.g = (unsigned char)rgbaf.g; - rgba8.b = (unsigned char)rgbaf.b; - rgba8.a = (unsigned char)rgbaf.a; - - _safe3DBuf[ oz*(safeY*safeX) + oy*(safeX) + ox] = rgba8; - } - return _safe3DBuf; -} -////////////////////////////////////////////////////////////// //#define TEXTURE_CLAMP GL_CLAMP #define TEXTURE_CLAMP GL_CLAMP_TO_EDGE @@ -1183,6 +1120,9 @@ else \ void Renderer_tex2::setupStackTexture(bool bfirst) { + + qDebug() << "Renderer_tex2::setupStackTexture() start"; + // In OpenGL 1.0, storing texture maps in display lists was the preferred method for optimizing performance. // However, a better solution, texture objects, introduced in OpenGL 1.1, are preferred. //glistTexs1 = glGenLists(imageZ); @@ -1291,6 +1231,7 @@ void Renderer_tex2::setupStackTexture(bool bfirst) // if (sh>h) sh = h; for (int i = 0; i < n_slice; i++) + { glBindTexture(GL_TEXTURE_2D, p_tex[i+1]); //[0] reserved for pbo tex RGBA8* p_first = NULL; @@ -1561,12 +1502,14 @@ void Renderer_tex2::drawUnitVolume() if (b_stream //091014: for streamed method || tryTexStream == -1) //091016 { + //qDebug() << "Renderer_tex2::drawUnitVolume() - setting realX,Y,Z to imageX,Y,Z b_stream=" << b_stream << " tryTexStream=" << tryTexStream; realX = imageX; realY = imageY; realZ = imageZ; } else { + //qDebug() << "Renderer_tex2::drawUnitVolume() - settting realX,Y,Z to safeX,Y,Z"; realX = safeX; realY = safeY; realZ = safeZ; diff --git a/v3d_main/3drenderer/renderer_tex2.h b/v3d_main/3drenderer/renderer_tex2.h index 9e2c3577f2..9924c374aa 100644 --- a/v3d_main/3drenderer/renderer_tex2.h +++ b/v3d_main/3drenderer/renderer_tex2.h @@ -213,6 +213,7 @@ class Renderer_tex2 : public Renderer void showLineProfile(int marker1, int marker2); QVector getLineProfile(XYZ p1, XYZ p2, int chno=0); + XYZ selectPosition(int x, int y); // neuron selector // define Marker/Curve /////////////////////////////////////////////// protected: @@ -225,6 +226,7 @@ class Renderer_tex2 : public Renderer double P[16]; // 4x4 projection matrix double MV[16]; // 4x4 model-view matrix }; + QCursor oldCursor; int lastSliceType; int currentMarkerName; @@ -389,9 +391,81 @@ class Renderer_tex2 : public Renderer void saveWavefrontOBJ(const QString& filename); void loadV3DSurface(const QString& filename); void saveV3DSurface(const QString& filename); + + // texture rendering + static RGBA8* _safe3DBuf; + + static void _safeRelease3DBuf() + { + if (_safe3DBuf) delete[] _safe3DBuf; _safe3DBuf = 0; + } + + static RGBA8* _safeReference3DBuf(RGBA8* rgbaBuf, int bufX, int bufY, int bufZ, + int &safeX, int &safeY, int &safeZ) + { + _safeRelease3DBuf(); + // V3DLONG limitX = MAX_3DTEX_SIZE; + // V3DLONG limitY = MAX_3DTEX_SIZE; + // V3DLONG limitZ = MAX_3DTEX_SIZE; + V3DLONG limitX = LIMIT_VOLX; + V3DLONG limitY = LIMIT_VOLY; + V3DLONG limitZ = LIMIT_VOLZ; + V3DLONG fillX = power_of_two_ceil(bufX); + V3DLONG fillY = power_of_two_ceil(bufY); + V3DLONG fillZ = power_of_two_ceil(bufZ); + if (fillX<=limitX && fillY<=limitY && fillZ<=limitZ) + { + safeX = bufX; + safeY = bufY; + safeZ = bufZ; + return rgbaBuf; + } + + float sx, sy, sz; + V3DLONG dx, dy, dz; + sx = float(bufX)/MIN(limitX, bufX); + sy = float(bufY)/MIN(limitY, bufY); + sz = float(bufZ)/MIN(limitZ, bufZ); + dx = V3DLONG(sx); + dy = V3DLONG(sy); + dz = V3DLONG(sz); + MESSAGE_ASSERT(dx*dy*dz >=1); // down sampling + limitX = V3DLONG(bufX/sx); + limitY = V3DLONG(bufY/sy); + limitZ = V3DLONG(bufZ/sz); + safeX = limitX; + safeY = limitY; + safeZ = limitZ; + //qDebug(" safe = %dx%dx%d", limitX, limitY, limitZ); + + _safe3DBuf = new RGBA8[safeX*safeY*safeZ]; + //memset(_safe3DBuf, 0, sizeof(RGBA8)*safeX*safeY*safeZ); + V3DLONG ox, oy, oz; + V3DLONG ix, iy, iz; + for (oz = 0; oz < safeZ; oz++) + for (oy = 0; oy < safeY; oy++) + for (ox = 0; ox < safeX; ox++) + { + ix = CLAMP(0,bufX-1, IROUND(ox*sx)); + iy = CLAMP(0,bufY-1, IROUND(oy*sy)); + iz = CLAMP(0,bufZ-1, IROUND(oz*sz)); + + RGBA32f rgbaf; + RGBA8 rgba8; + rgbaf = sampling3dRGBA8( rgbaBuf, bufX, bufY, bufZ, ix, iy, iz, dx, dy, dz); + rgba8.r = (unsigned char)rgbaf.r; + rgba8.g = (unsigned char)rgbaf.g; + rgba8.b = (unsigned char)rgbaf.b; + rgba8.a = (unsigned char)rgbaf.a; + + _safe3DBuf[ oz*(safeY*safeX) + oy*(safeX) + ox] = rgba8; + } + return _safe3DBuf; + } }; + /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // helper operators #define BUFFER_NPT 0 @@ -436,5 +510,4 @@ inline RGBA8 RGBA8FromQColor(QColor qcolor) return c; } - #endif diff --git a/v3d_main/3drenderer/v3dr_glwidget.cpp b/v3d_main/3drenderer/v3dr_glwidget.cpp index 4240e14926..47e36d171f 100644 --- a/v3d_main/3drenderer/v3dr_glwidget.cpp +++ b/v3d_main/3drenderer/v3dr_glwidget.cpp @@ -51,7 +51,6 @@ Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) “Automatic reconstructi #include "renderer_tex2.h" #include "Renderer_gl2.h" - //PROGRESS_DIALOG("", 0) V3dr_colormapDialog *V3dR_GLWidget::colormapDlg = 0; V3dr_surfaceDialog *V3dR_GLWidget::surfaceDlg = 0; @@ -348,8 +347,9 @@ void V3dR_GLWidget::paintGL() double s = 1.4/(float)SHIFT_RANGE; // *pow(1.4, -_zoom/100.0); double tx = _xShift*s; double ty = _yShift*s; - double tz = 0; - glTranslated( tx, ty, tz ); + double tz = _zShift*s; + // double tz = 0; + glTranslated( tx, ty, tz ); dxShift=dyShift=dzShift=0; // clear shift step } @@ -548,7 +548,10 @@ void V3dR_GLWidget::mousePressEvent(QMouseEvent *event) //qDebug("V3dR_GLWidget::mousePressEvent button = %d", event->button()); if (event->button()==Qt::LeftButton) + { lastPos = event->pos(); + t_mouseclick = clock(); + } if (event->button()==Qt::RightButton && renderer) { @@ -565,7 +568,7 @@ void V3dR_GLWidget::mouseReleaseEvent(QMouseEvent *event) { //091025: use 'QMouseEvent::button()==' instead of 'buttons()&' //qDebug("V3dR_GLWidget::mouseReleaseEvent button = %d", event->button()); - + if (event->button()==Qt::RightButton && renderer) //right-drag { (renderer->movePen(event->x(), event->y(), false)); diff --git a/v3d_main/3drenderer/v3dr_glwidget.h b/v3d_main/3drenderer/v3dr_glwidget.h index 535f52ba6e..d7f4d2cb3b 100644 --- a/v3d_main/3drenderer/v3dr_glwidget.h +++ b/v3d_main/3drenderer/v3dr_glwidget.h @@ -59,8 +59,8 @@ class V3dR_GLWidget : public QGLWidget, public View3DControl V3dR_GLWidget(iDrawExternalParameter* idep, QWidget* mainWindow=0, QString title=""); ~V3dR_GLWidget(); //void makeCurrent() {if (!_in_destructor) QGLWidget::makeCurrent();} //090605 RZC: to override invalid access in qgl_x11.cpp - void deleteRenderer(); //090710 RZC: to delete renderer before ~V3dR_GLWidget() - void createRenderer(); //090710 RZC: to create renderer at any time + virtual void deleteRenderer(); //090710 RZC: to delete renderer before ~V3dR_GLWidget() + virtual void createRenderer(); //090710 RZC: to create renderer at any time void handleKeyPressEvent(QKeyEvent * event); //for hook to MainWindow void handleKeyReleaseEvent(QKeyEvent * event); //for hook to MainWindow @@ -69,6 +69,7 @@ class V3dR_GLWidget : public QGLWidget, public View3DControl iDrawExternalParameter* getiDrawExternalParameter() {return _idep;} QWidget * getMainWindow() {return mainwindow;} Renderer* getRenderer() {return renderer;} + const Renderer* getRenderer() const {return renderer;} // const version CMB QString getDataTitle() {return data_title;} int getNumKeyHolding() {for(int i=1;i<=9; i++) if(_holding_num[i]) return i; return -1;} bool getStill() {return _still;} //used by Renderer::beStil() @@ -112,6 +113,7 @@ class V3dR_GLWidget : public QGLWidget, public View3DControl static V3dr_colormapDialog* colormapDlg; static V3dr_surfaceDialog* surfaceDlg; //static SurfaceObjGeometryDialog *surfaceObjGeoDlg; + bool _isSoftwareGL; //for choiceRenderer protected slots: virtual void stillPaint(); @@ -345,13 +347,14 @@ public slots: void changeOrthoView(bool b); -private: +protected: bool _still, _stillpaint_disable, _stillpaint_pending, _mouse_in_view; QTimer still_timer; static const int still_timer_interval = 1000; + + int t_mouseclick; bool _in_destructor; //for makeCurrent when valid context - bool _isSoftwareGL; //for choiceRenderer int _renderMode; //unsigned char * data; diff --git a/v3d_main/CMakeLists.txt b/v3d_main/CMakeLists.txt index 3ef4362f9a..1f5080be75 100644 --- a/v3d_main/CMakeLists.txt +++ b/v3d_main/CMakeLists.txt @@ -153,6 +153,8 @@ add_subdirectory( jba ) add_subdirectory( cellseg ) +add_subdirectory( neuron_annotator ) + add_subdirectory( v3d ) add_subdirectory( testing ) diff --git a/v3d_main/basic_c_fun/basic_4dimage.cpp b/v3d_main/basic_c_fun/basic_4dimage.cpp index 7efc250dfc..26ddf1f5f7 100644 --- a/v3d_main/basic_c_fun/basic_4dimage.cpp +++ b/v3d_main/basic_c_fun/basic_4dimage.cpp @@ -63,6 +63,8 @@ void Image4DSimple::loadImage(char filename[], bool b_useMyLib) if (strcasecmp(curFileSurfix, "tif")==0 || strcasecmp(curFileSurfix, "tiff")==0 || strcasecmp(curFileSurfix, "lsm")==0 ) //read tiff/lsm stacks { + printf("Image4DSimple::loadImage loading filename=%s\n", filename); + #if defined _WIN32 { v3d_msg("(Win32) Now try to use LIBTIFF (slightly revised by PHC) to read the TIFF/LSM...\n",0); @@ -117,6 +119,8 @@ void Image4DSimple::loadImage(char filename[], bool b_useMyLib) } } } + printf("Image4DSimple::loadImage finished\n"); + #endif } diff --git a/v3d_main/basic_c_fun/basic_4dimage.h b/v3d_main/basic_c_fun/basic_4dimage.h index 8c79b7b0ef..4cc9e1898c 100644 --- a/v3d_main/basic_c_fun/basic_4dimage.h +++ b/v3d_main/basic_c_fun/basic_4dimage.h @@ -100,20 +100,21 @@ class Image4DSimple //main interface to the data unsigned char * getRawData() {return data1d;} - V3DLONG getXDim() {return sz0;} - V3DLONG getYDim() {return sz1;} - V3DLONG getZDim() {return sz2;} - V3DLONG getCDim() {return sz3;} - V3DLONG getTDim() {return sz_time;} - V3DLONG getValidZSliceNum() {return valid_zslicenum;} - V3DLONG getPreValidZSliceNum() {return prevalid_zslicenum;} - int getError() {return b_error;} - ImagePixelType getDatatype() {return datatype;} - TimePackType getTimePackType() {return timepacktype;} - V3DLONG getTotalUnitNumber() {return sz0*sz1*sz2*sz3;} - V3DLONG getTotalUnitNumberPerPlane() {return sz0*sz1;} - V3DLONG getTotalUnitNumberPerChannel() {return sz0*sz1*sz2;} - V3DLONG getUnitBytes() + const unsigned char * getRawData() const {return data1d;} // const version 25-Apr 2011 CMB + V3DLONG getXDim() const {return sz0;} + V3DLONG getYDim() const {return sz1;} + V3DLONG getZDim() const {return sz2;} + V3DLONG getCDim() const {return sz3;} + V3DLONG getTDim() const {return sz_time;} + V3DLONG getValidZSliceNum() const {return valid_zslicenum;} + V3DLONG getPreValidZSliceNum() const {return prevalid_zslicenum;} + int getError() const {return b_error;} + ImagePixelType getDatatype() const {return datatype;} + TimePackType getTimePackType() const {return timepacktype;} + V3DLONG getTotalUnitNumber() const {return sz0*sz1*sz2*sz3;} + V3DLONG getTotalUnitNumberPerPlane() const {return sz0*sz1;} + V3DLONG getTotalUnitNumberPerChannel() const {return sz0*sz1*sz2;} + V3DLONG getUnitBytes() const { switch (datatype) { @@ -123,7 +124,7 @@ class Image4DSimple default: return 1; } } - V3DLONG getTotalBytes() {return getUnitBytes()*sz0*sz1*sz2*sz3;} + V3DLONG getTotalBytes() const {return getUnitBytes()*sz0*sz1*sz2*sz3;} unsigned char * getRawDataAtChannel(V3DLONG cid) { V3DLONG myid = cid; if (myid<0) myid=0; else if (myid>=sz3) myid = sz3-1; @@ -142,12 +143,12 @@ class Image4DSimple datatype!=V3D_UINT16 && datatype!=V3D_FLOAT32)) ? false : true; } - double getRezX() {return rez_x;} - double getRezY() {return rez_y;} - double getRezZ() {return rez_z;} - double getOriginX() {return origin_x;} - double getOriginY() {return origin_y;} - double getOriginZ() {return origin_z;} + double getRezX() const {return rez_x;} + double getRezY() const {return rez_y;} + double getRezZ() const {return rez_z;} + double getOriginX() const {return origin_x;} + double getOriginY() const {return origin_y;} + double getOriginZ() const {return origin_z;} void setXDim(V3DLONG v) {sz0=v;} void setYDim(V3DLONG v) {sz1=v;} diff --git a/v3d_main/basic_c_fun/color_xyz.h b/v3d_main/basic_c_fun/color_xyz.h index 27c3a20cbe..54895036b1 100644 --- a/v3d_main/basic_c_fun/color_xyz.h +++ b/v3d_main/basic_c_fun/color_xyz.h @@ -210,17 +210,17 @@ struct BoundingBox { BoundingBox(float x0, float y0, float z0, float x1, float y1, float z1) {this->x0=x0; this->y0=y0; this->z0=z0; this->x1=x1; this->y1=y1; this->z1=z1;} BoundingBox(XYZ V0, XYZ V1) {x0=V0.x; y0=V0.y; z0=V0.z; x1=V1.x; y1=V1.y; z1=V1.z;} - float Dx() {return (x1-x0); } - float Dy() {return (y1-y0); } - float Dz() {return (z1-z0); } - float Dmin() {return MIN(MIN(Dx(),Dy()),Dz());} - float Dmax() {return MAX(MAX(Dx(),Dy()),Dz());} - XYZ V0() {return XYZ(x0,y0,z0);} - XYZ V1() {return XYZ(x1,y1,z1);} - XYZ Vabsmin() {return XYZ(ABSMIN(x0,x1), ABSMIN(y0,y1), ABSMIN(z0,z1));} - XYZ Vabsmax() {return XYZ(ABSMAX(x0,x1), ABSMAX(y0,y1), ABSMAX(z0,z1));} - bool isNegtive() {return (Dx()<0 || Dy()<0 || Dz()<0);} - bool isInner(XYZ V, float d=0) { + float Dx() const {return (x1-x0); } + float Dy() const {return (y1-y0); } + float Dz() const {return (z1-z0); } + float Dmin() const {return MIN(MIN(Dx(),Dy()),Dz());} + float Dmax() const {return MAX(MAX(Dx(),Dy()),Dz());} + XYZ V0() const {return XYZ(x0,y0,z0);} + XYZ V1() const {return XYZ(x1,y1,z1);} + XYZ Vabsmin() const {return XYZ(ABSMIN(x0,x1), ABSMIN(y0,y1), ABSMIN(z0,z1));} + XYZ Vabsmax() const {return XYZ(ABSMAX(x0,x1), ABSMAX(y0,y1), ABSMAX(z0,z1));} + bool isNegtive() const {return (Dx()<0 || Dy()<0 || Dz()<0);} + bool isInner(XYZ V, float d=0) const { return BETWEENEQ(x0-d,x1+d, V.x) && BETWEENEQ(y0-d,y1+d, V.y) && BETWEENEQ(z0-d,z1+d, V.z); } void clamp(XYZ & V) { diff --git a/v3d_main/basic_c_fun/v3d_message.cpp b/v3d_main/basic_c_fun/v3d_message.cpp index e77138ae64..3c7c21f8de 100644 --- a/v3d_main/basic_c_fun/v3d_message.cpp +++ b/v3d_main/basic_c_fun/v3d_message.cpp @@ -32,17 +32,19 @@ Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) “Automatic reconstructi //2009-2011 #include "v3d_message.h" - #include #include #include + void v3d_msg(const char *msg, bool b_disp_QTDialog) { printf("%s\n", msg); - if (b_disp_QTDialog) + // The below instance check is to make v3d_msg compatible with command-line mode + if (QCoreApplication::instance()!=0 && b_disp_QTDialog) { QMessageBox::information(0, "Information", msg); + } } void v3d_msg(const QString & msg, bool b_disp_QTDialog) //note that if I don't force (char *) conversion then there is a crash. noted by Hanchuan, 090516 diff --git a/v3d_main/neuron_annotator/AnnotationSession.cpp b/v3d_main/neuron_annotator/AnnotationSession.cpp new file mode 100644 index 0000000000..ad5876c5e3 --- /dev/null +++ b/v3d_main/neuron_annotator/AnnotationSession.cpp @@ -0,0 +1,193 @@ +#include "AnnotationSession.h" +#include +#include + +using namespace std; + +AnnotationSession::AnnotationSession() +{ + multiColorImageStackNode=0; + neuronAnnotatorResultNode=0; + originalImageStack=0; + neuronMaskStack=0; +} + +AnnotationSession::~AnnotationSession() { + if (multiColorImageStackNode!=0) { + delete multiColorImageStackNode; + } + if (neuronAnnotatorResultNode!=0) { + delete neuronAnnotatorResultNode; + } + if (originalImageStack!=0) { + delete originalImageStack; + } + if (neuronMaskStack!=0) { + delete neuronMaskStack; + } +} + +// TBD +bool AnnotationSession::save() { + return true; +} + +// TBD +bool AnnotationSession::load(long annotationSessionID) { + return true; +} + +bool AnnotationSession::loadOriginalImageStack() { + QString msgPrefix("AnnotationSession::loadOriginalImageStack()"); + QString originalImageStackFilePath=multiColorImageStackNode->getPathToOriginalImageStackFile(); + originalImageStack = new My4DImage; + if (!originalImageStack) { + cerr << msgPrefix.toStdString() << " : problem creating My4DImage" << endl; + return false; + } + originalImageStack->loadImage(originalImageStackFilePath.toAscii().data()); + if (originalImageStack->isEmpty()) { + cerr << msgPrefix.toStdString() << ": originalImageStack is empty after loading\n"; + return false; + } + cout << "Loaded original image stack with dimensions X=" << originalImageStack->getXDim() << " Y=" << originalImageStack->getYDim() + << " Z=" << originalImageStack->getZDim() << " C=" << originalImageStack->getCDim() << "\n"; + return true; +} + +bool AnnotationSession::loadNeuronMaskStack() { + QString msgPrefix("AnnotationSession::loadNeuronMaskStack()"); + if (originalImageStack==0) { + cerr << msgPrefix.toStdString() << " error : originalImageStack must be created before this function is called" << endl; + return false; + } + int imageXSize=originalImageStack->getXDim(); + int imageYSize=originalImageStack->getYDim(); + int imageZSize=originalImageStack->getZDim(); + QString maskLabelFilePath=multiColorImageStackNode->getPathToMulticolorLabelMaskFile(); + neuronMaskStack = new My4DImage; + if (!neuronMaskStack) { + cerr << msgPrefix.toStdString() << " : problem creating My4DImage" << endl; + return false; + } + // Create blank image + neuronMaskStack->loadImage(imageXSize, imageYSize, imageZSize, 1, 1); // single 4D slice, 8-bit color, respectively + if (neuronMaskStack->isEmpty()) { + cerr << msgPrefix.toStdString() << ": neuronMaskStack is empty after loading\n"; + return false; + } + // Load binary mask data + bool readMaskStatus = MultiColorImageStackNode::readMaskFileToMy4DImage(neuronMaskStack, maskLabelFilePath); + return readMaskStatus; +} + +bool AnnotationSession::loadMaskLabelIndexFile() { + QString msgPrefix("AnnotationSession::loadMaskLabelIndexFile()"); + maskEntryList.clear(); + QString maskLabelIndexFilePath=multiColorImageStackNode->getPathToMulticolorLabelMaskIndexFile(); + QFile maskLabelFile(maskLabelIndexFilePath); + QFileInfo maskLabelFileInfo(maskLabelFile); + if (!maskLabelFile.open(QIODevice::ReadOnly | QIODevice::Text)) { + cerr << msgPrefix.toStdString() << " : could not open file=" << maskLabelFileInfo.absolutePath().toStdString() << " to read" << endl; + return false; + } + QTextStream in(&maskLabelFile); + while (!in.atEnd()) { + QString indexLine = in.readLine(); + if (!indexLine.startsWith("#")) { + NeuronMaskEntry entry; + if (!entry.populateFromString(indexLine)) { + maskLabelFile.close(); + return false; + } + maskEntryList.append(entry); + } + } + maskLabelFile.close(); + qSort(maskEntryList.begin(), maskEntryList.end()); + for (int i=0;i with the background +// density data in index=0, and the neuron masks in indices 1.. + +bool AnnotationSession::populateMaskMipList() { + qDebug() << "AnnotationSession::populateMaskMipList() start"; + int z,y,x; + int imageX=originalImageStack->getXDim(); + int imageY=originalImageStack->getYDim(); + int imageZ=originalImageStack->getZDim(); + int imageC=originalImageStack->getCDim(); + if (imageC != 3) { + qDebug() << "Expected original image stack to have channel dim=3 but it has channel dim=" << imageC; + return false; + } + Image4DProxy originalProxy(originalImageStack); + Image4DProxy maskProxy(neuronMaskStack); + + QList maskImageList; + // Position 0 is background, 1..n are the neuron masks + for (int maskIndex=0;maskIndexmaskImageList.size()) { + qDebug() << "Found mask index=" << mask << " but the total number of mask entries is=" << maskImageList.size(); + return false; + } + int red = originalProxy.value8bit_at(x,y,z,0); + int green = originalProxy.value8bit_at(x,y,z,1); + int blue = originalProxy.value8bit_at(x,y,z,2); + QRgb color=qRgb(red,green,blue); + QImage* maskImage = maskImageList.at(mask); + QRgb previousColor = maskImage->pixel(x,y); + if (previousColor==0) { + maskImage->setPixel(x,y,color); + } else { + int previousIntensity = qRed(previousColor) + qGreen(previousColor) + qBlue(previousColor); + int currentIntensity = qRed(color) + qGreen(color) + qBlue(color); + if (currentIntensity > previousIntensity) { + maskImage->setPixel(x,y,color); + } + } + } + } + } + for (int maskIndex=0;maskIndex=maskStatusList.size()) { + qDebug() << "AnnotationSession::setNeuronMaskStatus() index=" << index << " status=" << status << " : ignoring since list size=" << maskStatusList.size(); + return; + } + maskStatusList.replace(index, status); +} + diff --git a/v3d_main/neuron_annotator/AnnotationSession.h b/v3d_main/neuron_annotator/AnnotationSession.h new file mode 100644 index 0000000000..c6ba3d5399 --- /dev/null +++ b/v3d_main/neuron_annotator/AnnotationSession.h @@ -0,0 +1,67 @@ +#ifndef ANNOTATIONSESSION_H +#define ANNOTATIONSESSION_H + +#include +#include "NeuronMaskEntry.h" +#include "v3d_core.h" +#include "MultiColorImageStackNode.h" +#include "NeuronAnnotatorResultNode.h" + +class AnnotationSession : public QObject +{ + + Q_OBJECT + +public: + AnnotationSession(); + ~AnnotationSession(); + bool save(); + bool load(long annotationSessionID); + long getObjectId() { return objectId; } + + bool loadOriginalImageStack(); + bool loadNeuronMaskStack(); + bool loadMaskLabelIndexFile(); + bool populateMaskMipList(); + QList * getMaskMipList() { return &maskMipList; } + + void setMultiColorImageStackNode(MultiColorImageStackNode* multiColorImageStackNode) { + this->multiColorImageStackNode=multiColorImageStackNode; + } + void setNeuronAnnotatorResultNode(NeuronAnnotatorResultNode* neuronAnnotatorResultNode) { + this->neuronAnnotatorResultNode=neuronAnnotatorResultNode; + } + + // getOriginalImageStackAsMy4DImage() returns a pointer to a My4DImage object + // maintained by the AnnotationSession class. Do not delete this pointer, + // and be aware that it has a lifetime no longer than that of the AnnnotationSession object. + My4DImage* getOriginalImageStackAsMy4DImage() { return originalImageStack; } + + My4DImage* getNeuronMaskAsMy4DImage() { return neuronMaskStack; } + + bool neuronMaskIsChecked(int index) { return maskStatusList.at(index); } + void setNeuronMaskStatus(int index, bool status); + + QList getMaskStatusList(){return maskStatusList;} + QList getNeuronSelectList(){return neuronSelectList;} + +signals: + void modelUpdated(QString updateType); + +public slots: + void neuronMaskUpdate(int index, bool status); + +private: + long objectId; + MultiColorImageStackNode* multiColorImageStackNode; + NeuronAnnotatorResultNode* neuronAnnotatorResultNode; + My4DImage* originalImageStack; + My4DImage* neuronMaskStack; + QList maskEntryList; + QList maskMipList; + QList maskStatusList; + QList neuronSelectList; + +}; + +#endif // ANNOTATIONSESSION_H diff --git a/v3d_main/neuron_annotator/CMakeLists.txt b/v3d_main/neuron_annotator/CMakeLists.txt new file mode 100644 index 0000000000..8fc6c52718 --- /dev/null +++ b/v3d_main/neuron_annotator/CMakeLists.txt @@ -0,0 +1,12 @@ +# Link neuron annotator functionality into V3D +include_directories(${CMAKE_CURRENT_BINARY_DIR}/../v3d) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(../v3d) +include_directories(../3drenderer) + +QT4_WRAP_UI(NA_UI_SRCS NaMainWindow.ui) +QT4_WRAP_CPP(NA_MOC_SRCS NaMainWindow.h Na3DWidget.h) +file(GLOB NA_SRCS "*.cpp") + +add_library(NeuronAnnotatorLib STATIC + ${NA_SRCS} ${NA_UI_SRCS} ${NA_MOC_SRCS}) diff --git a/v3d_main/neuron_annotator/CameraModel.cpp b/v3d_main/neuron_annotator/CameraModel.cpp new file mode 100644 index 0000000000..610057c9ad --- /dev/null +++ b/v3d_main/neuron_annotator/CameraModel.cpp @@ -0,0 +1,32 @@ +#include "CameraModel.h" + +CameraModel::CameraModel() + : m_scale(1.0) + , m_focusPosition(0, 0, 0) +{} + +void CameraModel::setFocus(const Vector3D& v) +{ + if (v == m_focusPosition) return; // no change + if (! (v == v)) return; // NaN + m_focusPosition = v; + emit focusChanged(m_focusPosition); +} + +void CameraModel::setScale(qreal s) +{ + if (s == m_scale) return; // no change + if (! (s == s)) return; // NaN + m_scale = s; + emit scaleChanged(m_scale); +} + +void CameraModel::setRotation(const Rotation3D& R) +{ + if (R == m_rotation) return; // no change + if (! ( R == R )) return; // avoid NaN update + m_rotation = R; + emit rotationChanged(m_rotation); +} + + diff --git a/v3d_main/neuron_annotator/CameraModel.h b/v3d_main/neuron_annotator/CameraModel.h new file mode 100644 index 0000000000..d9a38cfa7a --- /dev/null +++ b/v3d_main/neuron_annotator/CameraModel.h @@ -0,0 +1,41 @@ +#ifndef CAMERAMODEL_H +#define CAMERAMODEL_H + +#include +#include "Rotation3D.h" + +class CameraModel : public QObject +{ + Q_OBJECT + +public: + CameraModel(); + qreal scale() const {return m_scale;} + const Vector3D& focus() const {return m_focusPosition;} + const Rotation3D& rotation() const {return m_rotation;} + +signals: + void focusChanged(const Vector3D&); + void rotationChanged(const Rotation3D&); + void scaleChanged(qreal); + +public slots: + void setFocus(const Vector3D& v); + void setScale(qreal); + void setRotation(const Rotation3D&); + +protected: + Vector3D m_focusPosition; // In image volume coordinates + + Rotation3D m_rotation; // only applies to 3D viewer + + // Scale is zoom level, ratio of screen size to viewable object size. + // Value of 1.0 means viewable objects exactly fill viewport. + // Larger value means objects appear larger. + // Smaller value means objects appear smaller. + // All viewers are assumed to be isotropic with respect to object metric space. + // (Though volume voxel sizes may be anisotropic) + qreal m_scale; +}; + +#endif // CAMERAMODEL_H diff --git a/v3d_main/neuron_annotator/CellCounter3D.cpp b/v3d_main/neuron_annotator/CellCounter3D.cpp new file mode 100644 index 0000000000..6886299032 --- /dev/null +++ b/v3d_main/neuron_annotator/CellCounter3D.cpp @@ -0,0 +1,1059 @@ +#include +#include +#include +#include "CellCounter3D.h" +#include "../v3d/v3d_core.h" + +#define DIALATE 0 +#define ERODE 1 + +#define CELL 0 +#define BACKGROUND 1 + +int CellCounter3D::ARG_STATUS_USAGE=0; +int CellCounter3D::ARG_STATUS_OK=1; +int CellCounter3D::ARG_STATUS_HELP=2; + +class SleepThread : QThread { +public: + SleepThread() {} + void msleep(int miliseconds) { + QThread::msleep(miliseconds); + } +}; + +CellCounter3D::CellCounter3D() +{ + image=0; + errorStatus=0; + loadedFromInputFile=false; + + // Command-line parameters + INITIAL_SIGNAL_THRESHOLD=10; + INITIAL_BACKGROUND_THRESHOLD=10; + SIGMA_NORMALIZATION=2.0; + NORMALIZATION_THRESHOLD=20; + EROSION_CYCLES=3; + EROSION_ELEMENT_SIZE=2; + EROSION_THRESHOLD=44; + DIALATION_CYCLES=3; + DIALATION_ELEMENT_SIZE=2; + DIALATION_THRESHOLD=44; + CS_CENTER_RADIUS=11.0; + CS_CENTER_VALUE=1.0; + CS_SURROUND_RADIUS=2.0; + CS_SURROUND_VALUE=-2.0; + CS_THRESHOLD=100; + MARK_SIZE=2; + MARK_RADIUS=10; + MARK_COLOR[0]=1000; + MARK_COLOR[1]=0; + MARK_COLOR[2]=1000; + SIGNAL_COLOR[0]=255; + SIGNAL_COLOR[1]=255; + SIGNAL_COLOR[2]=255; + MIN_REGION_VOXELS=100; + MAX_REGION_VOXELS=40000; +} + +CellCounter3D::~CellCounter3D() { + if (image!=0 && loadedFromInputFile) { + delete image; + } +} + +void CellCounter3D::loadMy4DImage(My4DImage* image) { + this->image=image; + xDim=image->getXDim(); + yDim=image->getYDim(); + zDim=image->getZDim(); +} + +void CellCounter3D::loadInputFile() { + loadedFromInputFile=true; + My4DImage tmpImage; + image = new My4DImage(); + tmpImage.loadImage(inputFilePath.toLocal8Bit().data()); + CellCounter3D::convertMy4DImage2channelToRGB(tmpImage, *image); + this->loadMy4DImage(image); +} + + +bool CellCounter3D::findCells() { + if (image==0) { + qDebug() << "CellCounter3D::findCells() - no image loaded"; + return false; + } + + unsigned char**** data = (unsigned char****)image->getData(); + + long dataChannel0Count=countNonZero(data[CELL]); + long dataChannel1Count=countNonZero(data[BACKGROUND]); + + qDebug() << "data channel 0 voxel count = " << dataChannel0Count; + qDebug() << "data channel 1 voxel count = " << dataChannel1Count; + + // Step 1: create buffers + // + // We will preserve the original data until the last step in which we + // mark the location of the cells. We will need two working copies of + // each channel, one to serve as the source and other the target. + qDebug() << "Allocating working space"; + workingData = new unsigned char****[2]; + for (int w=0;w<2;w++) { + workingData[w] = new unsigned char***[1]; // for now we are only using 1 channel (CELL) so conserve memory + for (int c=0;c<2;c++) { + workingData[w][c] = new unsigned char**[zDim]; + for (int z=0;z green) { + workingData[w][CELL][z][y][x]=red; + } else { + workingData[w][CELL][z][y][x]=0; + } + } + } + } + + normalizeNonZero(workingData[w][CELL], SIGMA_NORMALIZATION); + + clearChannel(BACKGROUND, data); + + long initialCellVoxelCount=countNonZero(workingData[w][CELL]); + + qDebug() << "Initial cell voxel count = " << initialCellVoxelCount; + + int w1 = w; + int w2 = (w1==0 ? 1 : 0); + + applyBinaryThreshold(workingData[w1][CELL], workingData[w2][CELL], NORMALIZATION_THRESHOLD); + w1 = (w1==0 ? 1 : 0); + w2 = (w2==0 ? 1 : 0); + + // Debug - let's have a look + //copyToImage(CELL, workingData[w1], data, false /* non-zero only */, false /* markAllChannels */); + //return true; + + //gammaFilter(workingData[w1][CELL], GAMMA_CORRECTION); + + // Step 3: Dialtion/Erosion + + qDebug() << "Starting dialation-erosion"; + + long voxelCount=initialCellVoxelCount; + + // Debug - let's have a look + //copyToImage(CELL, workingData[w1], data, false /* non-zero only */, false /* markAllChannels */); + //return; + + // Erode CELL to better define borders + int lastVoxelCount=voxelCount; + int i=0; + for (i=0;igetData(); + + // Allocate mask + unsigned char**** mask = new unsigned char*** [3]; + for (int c=0;c<3;c++) { + mask[c]=new unsigned char** [zDim]; + for (int z=0;z=zDim) { + sz=zDim-1; + } + for (int ey=y-MARK_RADIUS;ey=yDim) { + sy=yDim-1; + } + for (int ex=x-MARK_RADIUS;ex=xDim) { + sx=xDim-1; + } + double distance = std::sqrt((sz-z)*(sz-z)+(sy-y)*(sy-y)+(sx-x)*(sx-x)); + if (distance<=MARK_RADIUS) { + unsigned char signal=data[0][sz][sy][sx]; + int r=(MARK_COLOR[0]*signal)/255; + int g=(MARK_COLOR[1]*signal)/255; + int b=(MARK_COLOR[2]*signal)/255; + mask[0][sz][sy][sx]=(r>255 ? 255 : r); + mask[1][sz][sy][sx]=(g>255 ? 255 : g); + mask[2][sz][sy][sx]=(b>255 ? 255 : b); + } + } + } + } + } + + // Phase 2: Iterate and build inner mark + for (int i=0;i=zDim) { + sz=zDim-1; + } + for (int ey=y-MARK_SIZE;ey=yDim) { + sy=yDim-1; + } + for (int ex=x-MARK_SIZE;ex=xDim) { + sx=xDim-1; + } + mask[0][sz][sy][sx]=255; + mask[1][sz][sy][sx]=255; + mask[2][sz][sy][sx]=255; + } + } + } + } + + // Phase 3: Remap data to RGB according to requested color + for (int z=0;z255 ? 255 : r); + data[1][z][y][x]=(g>255 ? 255 : g); + data[2][z][y][x]=(b>255 ? 255 : b); + } + } + } + + copyToImage(0, mask, data, true /* non-zero only */, false /* markAllChannels */); + copyToImage(1, mask, data, true /* non-zero only */, false /* markAllChannels */); + copyToImage(2, mask, data, true /* non-zero only */, false /* markAllChannels */); + + // Delete mask + for (int c=0;c<2;c++) { + for (int z=0;z > deList; + for (int z=0;z qf = QtConcurrent::run(this, &CellCounter3D::dialateOrErodeZslice, type, z, elementSize, neighborsForThreshold); + deList.append(qf); + } + while(1) { + SleepThread st; + st.msleep(5000); + int doneCount=0; + for (int i=0;i qf=deList.at(i); + if (qf.isFinished()) { + doneCount++; + } + } + int stillActive=deList.size()-doneCount; + if (stillActive==0) { + break; + } else { + qDebug() << "Waiting on " << stillActive << " z-slices"; + } + } +} + +long CellCounter3D::countNonZero(unsigned char*** d) { + long count=0; + for (int z=0;z0) { + count++; + } + } + } + } + return count; +} + + +void CellCounter3D::dialateOrErodeZslice(int type, int z, int elementSize, int neighborsForThreshold) { + unsigned char*** s=currentSource; + unsigned char*** t=currentTarget; + long dialateCount=0; + long erosionCount=0; + for (int y=0;y0) { + t[z][y][x]=currentValue; + continue; + } + } + + int neighborCount=0; + for (int ez=z-elementSize;ez=zDim) { + sz=zDim-1; + } + for (int ey=y-elementSize;ey=yDim) { + sy=yDim-1; + } + for (int ex=x-elementSize;ex=xDim) { + sx=xDim-1; + } + // DEBUG + unsigned char neighborValue=s[sz][sy][sx]; + if (neighborValue>0) { + neighborCount++; + } + } + } + } + + if (type==DIALATE) { + if (neighborCount>=neighborsForThreshold) { + dialateCount++; + t[z][y][x] = 255; + } else { + t[z][y][x] = 0; + } + } else if (type==ERODE) { + if (neighborCount<=neighborsForThreshold) { + erosionCount++; + t[z][y][x] = 0; + } else { + t[z][y][x] = s[z][y][x]; + } + } + + } + } + if (type==DIALATE) { + qDebug() << "Dialated " << dialateCount << " voxels"; + } else if (type==ERODE) { + qDebug() << "Eroded " << erosionCount << " voxels"; + } +} + + +void CellCounter3D::copyToImage(int sourceChannel, unsigned char**** d, unsigned char**** data, bool nonZeroOnly, bool markAllChannels) { + for (int z=0;z0) ) { + if (markAllChannels) { + data[0][z][y][x]=d[sourceChannel][z][y][x]; + data[1][z][y][x]=d[sourceChannel][z][y][x]; + data[2][z][y][x]=d[sourceChannel][z][y][x]; + } else { + data[sourceChannel][z][y][x]=d[sourceChannel][z][y][x]; + } + } + } + } + } +} + +void CellCounter3D::addCrossMark(unsigned char**** d, int z, int y, int x, int size) { + for (int mz=z-size;mz=zDim) { + pz=zDim-1; + } + d[0][pz][y][x]=255; + d[1][pz][y][x]=255; + d[2][pz][y][x]=255; + } + for (int my=y-size;my=yDim) { + py=yDim-1; + } + d[0][z][py][x]=255; + d[1][z][py][x]=255; + d[2][z][py][x]=255; + } + for (int mx=x-size;mx=xDim) { + px=xDim-1; + } + d[0][z][y][px]=255; + d[1][z][y][px]=255; + d[2][z][y][px]=255; + } +} + +void CellCounter3D::gammaFilter(unsigned char*** d, double gamma) { + unsigned char gammaLookup[256]; + for (int i = 0; i < 256; i++) { + gammaLookup[i] = (unsigned char)(std::pow(i/255.0, gamma) * 255.0 + 0.499); + } + for (int z=0;z0) { + total+=d[z][y][x]; + count++; + } + } + } + } + double average = total / count; + double a2=0.0; + for (int z=0;z0) { + a2+=((double)value-average)*((double)value-average); + } + } + } + } + double std=std::sqrt(a2/count); + double dev=std*sigma; + for (int z=0;z0) { + double v=((double)value-average)/dev; + if (v>1.0) { + v=1.0; + } else if (v<-1.0) { + v=-1.0; + } + unsigned char newValue=((v+1.0)/2.0)*255.0; + d[z][y][x]=newValue; + } + } + } + } +} + +void CellCounter3D::applyBinaryThreshold(unsigned char*** source, unsigned char*** target, unsigned char threshold) { + for (int z=0;zthreshold) { + target[z][y][x]=255; + } else { + target[z][y][x]=0; + } + } + } + } +} + +void CellCounter3D::centerSurroundFilter(unsigned char*** source, unsigned char*** output, double centerSize, double centerValue, double surroundSize, double surroundValue) { + // Create target workspace + double*** target = new double** [zDim]; + for (int z=0;z > csList; + for (int z=0;z qf = QtConcurrent::run(this, &CellCounter3D::centerSurroundFilterZSlice, z); + csList.append(qf); + } + while(1) { + SleepThread st; + st.msleep(5000); + int doneCount=0; + for (int i=0;i qf=csList.at(i); + if (qf.isFinished()) { + doneCount++; + } + } + int stillActive=csList.size()-doneCount; + if (stillActive==0) { + break; + } else { + qDebug() << "Waiting on " << stillActive << " z-slices"; + } + } + + for (int z=0;z=MIN_REGION_VOXELS) { + int zAvg=zTotal/c; + int yAvg=yTotal/c; + int xAvg=xTotal/c; + regionCoordinates.append(zAvg); + regionCoordinates.append(yAvg); + regionCoordinates.append(xAvg); + qDebug() << "Added region " << r << " z=" << zAvg << " y=" << yAvg << " x=" << xAvg << " c=" << c; + r++; + } + } + } + } + } + for (int z=0;z & neighborList) { + for (int sz=z-1;sz<=z+1;sz++) { + int pz=sz; + if (pz<0) { + pz=0; + } else if (pz>=zDim) { + pz=zDim-1; + } + for (int sy=y-1;sy<=y+1;sy++) { + int py=sy; + if (py<0) { + py=0; + } else if (py>=yDim) { + py=yDim-1; + } + for (int sx=x-1;sx<=x+1;sx++) { + int px=sx; + if (px<0) { + px=0; + } else if (px>=xDim) { + px=xDim-1; + } + if (!(pz==z && py==y && px==x)) { + unsigned char value=d[pz][py][px]; + if (value>0) { + unsigned char maskValue=mask[pz][py][px]; + if (maskValue==0) { + neighborList.append(pz); + neighborList.append(py); + neighborList.append(px); + mask[pz][py][px]=1; + findNeighbors(px,py,pz,d,mask, neighborList); + if (neighborList.size()>MAX_REGION_VOXELS) { + qDebug() << "CellCounter3D::findNeighbors() ERROR : exceeded MAX_REGION_VOXELS=" << MAX_REGION_VOXELS; + errorStatus=1; + return; + } + } + } + } + } + } + } + return; +} + +void CellCounter3D::writeOutputImageFile() { + if (errorStatus) { + qDebug() << "writeOutputImageFile() skipping due to error state"; + return; + } + int lastPeriodIndex=inputFilePath.lastIndexOf("."); + QString filePrefix=inputFilePath.left(lastPeriodIndex); + QString outputFilePath=filePrefix + "_CellCounterImage.tif"; + image->saveImage(outputFilePath.toStdString().c_str()); +} + +void CellCounter3D::writeOutputReportFile() { + if (errorStatus) { + qDebug() << "writeOutputReportFile() skipping due to error state"; + return; + } + int lastPeriodIndex=inputFilePath.lastIndexOf("."); + QString filePrefix=inputFilePath.left(lastPeriodIndex); + QString outputFilePath=filePrefix + "_CellCounterReport.txt"; + QFile file(outputFilePath); + if (!file.open(QIODevice::WriteOnly)) { + qDebug() << "Could not open file " << outputFilePath << " to write"; + } + QTextStream out(&file); + for (int i=0;i *argList) { + for (int i=0;isize();i++) { + QString arg=(*argList)[i]; + if (arg=="-h") { + return ARG_STATUS_HELP; + } + if (arg=="-i") { + i++; + inputFilePath=(*argList)[i]; + } + else if (arg=="-ist") { + i++; + QString initialSignalThreshold=(*argList)[i]; + INITIAL_SIGNAL_THRESHOLD=initialSignalThreshold.toInt(); + } + else if (arg=="-ibt") { + i++; + QString initialBackgroundThreshold=(*argList)[i]; + INITIAL_BACKGROUND_THRESHOLD=initialBackgroundThreshold.toInt(); + } + else if (arg=="-sn") { + i++; + QString sigmaNormalization=(*argList)[i]; + SIGMA_NORMALIZATION=sigmaNormalization.toDouble(); + } + else if (arg=="-nt") { + i++; + QString normalizationThreshold=(*argList)[i]; + NORMALIZATION_THRESHOLD=normalizationThreshold.toInt(); + } + else if (arg=="-dc") { + i++; + QString dialationCycles=(*argList)[i]; + DIALATION_CYCLES=dialationCycles.toInt(); + } + else if (arg=="-des") { + i++; + QString dialationElementSize=(*argList)[i]; + DIALATION_ELEMENT_SIZE=dialationElementSize.toInt(); + } + else if (arg=="-dt") { + i++; + QString dialationThreshold=(*argList)[i]; + DIALATION_THRESHOLD=dialationThreshold.toInt(); + } + else if (arg=="-ec") { + i++; + QString erosionCycles=(*argList)[i]; + EROSION_CYCLES=erosionCycles.toInt(); + } + else if (arg=="-ees") { + i++; + QString erosionElementSize=(*argList)[i]; + EROSION_ELEMENT_SIZE=erosionElementSize.toInt(); + } + else if (arg=="-et") { + i++; + QString erosionThreshold=(*argList)[i]; + EROSION_THRESHOLD=erosionThreshold.toInt(); + } + else if (arg=="-cr") { + i++; + QString csCenterRadius=(*argList)[i]; + CS_CENTER_RADIUS=csCenterRadius.toDouble(); + } + else if (arg=="-cv") { + i++; + QString csCenterValue=(*argList)[i]; + CS_CENTER_VALUE=csCenterValue.toDouble(); + } + else if (arg=="-sr") { + i++; + QString csSurroundRadius=(*argList)[i]; + CS_SURROUND_RADIUS=csSurroundRadius.toDouble(); + } + else if (arg=="-sv") { + i++; + QString csSurroundValue=(*argList)[i]; + CS_SURROUND_VALUE=csSurroundValue.toDouble(); + } + else if (arg=="-cst") { + i++; + QString csThreshold=(*argList)[i]; + CS_THRESHOLD=csThreshold.toInt(); + } + else if (arg=="-ms") { + i++; + QString markSize=(*argList)[i]; + MARK_SIZE=markSize.toInt(); + } + else if (arg=="-mc") { + i++; + QString markColor0=(*argList)[i++]; + QString markColor1=(*argList)[i++]; + QString markColor2=(*argList)[i]; + MARK_COLOR[0]=markColor0.toInt(); + MARK_COLOR[1]=markColor1.toInt(); + MARK_COLOR[2]=markColor2.toInt(); + } + else if (arg=="-sc") { + i++; + QString signalColor0=(*argList)[i++]; + QString signalColor1=(*argList)[i++]; + QString signalColor2=(*argList)[i]; + SIGNAL_COLOR[0]=signalColor0.toInt(); + SIGNAL_COLOR[1]=signalColor1.toInt(); + SIGNAL_COLOR[2]=signalColor2.toInt(); + } + else if (arg=="-mnr") { + i++; + QString minimumRegionVoxels=(*argList)[i]; + MIN_REGION_VOXELS=minimumRegionVoxels.toInt(); + } + else if (arg=="-mxr") { + i++; + QString maximumRegionVoxels=(*argList)[i]; + MAX_REGION_VOXELS=maximumRegionVoxels.toInt(); + } + } + // Validation of mandatory information + if (inputFilePath.length()>0) { + return ARG_STATUS_OK; + } else { + return ARG_STATUS_USAGE; + } +} + diff --git a/v3d_main/neuron_annotator/CellCounter3D.h b/v3d_main/neuron_annotator/CellCounter3D.h new file mode 100644 index 0000000000..cc7819060d --- /dev/null +++ b/v3d_main/neuron_annotator/CellCounter3D.h @@ -0,0 +1,241 @@ +#ifndef CELLCOUNTER3D_H +#define CELLCOUNTER3D_H + +#include +#include "../v3d/v3d_core.h" + +class CellCounter3D +{ +public: + CellCounter3D(); + ~CellCounter3D(); + void loadMy4DImage(My4DImage* image); + void loadInputFile(); + bool findCells(); + void markImage(); + void setInputFilePath(QString filePath) { this->inputFilePath=filePath; } + void writeOutputImageFile(); + void writeOutputReportFile(); + int processArgs(vector *argList); + + static string getCommandLineDescription() { + return "cell-counter"; + } + + static int ARG_STATUS_USAGE; + static int ARG_STATUS_OK; + static int ARG_STATUS_HELP; + + static string getHelp() { + string help; + help.append("CellCounter3D by Sean Murphy for HHMI JFRC\n"); + help.append("\n"); + help.append("Help Page\n"); + help.append("\n"); + help.append("This tool takes as input an .lsm file (a specialized 3D .tif file) containing an image\n"); + help.append("stack with 2 channels of data. The first channel (0) is expected to be a reference channel\n"); + help.append("(background). The second channel (1) is expected to be cell marker signal\n"); + help.append("\n"); + help.append("The tool will attempt to locate the position of cells in the 3D volume. If successful, two\n"); + help.append("output files will be generated in the same location as the input file:\n"); + help.append(" * An RGB .tif file containing the 3D data which has been marked with identified cells\n"); + help.append(" * A report file containing a tab-separated list of each found cell with its 3D coordinates\n"); + help.append("\n"); + help.append("For the tool to be useful, its parameters must be manually tuned for each experiemntal protocol.\n"); + help.append("Once successful parameters are found, these can be re-used for all similar experimental data.\n"); + help.append("The main reason for generating the .tif output is to aid with this tuning process, in addition to\n"); + help.append("providing a means for human visual validation of results.\n"); + help.append("\n"); + help.append("In a high-throughput production environment, the primary useful output will be the report file,\n"); + help.append("which in addition to counting the cells provides coordinates which further downstream image processing\n"); + help.append("tools can use to analyze the 3D cell data.\n"); + help.append("\n"); + help.append("What follows is a summary of how the tool works and how the various parameters are used.\n"); + help.append("\n"); + help.append("(1) Both the reference channel \"background\" and the cell channel \"signal\" are thresholded. Voxels\n"); + help.append(" with intensity levels below threshold are set to zero. The thresholds are controlled by:\n"); + help.append(" -ist \n"); + help.append(" -ibt \n"); + help.append("\n"); + help.append("(2) Both input channels are consolidated into a single working channel, by merging the channels such that\n"); + help.append(" voxels in which the signal is greater than background are set to signal value, whereas in the opposite\n"); + help.append(" case voxels are set to zero intensity\n"); + help.append("\n"); + help.append("(3) Signal is normalized in the working channel as follows. The standard deviation of the non-zero values\n"); + help.append(" is calculated. This parameter:\n"); + help.append(" -sn \n"); + help.append(" is used to create a range about the average non-zero intensity, such that values within the range are\n"); + help.append(" normalized from 0-255 and values above or below the range are set to 0 or 255, respectively. The following\n"); + help.append(" parameter is then used as a threshold, below which the voxels are set to zero:\n"); + help.append(" -nt \n"); + help.append("\n"); + help.append("(4) In this step, a series of erosion cycles are performed, such that voxels not having enough non-zero neighbors\n"); + help.append(" are themselves set to zero. In this step and the following dialation step, the working channel is converted to\n"); + help.append(" binary (either non-zero or zero). These three parameters control the erosion process:\n"); + help.append(" -ec \n"); + help.append(" -ees \n"); + help.append(" -et \n"); + help.append("\n"); + help.append("(5) The next step is similar to the last, except dialtion is performed rather than erosion. Voxels which are zero\n"); + help.append(" but which have above a certain number of non-zero neighbors are themselves converted to non-zero. These three\n"); + help.append(" parameters control the dialation process:\n"); + help.append(" -dc \n"); + help.append(" -des \n"); + help.append(" -dt \n"); + help.append("\n"); + help.append("(6) After erosion and dialation, a center-surround filter is applied to more crisply define spherical objects of\n"); + help.append(" a size implied by parameters, which are:\n"); + help.append(" -cr \n"); + help.append(" -cv \n"); + help.append(" -sr \n"); + help.append(" -sv \n"); + help.append("\n"); + help.append("(7) After center-surround filter is applied, the initial output is auto-scaled with min=0 and max=255. The next step is\n"); + help.append(" to threshold this scaled output. The following parameter provides the threshold - NOTE this parameter is critical in\n"); + help.append(" the fine-tuning required to capture all cells\n"); + help.append(" -cst \n"); + help.append("\n"); + help.append("(8) We now expect that each cell is represented by an isolated compact region, enabling a simple connected-neighbors\n"); + help.append(" approach for identifying the individual cells. We conduct a connected-neighbors search governed by these parameters:\n"); + help.append(" -mnr \n"); + help.append(" -mxr \n"); + help.append("\n"); + help.append(" NOTE: it is typical to encounter the too-many-voxels error when tuning parameters - the \'-cst\' parameter can help\n"); + help.append(" this problem. By increasing the -cst threshold, the regions should shrink.\n"); + help.append("\n"); + help.append("(9) Cells are marked using a marker with an inner and outer component. The inner component is a small cube, and the outer\n"); + help.append(" component is a larger surrounding sphere. The user can customize the presentation of the graphical results with these\n"); + help.append(" parameters. The voxels not within the marking spheres but with non-zero cell signal are also colorizable.\n"); + help.append(" -ms \n"); + help.append(" -mc \n"); + help.append(" -sc \n"); + return help; + } + + static string getUsage() { + string usage; + usage.append(" CellCounter3D by Sean Murphy for HHMI JFRC \n"); + usage.append(" [ -h This will print the help page for the cell counter ]\n"); + usage.append(" -i \n"); + usage.append(" [ -ist ]\n"); + usage.append(" [ -ibt ]\n"); + usage.append(" [ -sn 0.0 default=2.0> ]\n"); + usage.append(" [ -nt ]\n"); + usage.append(" [ -ec 0 default=3> ]\n"); + usage.append(" [ -ees 1 default=2> ]\n"); + usage.append(" [ -et ]\n"); + usage.append(" [ -dc 0 default=3> ]\n"); + usage.append(" [ -des 1 default=2> ]\n"); + usage.append(" [ -dt ]\n"); + usage.append(" [ -cr 0.0 default=11.0> ]\n"); + usage.append(" [ -cv ]\n"); + usage.append(" [ -sr 0.0 default=2.0> ]\n"); + usage.append(" [ -sv ]\n"); + usage.append(" [ -cst ]\n"); + usage.append(" [ -ms 0 default=2> ]\n"); + usage.append(" [ -mr 0 default=10> ]\n"); + usage.append(" [ -mc 0 default= 1000 0 1000> ]\n"); + usage.append(" [ -sc 0 default= 255 255 255> ]\n"); + usage.append(" [ -mnr =0 default=100> ]\n"); + usage.append(" [ -mxr =0 default=40000> ]\n"); + return usage; + } + + static void convertMy4DImage2channelToRGB(My4DImage & sourceImage, My4DImage & targetImage) { + int xDim=sourceImage.getXDim(); + int yDim=sourceImage.getYDim(); + int zDim=sourceImage.getZDim(); + targetImage.loadImage(xDim, yDim, zDim, 3 /* 3-channels of data */, 1 /* 8-bits per channel */ ); + unsigned char**** sourceData = (unsigned char****)sourceImage.getData(); + unsigned char**** targetData = (unsigned char****)targetImage.getData(); + for (int z=0;z & neighborList); + + + My4DImage* image; + unsigned char***** workingData; + QString inputFilePath; + + // Command-Line parameters ///////////////////////// + int INITIAL_SIGNAL_THRESHOLD; + int INITIAL_BACKGROUND_THRESHOLD; + double SIGMA_NORMALIZATION; + int NORMALIZATION_THRESHOLD; + int EROSION_CYCLES; + int EROSION_ELEMENT_SIZE; + int EROSION_THRESHOLD; + int DIALATION_CYCLES; + int DIALATION_ELEMENT_SIZE; + int DIALATION_THRESHOLD; + double CS_CENTER_RADIUS; + double CS_CENTER_VALUE; + double CS_SURROUND_RADIUS; + double CS_SURROUND_VALUE; + int CS_THRESHOLD; + int MARK_SIZE; + int MARK_RADIUS; + int MARK_COLOR[3]; + int SIGNAL_COLOR[3]; + int MIN_REGION_VOXELS; + int MAX_REGION_VOXELS; + //////////////////////////////////////////////////// + + int xDim; + int yDim; + int zDim; + + // Shared for dialateOrErode threads + unsigned char*** currentSource; + unsigned char*** currentTarget; + int lastTargetIndex; + + // Shared for center-surround threads + unsigned char*** csSource; + unsigned char*** csOutput; + double*** csFilterMatrix; + double*** csTarget; + double csCenterSize; + double csCenterValue; + double csSurroundSize; + double csSurroundValue; + double csFilterMin; + double csFilterMax; + + QMutex csLock; + QList regionCoordinates; + + int errorStatus; + bool loadedFromInputFile; + + +}; + +#endif // CELLCOUNTER3D_H diff --git a/v3d_main/neuron_annotator/ColorSeparatorConsolidator.cpp b/v3d_main/neuron_annotator/ColorSeparatorConsolidator.cpp new file mode 100644 index 0000000000..25314958be --- /dev/null +++ b/v3d_main/neuron_annotator/ColorSeparatorConsolidator.cpp @@ -0,0 +1,205 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ColorSeparatorConsolidator.h" +#include "MultiColorImageStackNode.h" +#include "NeuronMaskEntry.h" +#include "FileTreeSearcher.h" +#include "../v3d/v3d_core.h" +#include +#include + +using namespace std; + +QString ColorSeparatorConsolidator::maskFileRegExpString("(\\S+)\\.seg\\_(\\d+)\\.n(\\d+)\\.tif"); + +ColorSeparatorConsolidator::ColorSeparatorConsolidator(QString separatorDirectory, QString outputFile) +{ + this->separatorDirectory=separatorDirectory; + this->outputFile=outputFile; + maskFileRegExp.setPattern(ColorSeparatorConsolidator::maskFileRegExpString); +} + +bool ColorSeparatorConsolidator::execute() { + + if (!populateMaskFileList()) { + cleanup(); + return false; + } + if (!writeMetadataFile()) { + cleanup(); + return false; + } + if (!generateMask()) { + cleanup(); + return false; + } + if (!writeMask()) { + cleanup(); + return false; + } + + return true; +} + +void ColorSeparatorConsolidator::cleanup() { + if (consolidatedMask!=0) { + delete consolidatedMask; + } +} + +bool ColorSeparatorConsolidator::populateMaskFileList() { + FileTreeSearcher fileTreeSearcher(maskFileRegExp); + QDir separatorDir(separatorDirectory); + if (!separatorDir.exists()) { + cerr << "ColorSeparatorConsolidator::populateMaskFileList() directory=" << separatorDir.absolutePath().toStdString() << " does not exist" << endl; + return false; + } + maskFileList.append(fileTreeSearcher.findFilesInDirectory(separatorDirectory)); + // We don't want the Max-Projections - just the mask tifs + for (int i=0; i entryList; + for (int i=0;i \n"); + out << header; + for (int i=0; i255) { + cerr << msgPrefix << " error: maskFileList is size=" << maskFileList.size() << " and must be less than 256 for 8-bit mask" << endl; + return false; + } + unsigned char **** consolidatedMaskData; + for (int i=0;i +#include +#include +#include +#include "../v3d/v3d_core.h" + +using namespace std; + +class ColorSeparatorConsolidator +{ +public: + ColorSeparatorConsolidator(QString separatorDirectory, QString outputFile); + bool execute(); + + static string getCommandLineDescription() { + return "consolidate-color-separator-output"; + } + + static QString maskFileRegExpString; + +private: + QString separatorDirectory; + QString outputFile; + My4DImage* consolidatedMask; + QStringList maskFileList; + QRegExp maskFileRegExp; + int maskSizeX; + int maskSizeY; + int maskSizeZ; + + bool populateMaskFileList(); + bool writeMetadataFile(); + bool generateMask(); + bool writeMask(); + void cleanup(); + bool sortMaskFileList(); + +}; + +#endif // COLORSEPARATORCONSOLIDATOR_H diff --git a/v3d_main/neuron_annotator/FileTreeSearcher.cpp b/v3d_main/neuron_annotator/FileTreeSearcher.cpp new file mode 100644 index 0000000000..7901feb94c --- /dev/null +++ b/v3d_main/neuron_annotator/FileTreeSearcher.cpp @@ -0,0 +1,43 @@ +#include "FileTreeSearcher.h" + +#include +#include +#include +#include + +using namespace std; + +FileTreeSearcher::FileTreeSearcher(const QString & regex) +{ + regexObject.setPattern(regex); +} + +FileTreeSearcher::FileTreeSearcher(const QRegExp & regex) +{ + regexObject = regex; +} + +QStringList FileTreeSearcher::findFilesInDirectory(QDir directory) { + QStringList matchList; + if (!directory.exists()) { + cerr << "FileTreeSearcher::findFilesInDirectory() error : directory=" << directory.absolutePath().toStdString() << " does not exist" << endl; + return matchList; + } + directory.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot); + QStringList entryList = directory.entryList(); + for (int i=0; i +#include +#include + +class FileTreeSearcher +{ +public: + FileTreeSearcher(const QString & regex); + FileTreeSearcher(const QRegExp & regex); + QStringList findFilesInDirectory(QDir directory); + +private: + QRegExp regexObject; +}; + +#endif // FILETREESEARCHER_H diff --git a/v3d_main/neuron_annotator/GalleryButton.cpp b/v3d_main/neuron_annotator/GalleryButton.cpp new file mode 100644 index 0000000000..aaa63e2c08 --- /dev/null +++ b/v3d_main/neuron_annotator/GalleryButton.cpp @@ -0,0 +1,89 @@ +#include +#include +#include "GalleryButton.h" + +GalleryButton::GalleryButton(const QPixmap & pixmap, QString name, int index, QWidget *parent) + : QWidget(parent) + , scaledThumbnail(NULL) + , correctedScaledThumbnail(NULL) + , bImageUpdating(false) +{ + this->index=index; + QSize thumbnailSize(140, 140); + scaledThumbnail = new QImage(pixmap.scaled( + thumbnailSize, + Qt::IgnoreAspectRatio, + Qt::SmoothTransformation).toImage()); + QVBoxLayout *layout = new QVBoxLayout(); + pushButton = new QPushButton(); + pushButton->setCheckable(true); + QIcon icon(pixmap); + pushButton->setIcon(icon); + pushButton->setIconSize(thumbnailSize); + QLabel* label = new QLabel(name); + label->setAlignment(Qt::AlignCenter); + layout->addWidget(pushButton); + layout->addWidget(label); + this->setLayout(layout); + connect(pushButton, SIGNAL(clicked(bool)), this, SLOT(buttonPress(bool))); + // Multithreaded image update must hand off to single GUI thread for final GUI pixmap update. + connect(this, SIGNAL(thumbnailImageUpdated()), + this, SLOT(updateThumbnailIcon())); +} + +GalleryButton::~GalleryButton() { + if (scaledThumbnail) { + buttonMutex.lock(); + delete scaledThumbnail; + scaledThumbnail = NULL; + buttonMutex.unlock(); + } + if (correctedScaledThumbnail) { + buttonMutex.lock(); + delete correctedScaledThumbnail; + correctedScaledThumbnail = NULL; + buttonMutex.unlock(); + } +} + +void GalleryButton::buttonPress(bool checked) { + emit declareChange(index, checked); +} + +void GalleryButton::setGamma(double gamma) +{ + if (! scaledThumbnail) return; + buttonMutex.lock(); // Avoid possible race condition + if (bImageUpdating) { + buttonMutex.unlock(); + return; + } + // possible race condition right here... + bImageUpdating = true; + buttonMutex.unlock(); // The race is over. We won! + // Cache the gamma conversion to avoid computing too + // many pow()s. Yes, yes, premature optimization, + // whatever... + unsigned char gammaLookup[256]; + for (int i = 0; i < 256; i++) { + gammaLookup[i] = (unsigned char)(std::pow(i/255.0, gamma) * 255.0 + 0.499); + } + if (! correctedScaledThumbnail) + correctedScaledThumbnail = new QImage(*scaledThumbnail); + for (int x = 0; x < scaledThumbnail->width(); ++x) { + for (int y = 0; y < scaledThumbnail->height(); ++y) { + QColor c(scaledThumbnail->pixel(x, y)); + c.setRed(gammaLookup[c.red()]); + c.setGreen(gammaLookup[c.green()]); + c.setBlue(gammaLookup[c.blue()]); + correctedScaledThumbnail->setPixel(x, y, c.rgb()); + } + } + emit thumbnailImageUpdated(); // Pixmap operations must be done in GUI thread + bImageUpdating = false; +} + +void GalleryButton::updateThumbnailIcon() { + if (! correctedScaledThumbnail) return; + pushButton->setIcon(QIcon(QPixmap::fromImage(*correctedScaledThumbnail))); +} diff --git a/v3d_main/neuron_annotator/GalleryButton.h b/v3d_main/neuron_annotator/GalleryButton.h new file mode 100644 index 0000000000..f56c7392ec --- /dev/null +++ b/v3d_main/neuron_annotator/GalleryButton.h @@ -0,0 +1,48 @@ +#ifndef GALLERYBUTTON_H +#define GALLERYBUTTON_H + +#include + +class GalleryButton : public QWidget +{ + Q_OBJECT +public: + explicit GalleryButton(const QPixmap & pixmap, QString name, int index, QWidget *parent = 0); + int getIndex() { return index; } + QString getName() { return label->text(); } + bool isChecked() { return pushButton->isChecked(); } + void setChecked(bool checked) { pushButton->setChecked(checked); } + ~GalleryButton(); + +signals: + void declareChange(int index, bool checked); + // thumbnailImageUpdated() signal is emitted when the internal + // "correctedScaledThumbnail" has changed, suggesting that a GUI + // pixmap update would be a good idea. + void thumbnailImageUpdated(); + +public slots: + void buttonPress(bool checked); + void setGamma(double gamma); + +protected slots: + // updateThumbnailIcon() updates the GUI pixmap for this button to reflect the + // curent state of the internal correctedScaledThumbnail image. Pixmap updates + // like this MUST be done in the GUI thread, so multithreading is impossible for + // this operation. + void updateThumbnailIcon(); + +private: + QPushButton* pushButton; + QLabel* label; + int index; + // scaledThumbnail is a small version of the MIP image; small for efficient interactive updating. + QImage * scaledThumbnail; + // correctedScaledThumbnail is a gamma corrected version of scaledThumbnail. + QImage * correctedScaledThumbnail; + volatile bool bImageUpdating; // hack for gamma update + QMutex buttonMutex; // Mutex object to help avoid multithread race conditions. +}; + +#endif // GALLERYBUTTON_H + diff --git a/v3d_main/neuron_annotator/GammaWidget.cpp b/v3d_main/neuron_annotator/GammaWidget.cpp new file mode 100644 index 0000000000..bc52cc7474 --- /dev/null +++ b/v3d_main/neuron_annotator/GammaWidget.cpp @@ -0,0 +1,70 @@ +#include "GammaWidget.h" +#include + +GammaWidget::GammaWidget(QWidget * parent) : QWidget(parent) +{ + // TODO - avoid Qt warning message about multiple layouts + setupUi(this); + connect(this, SIGNAL(gammaBrightnessChanged(double)), + this, SLOT(updateGammaLineEdit(double))); +} + +void GammaWidget::updateGammaLineEdit(double gamma) +{ + double d = gamma_lineEdit->text().toDouble(); + if (d == gamma) + return; + // complex logic to leave "non-canonical but equivalent" strings unchanged + if (d > 0.0) { // string parsed OK + if ( gamma_slider->value() == gammaIntFromDouble(d) ) // value is essentially unchanged + return; // Leave string alone; value is good and user might be editing it. + if ( gammaDoubleFromInt(gamma_slider->value()) == d) + return; // A slightly different way for the number to be OK + } + gamma_lineEdit->setText(QString::number(gamma, 'f', 2)); +} + +void GammaWidget::on_gamma_lineEdit_textChanged(const QString & value) +{ + double gamma = value.toDouble(); + if (gamma > 0.0) // parse OK + setGammaBrightness(gamma); +} + +void GammaWidget::on_gamma_slider_valueChanged(int value) +{ + double gamma = gammaDoubleFromInt(value); + if (gamma > 0.0) + emit gammaBrightnessChanged(gamma); +} + +void GammaWidget::setGammaBrightness(double gamma) +{ + if (! (gamma > 0.0)) + return; // nonsense + if (gamma == gammaDoubleFromInt(gamma_slider->value())) + return; // no change + int gammaInt = gammaIntFromDouble(gamma); + if (gammaInt == gamma_slider->value()) + return; // no important change + gamma_slider->setValue(gammaInt); +} + +// Final arbiter of whether gamma value has changed is integer +// -100 * log2(gamma) +int GammaWidget::gammaIntFromDouble(double gamma) +{ + double log2Gamma = std::log(gamma)/std::log(2.0); + int result = int(log2Gamma * 100.0 + 0.5); + return result; +} + +double GammaWidget::gammaDoubleFromInt(int value) +{ + double log2Gamma = value / 100.0; + double gamma = std::pow(2.0, log2Gamma); + return gamma; +} + + + diff --git a/v3d_main/neuron_annotator/GammaWidget.h b/v3d_main/neuron_annotator/GammaWidget.h new file mode 100644 index 0000000000..25a7f45f7a --- /dev/null +++ b/v3d_main/neuron_annotator/GammaWidget.h @@ -0,0 +1,32 @@ +#ifndef GAMMA_WIDGET_H_ +#define GAMMA_WIDGET_H_ + +#include +#include "ui_GammaWidget.h" + +// GUI widget with slider and text entry for updating gamma value +class GammaWidget : public QWidget, public Ui::GammaWidget +{ + Q_OBJECT + +public: + GammaWidget(QWidget * parent = NULL); + +signals: + void gammaBrightnessChanged(double gamma); + +public slots: + void setGammaBrightness(double gamma); + void on_gamma_lineEdit_textChanged(const QString & value); + void on_gamma_slider_valueChanged(int gammaInt); + +protected slots: + void updateGammaLineEdit(double gamma); + +protected: + static int gammaIntFromDouble(double gamma); + static double gammaDoubleFromInt(int value); +}; + +#endif /* GAMMA_WIDGET_H_ */ + diff --git a/v3d_main/neuron_annotator/GammaWidget.ui b/v3d_main/neuron_annotator/GammaWidget.ui new file mode 100644 index 0000000000..34ee33b4ba --- /dev/null +++ b/v3d_main/neuron_annotator/GammaWidget.ui @@ -0,0 +1,81 @@ + + + GammaWidget + + + + 0 + 0 + 185 + 48 + + + + Form + + + + 0 + + + + + Gamma (Γ) brightness + + + Γ + + + + + + + Qt::StrongFocus + + + Drag to adjust gamma brightness + + + -300 + + + 300 + + + 10 + + + 50 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 300 + + + + + + + + 50 + 16777215 + + + + Gamma brightness: Larger values are darker. + + + 1.00 + + + + + + + + diff --git a/v3d_main/neuron_annotator/MultiColorImageStackNode.cpp b/v3d_main/neuron_annotator/MultiColorImageStackNode.cpp new file mode 100644 index 0000000000..7ba8ea603e --- /dev/null +++ b/v3d_main/neuron_annotator/MultiColorImageStackNode.cpp @@ -0,0 +1,9 @@ +#include "MultiColorImageStackNode.h" + +const char * MultiColorImageStackNode::IMAGE_STACK_FILENAME = "multiColorImageStack.tif"; +const char * MultiColorImageStackNode::IMAGE_MASK_FILENAME = "multiColorImageStack.mask8"; +const char * MultiColorImageStackNode::IMAGE_MASK_INDEX_FILENAME = "multiColorImageStack.maskIndex"; + +MultiColorImageStackNode::MultiColorImageStackNode() +{ +} diff --git a/v3d_main/neuron_annotator/MultiColorImageStackNode.h b/v3d_main/neuron_annotator/MultiColorImageStackNode.h new file mode 100644 index 0000000000..45f6983bf8 --- /dev/null +++ b/v3d_main/neuron_annotator/MultiColorImageStackNode.h @@ -0,0 +1,133 @@ +#ifndef MULTICOLORIMAGESTACKNODE_H +#define MULTICOLORIMAGESTACKNODE_H + +#include +#include +#include "../v3d/v3d_core.h" +#include +#include +#include + +class MultiColorImageStackNode +{ +public: + + const static char * IMAGE_STACK_FILENAME; + const static char * IMAGE_MASK_FILENAME; + const static char * IMAGE_MASK_INDEX_FILENAME; + + MultiColorImageStackNode(); + + QString getPathToOriginalImageStackFile() { return pathToOriginalImageStackFile; } + + QString getPathToMulticolorLabelMaskFile() { return pathToMulticolorLabelMaskFile; } + + QString getPathToMulticolorLabelMaskIndexFile() { return pathToMulticolorLabelMaskIndexFile; } + + void setPathToOriginalImageStackFile(QString pathToOriginalImageStackFileParam) { + pathToOriginalImageStackFile=pathToOriginalImageStackFileParam; + } + void setPathToMulticolorLabelMaskFile(QString pathToMulticolorLabelMaskFileParam) { + pathToMulticolorLabelMaskFile=pathToMulticolorLabelMaskFileParam; + } + + void setPathToMulticolorLabelMasIndexFile(QString pathToMulticolorLabelMaskIndexFileParam) { + pathToMulticolorLabelMaskIndexFile=pathToMulticolorLabelMaskIndexFileParam; + } + + static bool writeMy4DImageToMaskFile(My4DImage* my4DImageAsMask, QString maskFilePath) { + QString msgPrefix="MultiColorImageStackNode::writeMy4DToMaskFile()"; + ofstream out ( maskFilePath.toStdString().c_str(), ios::out | ios::binary ); + + unsigned char **** rawMaskData = (unsigned char ****) my4DImageAsMask->getData(); + int maskSizeX = my4DImageAsMask->getXDim(); + int maskSizeY = my4DImageAsMask->getYDim(); + int maskSizeZ = my4DImageAsMask->getZDim(); + long longLength = maskSizeX * maskSizeY * maskSizeZ * 1 * 1; // one slice, 8-bit + if (longLength >= INT_MAX) { + cerr << "Length of my4DImageAsMask is greater than INT_MAX=" << INT_MAX << ". Implementation needs to be modified. " << endl; + return false; + } + int intLength = maskSizeX * maskSizeY * maskSizeZ * 1 * 1; // one slice, 8-bit + cout << "Preparing to output raw data size=" << intLength << endl; + int progress=0; + int writeUnit=100000; + unsigned char * buffer = new unsigned char[writeUnit]; + int counter=0; + int x,y,z; + for (z=0;zgetXDim(); + int maskSizeY=my4DImageAsMask->getYDim(); + int maskSizeZ=my4DImageAsMask->getZDim(); + unsigned char **** maskData=(unsigned char ****)my4DImageAsMask->getData(); + long bytesExpected = maskSizeX*maskSizeY*maskSizeZ; + long bytesRead=0; + int x,y,z; + for (z=0;z +#include +#include + +using namespace std; + +Na3DWidget::Na3DWidget(QWidget* parent) + : V3dR_GLWidget(NULL, parent, "Title") +{ + _idep = new iDrawExternalParameter(); + _idep->image4d = NULL; + resetView(); + // setVolCompress(false); // might look nicer? + + // This method for eliminating tearing artifacts works but is supposedly obsolete; + // http://stackoverflow.com/questions/5174428/how-to-change-qglformat-for-an-existing-qglwidget-at-runtime + QGLFormat glFormat(context()->format()); + glFormat.setDoubleBuffer(true); // attempt to reduce tearing on Mac + setFormat(glFormat); + + connect(&cameraModel, SIGNAL(focusChanged(const Vector3D&)), + this, SLOT(updateFocus(const Vector3D&))); + connect(&cameraModel, SIGNAL(scaleChanged(qreal)), + this, SLOT(updateRendererZoomRatio(qreal))); + connect(&cameraModel, SIGNAL(rotationChanged(const Rotation3D&)), + this, SLOT(updateRotation(const Rotation3D&))); +} + +Na3DWidget::~Na3DWidget() +{ + delete _idep; _idep = NULL; +} + +void Na3DWidget::resetView() +{ + // qDebug() << "reset"; + cameraModel.setScale(1.0); // fit to window + cameraModel.setFocus(getDefaultFocus()); // center view + cameraModel.setRotation(Rotation3D()); // identity rotation + // Avoid crash before data are initialized + if (!_idep) return; + if (!_idep->image4d) return; + update(); +} + +Vector3D Na3DWidget::getDefaultFocus() const { + if (_idep && _idep->image4d) + return Vector3D(_idep->image4d->getXDim()/2.0, + _idep->image4d->getYDim()/2.0, + _idep->image4d->getZDim()/2.0); + else return Vector3D(0, 0, 0); +} + +// Translate view by dx,dy screen pixels +void Na3DWidget::translateImage(int dx, int dy) +{ + if (!dx && !dy) return; // no motion + // too big is probably an error + if (std::abs(dx) > 2000) return; + if (std::abs(dy) > 2000) return; + Vector3D dFocus_eye(-dx * flip_X, + -dy * flip_Y, + -0.0 * flip_Z); + Vector3D dFocus_obj = ~Rotation3D(mRot) * dFocus_eye; + dFocus_obj /= getZoomScale(); + cameraModel.setFocus(focus() + dFocus_obj); + update(); +} + +// Drag mouse to rotate; shift-drag to translate. +void Na3DWidget::mouseMoveEvent(QMouseEvent * event) +{ + // Maybe write status message when hovering with mouse. + // (Before doing this, we would need to enable buttonless mouseMoveEvent propagation.) + if (Qt::NoButton == event->buttons()) + { + // TODO hover + bMouseIsDragging = false; + return; + } + + // I'm not sure what to do if user is dragging with non-left mouse button + if (! (event->buttons() & Qt::LeftButton) ) + { + bMouseIsDragging = false; + V3dR_GLWidget::mouseMoveEvent(event); // use classic V3D behavior + return; + } + + // Now we know we're dragging + int dx = event->pos().x() - oldDragX; + int dy = event->pos().y() - oldDragY; + oldDragX = event->pos().x(); + oldDragY = event->pos().y(); + // Don't do anything if this is the very first position of the drag + if (!bMouseIsDragging) { // no effect until the second drag position + bMouseIsDragging = true; + return; + } + + bMouseIsDragging = true; + // Should not happen + if (! (dx || dy)) // no motion?!?! + return; + + // Shift-drag to translate + if (event->modifiers() & Qt::ShiftModifier) + { + // qDebug() << "translate"; + translateImage(dx, dy); + update(); + return; + } + // Regular drag to rotate + else + { + // qDebug() << "rotate"; + bool bUseClassicV3dRotation = false; + if (bUseClassicV3dRotation) + V3dR_GLWidget::mouseMoveEvent(event); // regular V3D rotate behavior + else { + Rotation3D oldRotation(mRot); + // std::cout << "old rotation = " << oldRotation << std::endl; + // dragging across the entire viewport should be roughly 180 degrees rotation + qreal rotAnglePerPixel = 3.14159 / ((width() + height()) / 2); + qreal dragDistance = std::sqrt(dx*dx + dy*dy); + qreal rotAngle = dragDistance * rotAnglePerPixel; + // std::cout << "Angle = " << rotAngle << std::endl; + // rotation axis is perpendicular to the direction of the drag + // I think we have to use "dx" instead of "-dx" to compensate for a y-flip deep in V3D + UnitVector3D rotAxis(dy, dx, 0); + // std::cout << "rotation axis = " << rotAxis << std::endl; + Rotation3D dragRotation; + dragRotation.setRotationFromAngleAboutUnitVector(rotAngle, rotAxis); + // std::cout << "drag rotation = " << dragRotation << std::endl; + Rotation3D newRotation = dragRotation * oldRotation; // TODO check order, inversion + // std::cout << "new rotation = " << newRotation << std::endl; + cameraModel.setRotation(newRotation); + update(); // since this mouseMoveEvent() method is interactive. + return; + } + } +} + +void Na3DWidget::mousePressEvent(QMouseEvent * event) { + // Remember this mouse position so we can keep track of the move vector + oldDragX = event->pos().x(); + oldDragY = event->pos().y(); + bMouseIsDragging = true; + + // V3dR_GLWidget::mousePressEvent(event); + if (event->button()==Qt::LeftButton) + { + lastPos = event->pos(); + t_mouseclick = clock(); + } + + if (event->button()==Qt::RightButton && renderer) + { + if (renderer->hitPoint(event->x(), event->y())) //pop-up menu or marker definition + { + updateTool(); + } + + V3dR_GLWidget::update(); + } +} + +void Na3DWidget::mouseReleaseEvent(QMouseEvent * event) { + bMouseIsDragging = false; + + // V3dR_GLWidget::mouseReleaseEvent(event); + int clicktime = fabs(clock() - t_mouseclick); + bool left_quickclick = false; + + if(clicktime<1000) + left_quickclick = true; + + //qDebug()<<"release ..."<button()==Qt::RightButton && renderer) //right-drag + { + (renderer->movePen(event->x(), event->y(), false)); + updateTool(); + } + + if (event->button()==Qt::LeftButton && renderer && left_quickclick) // left click + { + qDebug()<<"left click ... ..."; + + XYZ loc = ((Renderer_tex2*)getRenderer())->selectPosition( event->x(), event->y() ); + + // select neuron: set x, y, z and emit signal + qDebug()<<"emit a signal ..."; + emit neuronSelected(loc.x, loc.y, loc.z); + } + + _stillpaint_disable = false; _still=false; + V3dR_GLWidget::update(); + +} + +// Zoom using mouse wheel +void Na3DWidget::wheelEvent(QWheelEvent * e) +{ + double oldZoom = cameraModel.scale(); // used for smart zooming + // Update renderer camera aperture angle + wheelZoom(e->delta()); + + // Zoom, to be like in Google Earth, depends on cursor position + // But (maybe) only shift focus when zooming IN. + bool doSmartZoom = false; // perhaps smart zooming is just annoying + if (doSmartZoom) + { + double factor = cameraModel.scale()/oldZoom; + if (factor == 1.0) return; + double scale = getZoomScale(); + double dx = e->pos().x() - width()/2.0; + double dy = e->pos().y() - height()/2.0; + Vector3D dFocus(dx * flip_X, + dy * flip_Y, + 0 * flip_Z); + dFocus *= (factor - 1.0) / scale; + dFocus = ~(cameraModel.rotation()) * dFocus; + cameraModel.setFocus(cameraModel.focus() + dFocus); + } + update(); +} + +// Move focus on double click +void Na3DWidget::mouseDoubleClickEvent(QMouseEvent * event) +{ + if (event->button() != Qt::LeftButton) { + V3dR_GLWidget::mouseDoubleClickEvent(event); + return; + } + double dx = event->pos().x() - width()/2.0; + double dy = event->pos().y() - height()/2.0; + translateImage(-dx, -dy); +} + +void Na3DWidget::resizeEvent(QResizeEvent * event) +{ + updateDefaultScale(); + resizeGL(width(), height()); +} + +void Na3DWidget::updateDefaultScale() +{ + float screenWidth = width(); + float screenHeight = height(); + if (!_idep) return; + if (!_idep->image4d) return; + float objectWidth = _idep->image4d->getXDim(); + float objectHeight = _idep->image4d->getYDim(); + + if (screenWidth < 1) return; + if (screenHeight < 1) return; + if (objectWidth < 1) return; + if (objectHeight < 1) return; + float scaleX = screenWidth / objectWidth; + float scaleY = screenHeight / objectHeight; + defaultScale = scaleX > scaleY ? scaleY : scaleX; // fit whole pixmap in window, with bars if necessary + updateRendererZoomRatio(cameraModel.scale()); +} + +void Na3DWidget::updateRendererZoomRatio(qreal relativeScale) +{ + // qDebug() << "update zoom"; + RendererNeuronAnnotator* renderer = (RendererNeuronAnnotator*)getRenderer(); + + float desiredPixelsPerImageVoxel = defaultScale * relativeScale; + float desiredVerticalImageVoxelsDisplayed = height() / desiredPixelsPerImageVoxel; + float desiredVerticalGlUnitsDisplayed = desiredVerticalImageVoxelsDisplayed * glUnitsPerImageVoxel(); + float desiredVerticalApertureInRadians = 2.0 * atan2(desiredVerticalGlUnitsDisplayed/2.0f, (float)renderer->getViewDistance()); + float desiredVerticalApertureInDegrees = desiredVerticalApertureInRadians * 180.0 / 3.14159; + if (desiredVerticalApertureInDegrees > 180.0) + desiredVerticalApertureInDegrees = 180.0; // gl limit + float desiredZoomRatio = desiredVerticalApertureInDegrees / renderer->getViewAngle(); + renderer->setInternalZoomRatio(desiredZoomRatio); + renderer->setupView(width(), height()); +} + +void Na3DWidget::updateFocus(const Vector3D& f) +{ + Rotation3D R_eye_obj(mRot); + // _[xyz]Shift variables are relative to the center of the volume + Vector3D shift_eye = R_eye_obj * (f - getDefaultFocus()); + // _xShift is in gl coordinates scaled by 100/1.4 + // see V3dR_GLWidget::paintGL() method in v3dr_glwidget.cpp + shift_eye *= -glUnitsPerImageVoxel() * 100.0f/1.4f; + _xShift = shift_eye.x(); + _yShift = shift_eye.y(); + _zShift = shift_eye.z(); + dxShift=dyShift=dzShift=0; +} + +void Na3DWidget::updateRotation(const Rotation3D & newRotation) +{ + // Update mRot cached opengl matrix + newRotation.setGLMatrix(mRot); + // Update _xRot, _yRot, _zRot Euler angles + Vector3D eulerAngles = newRotation.convertBodyFixedXYZRotationToThreeAngles(); + eulerAngles *= 180.0 / 3.14159; // convert radians to degrees + _xRot = eulerAngles[0]; + _yRot = eulerAngles[1]; + _zRot = eulerAngles[2]; + while(_xRot < 0.0) _xRot += 360.0; + while(_yRot < 0.0) _yRot += 360.0; + while(_zRot < 0.0) _zRot += 360.0; + // Yes, this is an absolute orientation. I don't even want to think about + // whatever that non-absolute case entails. + _absRot = true; + dxRot = dyRot = dzRot = 0; + // Restore the focus point. So the user does not get lost! + Vector3D f = cameraModel.focus(); + // qDebug() << "focus = " << f.x() << ", " << f.y() << ", " << f.z(); + updateFocus(f); +} + +void Na3DWidget::setGammaBrightness(double gamma) +{ + // I sort of hope this will address everyone's manual brightness needs. + Renderer_gl2* renderer = (Renderer_gl2*)getRenderer(); + if (! renderer) return; + // cout << "gamma = " << gamma << endl; + // Map input intensities to output intensities + // using the renderer's "colormap" texture. + for (int i_in = 0; i_in < 256; ++i_in) { + // gamma correction and type conversion in one line + unsigned char i_out = (unsigned char)(std::pow(i_in / 255.0, gamma) * 255.0 + 0.50); + // cout << " " << i_in << "\t" << (int)i_out << endl; + for (int channel = 0; channel < FILL_CHANNEL; ++channel) { + // Intensities are set in the alpha channel only + // (i.e. not R, G, or B) + renderer->colormap[channel][i_in].a = i_out; + } + } + update(); +} + +bool Na3DWidget::loadMy4DImage(const My4DImage* my4DImage, const My4DImage* neuronMaskImage) { + if (_idep==0) { + _idep = new iDrawExternalParameter(); + } else { + if (_idep->image4d!=0) { + // delete _idep->image4d; + } + } + // TODO - get some const correctness in here... + _idep->image4d = const_cast(my4DImage); + prepareImageData(); + updateDefaultScale(); + + // if (neuronMaskImage) { + // if (!populateNeuronMask(neuronMaskImage)) return false; + // } + + resetView(); + update(); + return true; +} + +float Na3DWidget::glUnitsPerImageVoxel() const +{ + const RendererNeuronAnnotator* renderer = (const RendererNeuronAnnotator*)getRenderer(); + return renderer->glUnitsPerImageVoxel(); +} + +float Na3DWidget::getZoomScale() const +{ // in (vertical) screen pixels per image voxel at focus point + // theta is half the true vertical view aperture in radians. + const RendererNeuronAnnotator* renderer = (const RendererNeuronAnnotator*)getRenderer(); + float theta = (renderer->getZoomedPerspectiveViewAngle() / 2.0) * (3.14159 / 180.0); + float screen_height_gl = 2.0 * renderer->getViewDistance() * std::tan(theta); + float screen_pixels_per_gl_unit = height() / screen_height_gl; + float answer = screen_pixels_per_gl_unit * glUnitsPerImageVoxel(); + // qDebug() << "screen pixels per image pixel = " << answer; + // return answer * 6.28; // TODO - lose the mystery 6 tc image + // return answer * 3.5; // TODO - fudge factor is ~3.5 for E1.tif + return answer; +} + +bool Na3DWidget::populateNeuronMask(const My4DImage* neuronMaskImage) { + RendererNeuronAnnotator* renderer = (RendererNeuronAnnotator*)getRenderer(); + if (!renderer->populateNeuronMask(neuronMaskImage)) { + return false; + } + if (!renderer->initializeTextureMasks()) { + return false; + } + return true; +} + +void Na3DWidget::prepareImageData() { + // V3D crashes unless updateminmaxvalues is called + _idep->image4d->updateminmaxvalues(); + updateImageData(); +} + +void Na3DWidget::choiceRenderer() { + qDebug("Na3DWidget::choiceRenderer"); + _isSoftwareGL = false; + GLeeInit(); + renderer = new RendererNeuronAnnotator(this); +} + +// Draw a little 3D cross for testing +// In GL coordinates, where volume is contained within [-1,1]^3 +void Na3DWidget::paintFiducial(const Vector3D& v) { + qreal dd = 10.0 * glUnitsPerImageVoxel() / getZoomScale(); // 10 pixel crosshair + qreal x = v.x(); + qreal y = v.y(); + qreal z = v.z(); + glBegin(GL_LINES); + glVertex3f(x-dd,y,z); + glVertex3f(x+dd,y,z); + glVertex3f(x,y-dd,z); + glVertex3f(x,y+dd,z); + glVertex3f(x,y,z-dd); + glVertex3f(x,y,z+dd); + glEnd(); +} + +void Na3DWidget::paintGL() +{ + V3dR_GLWidget::paintGL(); + + // Draw focus position to ensure it remains in center of screen, + // for debugging + if (bPaintCrosshair) + { + Vector3D focus = cameraModel.focus(); + // Convert from object coordinates to gl coordinates + focus -= getDefaultFocus(); // reverse glTranslate(.5,.5,.5) + focus *= glUnitsPerImageVoxel(); // scale to [-1,1]^3 + // Flip axes corresponding to v3dr_glwidget flip_X, flip_Y, flip_Z + focus.x() *= flip_X; + focus.y() *= flip_Y; + focus.z() *= flip_Z; + // Don't allow other geometry to obscure the marker + // glClear(GL_DEPTH_BUFFER_BIT); // Destroys depth buffer; probably too harsh + glPushAttrib(GL_CURRENT_BIT | GL_DEPTH_BUFFER_BIT); // save color and depth test + glDisable(GL_DEPTH_TEST); + glColor3f(0,1,1); // cyan marker color + paintFiducial(focus); + glPopAttrib(); + } +} + +void Na3DWidget::annotationModelUpdate(QString updateType) { + if (updateType.startsWith("NEURONMASK")) { + QList list=updateType.split(QRegExp("\\s+")); + QString indexString=list.at(1); + QString checkedString=list.at(2); + int index=indexString.toInt(); + bool checked=(checkedString.toInt()==1); + + RendererNeuronAnnotator* ra = (RendererNeuronAnnotator*)renderer; + QProgressDialog progressDialog( QString("Updating textures"), 0, 0, 100, this, Qt::Tool | Qt::WindowStaysOnTopHint); + progressDialog.setAutoClose(true); + + // Background change requiring full reload of texture image stacks + if (index==0) { + QList * maskMipList = annotationSession->getMaskMipList(); + QList tempList; + for (int i=1;isize();i++) { + if (annotationSession->neuronMaskIsChecked(i)) { + tempList.append(i); + } + } + // Background toggle + if (checked) { + ra->setBackgroundBaseTexture(tempList, progressDialog); + } else { + ra->setBlankBaseTexture(tempList, progressDialog); + } + } else { + // Change of individual mask + ra->updateCurrentTextureMask(index, (checked ? 1 : 0), progressDialog); + } + ra->paint(); + update(); + } +} + diff --git a/v3d_main/neuron_annotator/Na3DWidget.h b/v3d_main/neuron_annotator/Na3DWidget.h new file mode 100644 index 0000000000..ff73a581a2 --- /dev/null +++ b/v3d_main/neuron_annotator/Na3DWidget.h @@ -0,0 +1,59 @@ +#ifndef NA3DWIDGET_H +#define NA3DWIDGET_H + +#include "../3drenderer/v3dr_glwidget.h" +#include "../v3d/xformwidget.h" +#include "NaViewer.h" +#include "Rotation3D.h" + +// Derived class of V3dR_GLWidget so we can use a simpler constructor +// for the convenience of Qt Designer, +// and to customize features for NeuronAnnotator. +class Na3DWidget : public V3dR_GLWidget, public NaViewer +{ + Q_OBJECT + +public: + Na3DWidget(QWidget* parent); + virtual ~Na3DWidget(); + bool loadMy4DImage(const My4DImage* my4DImage, const My4DImage* neuronMaskImage = NULL); + bool populateNeuronMask(const My4DImage* neuronMaskImage); + + const Vector3D& focus() const {return cameraModel.focus();} + float getZoomScale() const; // in viewport pixels per image voxel at focus + + virtual void mouseMoveEvent(QMouseEvent * event); + virtual void mousePressEvent(QMouseEvent * event); + virtual void mouseReleaseEvent(QMouseEvent * event); + virtual void wheelEvent(QWheelEvent * e); // zoom with scroll wheel + virtual void mouseDoubleClickEvent(QMouseEvent * event); // double click to center + + virtual void resizeEvent(QResizeEvent * event); + +public slots: + void setGammaBrightness(double gamma); + virtual void annotationModelUpdate(QString updateType); + void resetView(); + void translateImage(int dx, int dy); + void showCrosshair(bool b) {NaViewer::showCrosshair(b); update();} + +protected slots: + // focus setting should be done via cameraModel, not with these methods. + void updateRendererZoomRatio(qreal relativeScale); + void updateRotation(const Rotation3D&); + void updateFocus(const Vector3D& f); + +signals: + void neuronSelected(double x, double y, double z); + +protected: + virtual void paintGL(); + void paintFiducial(const Vector3D& v); + Vector3D getDefaultFocus() const; + void prepareImageData(); + virtual void choiceRenderer(); + float glUnitsPerImageVoxel() const; + void updateDefaultScale(); +}; + +#endif // NA3DWIDGET_H diff --git a/v3d_main/neuron_annotator/NaLargeMIPWidget.cpp b/v3d_main/neuron_annotator/NaLargeMIPWidget.cpp new file mode 100644 index 0000000000..6181d1aa3a --- /dev/null +++ b/v3d_main/neuron_annotator/NaLargeMIPWidget.cpp @@ -0,0 +1,522 @@ +#include "NaLargeMIPWidget.h" +#include +#include +#include + +///////////////////// +// MipData methods // +///////////////////// + +// Screen Y-axis is flipped with respect to data Y-axis in V3D 3D viewer +static const qreal flip_X = 1; +static const qreal flip_Y = -1; +static const qreal flip_Z = -1; + +MipData::MipData(const My4DImage* img, const My4DImage* maskImg, QObject * parent) + : QObject(parent) +{ + loadMy4DImage(img, maskImg); +} + +bool MipData::loadMy4DImage(const My4DImage* img, const My4DImage* maskImg) +{ + // Validate data in this thread + if (!img) return false; + + dataMin = 1e9; + dataMax = -1e9; + std::map neuronImages; + + data.assign(img->getXDim(), MipColumn(img->getYDim(), MipPixel(img->getCDim()))); // 50 ms + + // qDebug() << "size = " << data.size(); + // qDebug() << "nColumns = " << nColumns(); + // MipData& t = *this; + My4DImage * mutable_img = const_cast(img); + Image4DProxy imgProxy(mutable_img); + + for (int x = 0; x < nColumns(); ++x) { + for (int y = 0; y < nRows(); ++y) { + float maxIntensity = -1.0; + for (int z = 0; z < img->getZDim(); ++z) { + float intensity = 0.0; + for (int c = 0; c < nChannels(); ++c) { + float val = (float)imgProxy.value_at(x,y,z,c); + // Update minimum and maximum values + if (val > dataMax) dataMax = val; + if (val < dataMin) dataMin = val; + // Update current voxel intensity + intensity += val; + } + assert(intensity >= 0.0); + // Maximum intensity projection - regardless of neuron masks + if (intensity > maxIntensity) { + maxIntensity = intensity; + for (int c = 0; c < nChannels(); ++c) + data[x][y][c] = (float)imgProxy.value_at(x,y,z,c); + data[x][y].z = z; // remember z-value of max intensity pixel + // data[x][y].intensity = intensity; + } + if (false) { +// if (maskImg) { + int neuronMaskId = maskImg->at(x,y,z); + if (neuronImages.find(neuronMaskId) == neuronImages.end()) { + // TODO create another neuron mask + qDebug() << "creating neuron image #" << neuronMaskId; + neuronImages[neuronMaskId] = new MipData(NULL, NULL, this); // TODO - use img + } + MipData * neuronImage = neuronImages[neuronMaskId]; + // TODO - react to neuron information + } + } + } + emit processedXColumn(x + 1); + // qDebug() << "processed column " << x + 1; + } + return true; +} + +int MipData::nColumns() const {return data.size();} +int MipData::nRows() const { + if (nColumns() < 1) return 0; + return data[0].size(); +} +int MipData::nChannels() const { + if (nRows() < 1) return 0; + return data[0][0].size(); +} + +///////////////////////////// +// MipDisplayImage methods // +///////////////////////////// + + +MipDisplayImage::MipDisplayImage() +{ + connect(&originalData, SIGNAL(processedXColumn(int)), + this, SLOT(processedXColumnSlot(int))); +} + +void MipDisplayImage::processedXColumnSlot(int c) { + // qDebug() << "foo " << c; + emit processedXColumn(c); +} + +void MipDisplayImage::loadImageData(const My4DImage* img, const My4DImage* maskImg) { + load4DImage(img, maskImg); +} + +void MipDisplayImage::load4DImage(const My4DImage* img, const My4DImage* maskImg) +{ + image = QImage(QSize(img->getXDim(), img->getYDim()), QImage::Format_RGB32); + originalData.loadMy4DImage(img, maskImg); + // Default display exactly entire intensity range + displayMin = originalData.dataMin; + // displayMin = 0.0; // example ct image has a very large minimum + displayMax = originalData.dataMax; + setGamma(1.0); + updateCorrectedIntensities(); + emit initialImageDataLoaded(); +} + +void MipDisplayImage::updateCorrectedIntensities() +{ + for (int x = 0; x < originalData.nColumns(); ++x) { + for (int y = 0; y < originalData.nRows(); ++y) { + unsigned char red, green, blue; + if (originalData.nChannels() == 1) + red = green = blue = getCorrectedIntensity(x, y, 0); + else { + red = getCorrectedIntensity(x, y, 0); + green = getCorrectedIntensity(x, y, 1); + blue = getCorrectedIntensity(x, y, 2); + } + image.setPixel(x, y, qRgb(red, green, blue)); + } + } +} + +void MipDisplayImage::setGamma(float gamma) +{ + assert(gamma > 0.0); + displayGamma = gamma; + float previous_i_out = 0.0; // for slope interpolation + for (int i = 0; i < 256; ++i) { // gamma table entries + float i_in = i/255.0; // range 0.0-1.0 + float i_out = std::pow(i_in, gamma); + if (i_out > 1.0) i_out = 1.0; + if (i_out < 0.0) i_out = 0.0; + i_out *= 255.0; // scale to 8-bit for RGB use + gammaTable[i] = i_out; + if (i > 0) { + // first derivative of gamma table for interpolation + // linear interpolation + dGammaTable[i - 1] = i_out - previous_i_out; + } + previous_i_out = i_out; + } + dGammaTable[255] = 0.0; // final unused entry for neatness +} + +// i_in as original float value +// Output in range 0-255 +unsigned char MipDisplayImage::getCorrectedIntensity(float i_in) const +{ + if (i_in <= displayMin) return 0; + if (i_in >= displayMax) return 255; + // HDR correction + float i_out = (i_in - displayMin) / (displayMax - displayMin); + // gamma correction + i_out *= 255.0; // scale to use 256 entry gamma lookup table + int ix = int(i_out); + int d_ix = i_out - ix; // fractional part for interpolation + assert(d_ix >= 0.0); + assert(d_ix <= 1.0); + i_out = gammaTable[ix] + d_ix * dGammaTable[ix]; + int answer = int(i_out + 0.4999); + if (answer <= 0) return 0; + if (answer >= 255) return 255; + return (unsigned char)answer; +} + +unsigned char MipDisplayImage::getCorrectedIntensity(int x, int y, int c) const +{ + return getCorrectedIntensity(originalData[x][y][c]); +} + +////////////////////////////// +// NaLargeMIPWidget methods // +////////////////////////////// + +NaLargeMIPWidget::NaLargeMIPWidget(QWidget * parent) + : QWidget(parent), mipImage(NULL), imageUpdateThread(this) +{ + // Test image + pixmap = QPixmap(200, 200); + pixmap.fill(Qt::black); + updateDefaultScale(); + resetView(); + setMouseTracking(true); // respond to mouse hover events + imageUpdateThread.start(); + + // Progress bar for when image is being processed + progressBar = new QProgressBar(this); + progressBar->setValue(24); + QGridLayout * gridLayout = new QGridLayout(this); + gridLayout->addWidget(progressBar, 0, 0, 1, 1); + progressBar->hide(); + connect(progressBar, SIGNAL(valueChanged(int)), + this, SLOT(update())); +} + +NaLargeMIPWidget::~NaLargeMIPWidget() +{ + if (mipImage) { + delete mipImage; + mipImage = NULL; + } +} + +bool NaLargeMIPWidget::loadMy4DImage(const My4DImage* img, const My4DImage* maskImg) +{ + int imageC = img->getCDim(); + // Unsure how to map colors if not 1 or 3 colors + if ((imageC != 1) && (imageC != 3)) { + qDebug() << "Error: number of channels = " << img->getCDim(); + return false; + } + // Delegate computation of maximum intensity projection + // to MipDisplayImage class + if (mipImage) { + delete mipImage; + mipImage = NULL; + } + // Put loading of image data into another thread + qDebug() << "Starting MIP data load"; + mipImage = new MipDisplayImage(); + mipImage->moveToThread(&imageUpdateThread); + connect(this, SIGNAL(volumeDataUpdated(const My4DImage*, const My4DImage*)), + mipImage, SLOT(loadImageData(const My4DImage*, const My4DImage*))); + connect(mipImage, SIGNAL(initialImageDataLoaded()), + this, SLOT(initializePixmap())); + progressBar->setMaximum(img->getXDim()); + connect(mipImage, SIGNAL(processedXColumn(int)), + progressBar, SLOT(setValue(int))); + progressBar->show(); + emit volumeDataUpdated(img, maskImg); // Start image processing in another thread. + return true; +} + +void NaLargeMIPWidget::initializePixmap() +{ + // Image processing is done, finish up in the GUI thread. + progressBar->hide(); + pixmap = QPixmap::fromImage(mipImage->image); + updateDefaultScale(); + resetView(); + update(); + qDebug() << "Finished MIP data load"; +} + +void NaLargeMIPWidget::updateDefaultScale() +{ + float screenWidth = width(); + float screenHeight = height(); + float objectWidth = pixmap.size().width(); + float objectHeight = pixmap.size().height(); + + if (screenWidth < 1) return; + if (screenHeight < 1) return; + if (objectWidth < 1) return; + if (objectHeight < 1) return; + float scaleX = screenWidth / objectWidth; + float scaleY = screenHeight / objectHeight; + // fit whole pixmap in window, with bars if necessary + defaultScale = scaleX > scaleY ? scaleY : scaleX; +} + +void NaLargeMIPWidget::resetView() +{ + cameraModel.setScale(1.0); // fit to window + qreal focusZ = cameraModel.focus().z(); + cameraModel.setFocus(Vector3D( + pixmap.size().width()/2.0, + pixmap.size().height()/2.0, + focusZ)); +} + +void NaLargeMIPWidget::resizeEvent(QResizeEvent * event) { + updateDefaultScale(); +} + +void NaLargeMIPWidget::paintIntensityNumerals(QPainter& painter) +{ + // qDebug() << "numerals"; + QPointF v_img_upleft = X_img_view * painter.viewport().topLeft(); + QPointF v_img_downright = X_img_view * painter.viewport().bottomRight(); + // qDebug() << v_img_upleft; + // qDebug() << v_img_downright; + + // clear transform for text rendering, otherwise font size is harder to manage + painter.resetTransform(); + + QFont font = painter.font(); + float scale = defaultScale * cameraModel.scale(); + font.setPixelSize(scale/4.0); + font.setStyleStrategy(QFont::NoAntialias); // text rendering can be slow + painter.setFont(font); + + // qDebug() << "nColumns = " << mipImage->originalData.nColumns(); + // qDebug() << "nRows = " << mipImage->originalData.nRows(); + + // Iterate over only the image pixels that are visible + for (int x = int(v_img_upleft.x() - 0.5); x <= int(v_img_downright.x() + 0.5); ++x) { + // qDebug() << "x = " << x; + if (x < 0) + continue; + if (x >= mipImage->originalData.nColumns()) + continue; + for (int y = int(v_img_upleft.y() - 0.5); y <= int(v_img_downright.y() + 0.5); ++y) { + // qDebug() << "y = " << y; + if (y < 0) + continue; + if (y >= mipImage->originalData.nRows()) + continue; + // Transform image pixel coordinates back to viewport coordinates + QPointF v = X_view_img * QPointF(x, y); + // qDebug() << x << ", " << y << "; " << v.x() << ", " << v.y(); + // Print original data intensity, not displayed intensity + // But choose font color based on displayed intensity. + unsigned int red = qRed(mipImage->image.pixel(x, y)); + unsigned int green = qGreen(mipImage->image.pixel(x, y)); + unsigned int blue = qBlue(mipImage->image.pixel(x, y)); + // human color perception is important here + float displayIntensity = 0.30 * red + 0.58 * green + 0.12 * blue; + if (displayIntensity < 128) + painter.setPen(Qt::white); + else + painter.setPen(Qt::black); + + int nC = mipImage->originalData.nChannels(); + float lineHeight = scale / (nC + 1.0); + // Write a neat little column of numbers inside each pixel + for (int c = 0; c < nC; ++c) { + float val = mipImage->originalData[x][y][c]; + painter.drawText(QRectF(v.x(), v.y() + (c + 0.5) * lineHeight, scale, lineHeight), + Qt::AlignHCenter | Qt::AlignVCenter, + QString("%1").arg(val)); + } + } + } +} + +void NaLargeMIPWidget::paintEvent(QPaintEvent *event) +{ + // qDebug() << "paint MIP " << width() << ", " << height(); + painter.begin(this); + painter.setRenderHint(QPainter::Antialiasing); + painter.setRenderHint(QPainter::SmoothPixmapTransform); + // first fill background with black + painter.fillRect(0, 0, width(), height(), Qt::black); + // adjust painter coordinate system to place image correctly + float scale = defaultScale * cameraModel.scale(); + qreal tx = pixmap.width()/2.0 + flip_X * (cameraModel.focus().x() - pixmap.width()/2.0); + qreal ty = pixmap.height()/2.0 + flip_Y * (cameraModel.focus().y() - pixmap.height()/2.0); + painter.translate(width()/2.0 - tx * scale, height()/2.0 - ty * scale); + painter.scale(scale, scale); + + // I want to convert screen coordinates to image coordinates; + // The QPainter object knows this transformation. + // This nomenclature for the transforms, e.g. X_view_img , comes from the + // advanced dynamics community at Stanford, specifically the disciples of Thomas Kane. + X_view_img = painter.transform(); + X_img_view = painter.transform().inverted(); + + painter.drawPixmap(0, 0, pixmap); // magic! + + if (bPaintCrosshair) { + // qDebug() << "paint crosshair"; + // Q: Why all this complicated math instead of just [width()/2, height()/2]? + // A: This helps debug/document placement of image focus + qreal cx = pixmap.width()/2.0 + flip_X * (cameraModel.focus().x() - pixmap.width()/2.0); + qreal cy = pixmap.height()/2.0 + flip_Y * (cameraModel.focus().y() - pixmap.height()/2.0); + QPointF f(cx, cy); + QPointF dx(10.0 / scale, 0); // crosshair size is ten pixels + QPointF dy(0, 10.0 / scale); + painter.setPen(Qt::cyan); + painter.drawLine(f - dx, f + dx); + painter.drawLine(f - dy, f + dy); + } + + // At large zoom levels, write the intensity values at each pixel + if (scale > 40) { // 40 display pixels per image pixel + paintIntensityNumerals(painter); + } + painter.end(); +} + +void NaLargeMIPWidget::translateImage(int dx, int dy) +{ + if (!dx && !dy) return; + float scale = defaultScale * cameraModel.scale(); + cameraModel.setFocus(cameraModel.focus() - Vector3D(flip_X * dx/scale, flip_Y * dy/scale, 0)); + update(); +} + +// Zoom using mouse wheel +void NaLargeMIPWidget::wheelEvent(QWheelEvent * e) // mouse wheel +{ + double oldZoom = cameraModel.scale(); + wheelZoom(e->delta()); + double factor = cameraModel.scale()/oldZoom; + + // Zoom like in Google earth depends on cursor position + bool doSmartZoom = false; + // Smart zoom only when zooming *in*, not when zooming *out*, + // to minimize loss of painstakingly adjusted foucs. + if (e->delta() < 0) doSmartZoom = true; // adjust focus when zooming in + if (doSmartZoom) { + double scale = cameraModel.scale() * defaultScale; + double dx = e->pos().x() - width()/2.0; + double dy = e->pos().y() - height()/2.0; + double dx2 = ((factor - 1.0) * dx) / scale; + double dy2 = ((factor - 1.0) * dy) / scale; + cameraModel.setFocus(cameraModel.focus() + Vector3D(flip_X * dx2, flip_Y * dy2, 0)); + } + update(); +} + +void NaLargeMIPWidget::mousePressEvent(QMouseEvent * event) +{ + // Consider starting a translation drag operation + if (event->buttons() & Qt::LeftButton) { + bMouseIsDragging = true; + oldDragX = event->pos().x(); + oldDragY = event->pos().y(); + } + else { + bMouseIsDragging = false; + } +} + +void NaLargeMIPWidget::mouseReleaseEvent(QMouseEvent * event) +{ + // End any drag event + bMouseIsDragging = false; +} + +// Drag in widget to translate the MIP image in x,y +void NaLargeMIPWidget::mouseMoveEvent(QMouseEvent * event) +{ + // Hover action: status message + // Write status message when hovering with mouse. + // Notice statement "setMouseTracking(true)" in constructor. + if (Qt::NoButton == event->buttons()) + { + // Hover to show (x, y, value) in status bar + if (!mipImage) return; + QPointF v_img = X_img_view * QPointF(event->pos()); + int x = v_img.x(); + int y = v_img.y(); + int z = 0; + QString value(""); // default value + if ( (x >= 0) && (x < mipImage->originalData.nColumns()) + && (y >= 0) && (y < mipImage->originalData.nRows()) ) + { + z = mipImage->originalData[x][y].z; + value = ""; + int nC = mipImage->originalData.nChannels(); + if (nC > 1) value += "["; + for (int c = 0; c < nC; ++c) { + if (c > 0) value += ", "; + float val = mipImage->originalData[x][y][c]; + value += QString("%1").arg(val); + } + if (nC > 1) value += "]"; + } + + emit statusMessage(QString("x = %1, y = %2, z = %3, value = %4") + .arg(x) + .arg(y) + .arg(z) + .arg(value) + ); + bMouseIsDragging = false; + return; + } + + if (! (event->buttons() & Qt::LeftButton) ) { + // qDebug() << "Not left button..."; + bMouseIsDragging = false; + return; + } + + int dx = event->pos().x() - oldDragX; + int dy = event->pos().y() - oldDragY; + oldDragX = event->pos().x(); + oldDragY = event->pos().y(); + + // Do nothing until the second drag point is reached + if (!bMouseIsDragging) { + bMouseIsDragging = true; + return; + } + + // Left drag action: translate + // Mouse drag to translate image + translateImage(dx, dy); +} + +// Move focus on double click +void NaLargeMIPWidget::mouseDoubleClickEvent(QMouseEvent * event) +{ + if (event->button() != Qt::LeftButton) + return; + double dx = event->pos().x() - width()/2.0; + double dy = event->pos().y() - height()/2.0; + translateImage(-dx, -dy); +} + +void NaLargeMIPWidget::annotationModelUpdate(QString updateType) { + // Stub +} diff --git a/v3d_main/neuron_annotator/NaLargeMIPWidget.h b/v3d_main/neuron_annotator/NaLargeMIPWidget.h new file mode 100644 index 0000000000..081fce39e9 --- /dev/null +++ b/v3d_main/neuron_annotator/NaLargeMIPWidget.h @@ -0,0 +1,151 @@ +#ifndef NA_LARGE_MIP_WIDGET_H +#define NA_LARGE_MIP_WIDGET_H + +#include +#include +#include +#include +#include +#include "NaViewer.h" + +class MipDisplayImage; + +// MipData is a generic container for float representation of original MIP data. +// MipDisplayImage can contain a binary tree of MipDisplayImages, +// for efficient update when toggling different components (e.g. neurons). +class MipPixel : public std::vector +{ +public: + MipPixel(size_t nChannels = 1) + : std::vector(nChannels, 0.0f) + , z(-1) // , intensity(0.0f) + {} + + int z; + // float intensity; +}; +typedef std::vector MipColumn; +class MipData : public QObject +{ + Q_OBJECT + +public: + explicit MipData(QObject * parent = NULL) : QObject(parent) {} + // Initialize from either a 3D data set... + explicit MipData(const My4DImage* img, const My4DImage* maskImg = NULL, QObject * parent = NULL); + // ...or a pair of intermediate images in a binary tree + // explicit MipData(const MipData* child1, const MipData* child2, QObject * parent = NULL); + + const MipColumn& operator[](int index) const { + return data[index]; + } + MipColumn& operator[](int index) { + return data[index]; + } + + bool loadMy4DImage(const My4DImage* img, const My4DImage* maskImg = NULL); + + int nColumns() const; + int nRows() const; + int nChannels() const; + + float dataMin; // actual minimum value + float dataMax; // actual maximum value + +signals: + void dataChanged(); + void processedXColumn(int); + +public slots: + void updateData() {} + +private: + std::vector data; // Image pixels + bool bToggledOn; // Whether this MIP image is on or off (within binary tree, say) +}; + +// MipDisplayImage is a derived class of QImage, intended +// to encapsulate gamma/HDR correctability. +class MipDisplayImage : public QObject +{ + Q_OBJECT + +public: + explicit MipDisplayImage(); + void setGamma(float gamma); + + MipData originalData; + + // contain rather than inherit... + QImage image; + +signals: + void initialImageDataLoaded(); // primary MIP image ready for display + void maskDataLoaded(); // ready for neuron mask toggling + void processedXColumn(int); + +public slots: + void loadImageData(const My4DImage* img, const My4DImage* maskImg); + void processedXColumnSlot(int); + +protected: + unsigned char getCorrectedIntensity(float i_in) const; + unsigned char getCorrectedIntensity(int x, int y, int c) const; + void updateCorrectedIntensities(); + void load4DImage(const My4DImage* img, const My4DImage* maskImg = NULL); + + + float displayMin; // min display value for HDR + float displayMax; // max display value for HDR + float displayGamma; // gamma correction between displayMin and displayMax + float gammaTable[256]; // lookup table for gamma correction + float dGammaTable[256]; // to help interpolation, especially for high dynamic range data. +}; + +// Large maximum intensity projection viewer for Neuron Annotator +// mode of V3D +class NaLargeMIPWidget : public QWidget, public NaViewer +{ + Q_OBJECT + +public: + NaLargeMIPWidget(QWidget* parent); + virtual ~NaLargeMIPWidget(); + // virtual bool loadMy4DImage(const My4DImage* my4DImage); + virtual bool loadMy4DImage(const My4DImage* my4DImage, const My4DImage* maskImg = NULL); + virtual void paintEvent(QPaintEvent *event); + // Drag with mouse to translate + virtual void mouseMoveEvent(QMouseEvent * event); + virtual void mousePressEvent(QMouseEvent * event); + virtual void mouseReleaseEvent(QMouseEvent * event); + // double click to center + virtual void mouseDoubleClickEvent(QMouseEvent * event); + virtual void wheelEvent(QWheelEvent * e); // zoom with scroll wheel + virtual void resizeEvent(QResizeEvent * event); + void translateImage(int dx, int dy); + +signals: + // message intended for main window status area + void statusMessage(const QString&); + void volumeDataUpdated(const My4DImage*, const My4DImage*); + +public slots: + void annotationModelUpdate(QString updateType); + void showCrosshair(bool b) {NaViewer::showCrosshair(b); update();} + void initializePixmap(); // when a new image has loaded + +protected: + void updateDefaultScale(); + void resetView(); + void paintIntensityNumerals(QPainter& painter); + + MipDisplayImage * mipImage; + QPixmap pixmap; + QPainter painter; + QTransform X_img_view; + QTransform X_view_img; + QThread imageUpdateThread; + QProgressBar * progressBar; +}; + +#endif // NA_LARGE_MIP_WIDGET_H diff --git a/v3d_main/neuron_annotator/NaMainWindow.cpp b/v3d_main/neuron_annotator/NaMainWindow.cpp new file mode 100644 index 0000000000..ffe53f821a --- /dev/null +++ b/v3d_main/neuron_annotator/NaMainWindow.cpp @@ -0,0 +1,401 @@ +#include +#include +#include +#include +#include +#include +#include "NaMainWindow.h" +#include "Na3DWidget.h" +#include "ui_NaMainWindow.h" +#include "../basic_c_fun/v3d_message.h" +#include "../v3d/v3d_application.h" +#include "AnnotationSession.h" +#include "MultiColorImageStackNode.h" +#include "NeuronAnnotatorResultNode.h" +#include "TimebasedIdentifierGenerator.h" +#include "RendererNeuronAnnotator.h" +#include "GalleryButton.h" +#include "CellCounter3D.h" +#include "NeuronSelector.h" + +using namespace std; + +NaMainWindow::NaMainWindow() + : nutateThread(NULL) +{ + ui.setupUi(this); + //QMetaObject::connectSlotsByName(this); This is apparently already called by setupUi, so calling it again creates repeat trigger events + annotationSession=0; + + // Wire up Z-stack HDR tool + connect(ui.HDRRed_pushButton, SIGNAL(clicked()), + ui.naZStackWidget, SLOT(setRedChannel())); + connect(ui.HDRGreen_pushButton, SIGNAL(clicked()), + ui.naZStackWidget, SLOT(setGreenChannel())); + connect(ui.HDRBlue_pushButton, SIGNAL(clicked()), + ui.naZStackWidget, SLOT(setBlueChannel())); + connect(ui.ZSlice_horizontalScrollBar, SIGNAL(valueChanged(int)), + ui.naZStackWidget, SLOT(setCurrentZSlice(int))); + connect(ui.naZStackWidget, SIGNAL(curZsliceChanged(int)), + ui.ZSlice_horizontalScrollBar, SLOT(setValue(int))); + connect(ui.BoxSize_spinBox, SIGNAL(valueChanged(int)), + ui.naZStackWidget, SLOT(updateROIsize(int))); + connect(ui.naZStackWidget, SIGNAL(boxSizeChanged(int)), + ui.BoxSize_spinBox, SLOT(setValue(int))); + // Wire up gamma correction + connect(ui.gammaWidget_3D, SIGNAL(gammaBrightnessChanged(double)), + ui.v3dr_glwidget, SLOT(setGammaBrightness(double))); + connect(ui.gammaWidget_3D, SIGNAL(gammaBrightnessChanged(double)), + this, SLOT(updateThumbnailGamma(double))); + // Status bar message + connect(ui.naLargeMIPWidget, SIGNAL(statusMessage(const QString&)), + statusBar(), SLOT(showMessage(const QString&))); + // 3D viewer reset view + connect(ui.rotationResetButton, SIGNAL(clicked()), + ui.v3dr_glwidget, SLOT(resetView())); + // Whether to use common zoom and focus in MIP, ZStack and 3D viewers + connect(ui.actionLink_viewers, SIGNAL(toggled(bool)), + this, SLOT(unifyCameras(bool))); + unifyCameras(true); // Start with cameras linked + connect(ui.nutateButton, SIGNAL(toggled(bool)), + this, SLOT(setNutate(bool))); + // Crosshair + connect(ui.actionShow_Crosshair, SIGNAL(toggled(bool)), + ui.naLargeMIPWidget, SLOT(showCrosshair(bool))); + connect(ui.actionShow_Crosshair, SIGNAL(toggled(bool)), + ui.v3dr_glwidget, SLOT(showCrosshair(bool))); +} + +void NaMainWindow::setNutate(bool bDoNutate) +{ + if (bDoNutate) { + // qDebug() << "nutate"; + if (! nutateThread) { + nutateThread = new NutateThread(0.2, this); + qRegisterMetaType("Rotation3D"); + connect(nutateThread, SIGNAL(nutate(const Rotation3D&)), + this, SLOT(nutate(const Rotation3D&))); + } + + if (! nutateThread->isRunning()) + nutateThread->start(QThread::IdlePriority); + if (nutateThread->isRunning()) + nutateThread->unpause(); + } + else { + // qDebug() << "stop nutating"; + if (!nutateThread) return; + if (nutateThread->isRunning()) + nutateThread->pause(); + } +} + +void NaMainWindow::nutate(const Rotation3D& R) { + // qDebug() << "nutate!"; + // std::cout << R << std::endl; + CameraModel& cam = ui.v3dr_glwidget->cameraModel; + if (!ui.v3dr_glwidget->mouseIsDragging()) { + cam.setRotation(R * cam.rotation()); + ui.v3dr_glwidget->update(); + } +} + +void NaMainWindow::unifyCameras(bool bDoUnify) +{ + // TODO - explicitly copy parameters from active displayed viewer + if (bDoUnify) { + ui.naLargeMIPWidget->synchronizeWithCameraModel(&sharedCameraModel); + ui.naZStackWidget->synchronizeWithCameraModel(&sharedCameraModel); + ui.v3dr_glwidget->synchronizeWithCameraModel(&sharedCameraModel); + // qDebug() << "unify cameras"; + } + else { + ui.naLargeMIPWidget->decoupleCameraModel(&sharedCameraModel); + ui.naZStackWidget->decoupleCameraModel(&sharedCameraModel); + ui.v3dr_glwidget->decoupleCameraModel(&sharedCameraModel); + // qDebug() << "disband cameras"; + } +} + +void NaMainWindow::setZRange(int minZ, int maxZ) { + // qDebug() << "minZ = " << minZ << "; maxZ = " << maxZ; + QString text = QString("of %1").arg(maxZ); + // qDebug() << text; + ui.ZSliceTotal_label->setText(text); + ui.ZSlice_horizontalScrollBar->setMaximum(maxZ); + ui.ZSlice_spinBox->setMaximum(maxZ); + ui.ZSlice_horizontalScrollBar->setMinimum(minZ); + ui.ZSlice_spinBox->setMinimum(minZ); +} + +void NaMainWindow::handleCoordinatedCloseEvent(QCloseEvent *event) { + event->accept(); +} + +void NaMainWindow::closeEvent(QCloseEvent *event) +{ + V3dApplication::handleCloseEvent(event); +} + +void NaMainWindow::on_actionQuit_triggered() { + close(); +} + +void NaMainWindow::on_actionV3DDefault_triggered() { + V3dApplication::deactivateNaMainWindow(); + V3dApplication::activateMainWindow(); +} + +void NaMainWindow::on_actionNeuronAnnotator_triggered() { + V3dApplication::activateNaMainWindow(); + V3dApplication::deactivateMainWindow(); +} + +void NaMainWindow::setV3DDefaultModeCheck(bool checkState) { + QAction* ui_actionV3DDefault = qFindChild(this, "actionV3DDefault"); + ui_actionV3DDefault->setChecked(checkState); +} + +void NaMainWindow::setNeuronAnnotatorModeCheck(bool checkState) { + QAction* ui_actionNeuronAnnotator = qFindChild(this, "actionNeuronAnnotator"); + ui_actionNeuronAnnotator->setChecked(checkState); +} + +void NaMainWindow::on_actionOpen_triggered() { + + QString dirName = QFileDialog::getExistingDirectory(this, + "Select Color Separation Image Directory", + QDir::currentPath(), + QFileDialog::ShowDirsOnly); + + QDir imageDir(dirName); + + std::cout << "Selected directory=" << imageDir.absolutePath().toStdString() << endl; + + if (!closeAnnotationSession()) { + QMessageBox::warning(this, tr("Could not close previous Annotation Session"), + "Error saving previous session and/or clearing memory - please exit application"); + return; + } + + if (!loadAnnotationSessionFromDirectory(imageDir)) { + QMessageBox::warning(this, tr("Could not load image directory"), + "Error loading image directory - please check directory contents"); + return; + } +} + +bool NaMainWindow::loadAnnotationSessionFromDirectory(QDir imageInputDirectory) { + annotationSession = new AnnotationSession(); + + // Need to construct (temporary until backend implemented) MultiColorImageStackNode from this directory + // This code will be redone when the node/filestore is implemented. + QString originalImageStackFilePath = imageInputDirectory.absolutePath() + "/" + MultiColorImageStackNode::IMAGE_STACK_FILENAME; + QFile originalImageStackFile(originalImageStackFilePath); + if (!originalImageStackFile.exists()) { + QMessageBox::warning(this, tr("Could not find expected image stack tif file"), + "Error finding file="+originalImageStackFilePath); + return false; + } + QString maskLabelFilePath = imageInputDirectory.absolutePath() + "/" + MultiColorImageStackNode::IMAGE_MASK_FILENAME; + QFile maskLabelFile(maskLabelFilePath); + if (!maskLabelFile.exists()) { + QMessageBox::warning(this, tr("Could not find expected image stack mask file"), + "Error finding file="+maskLabelFilePath); + return false; + } + QString maskLabelIndexFilePath = imageInputDirectory.absolutePath() + "/" + MultiColorImageStackNode::IMAGE_MASK_INDEX_FILENAME; + QFile maskLabelIndexFile(maskLabelIndexFilePath); + if (!maskLabelIndexFile.exists()) { + QMessageBox::warning(this, tr("Could not find expected image stack mask label index file"), + "Error finding file="+maskLabelIndexFilePath); + return false; + } + + // Create input nodes + MultiColorImageStackNode* multiColorImageStackNode = new MultiColorImageStackNode(); + multiColorImageStackNode->setPathToMulticolorLabelMaskFile(maskLabelFilePath); + multiColorImageStackNode->setPathToMulticolorLabelMasIndexFile(maskLabelIndexFilePath); + multiColorImageStackNode->setPathToOriginalImageStackFile(originalImageStackFilePath); + annotationSession->setMultiColorImageStackNode(multiColorImageStackNode); + + // Create result node + long resultNodeId=TimebasedIdentifierGenerator::getSingleId(); + NeuronAnnotatorResultNode* resultNode = new NeuronAnnotatorResultNode(resultNodeId); + if (!resultNode->ensureDirectoryExists()) { + QMessageBox::warning(this, tr("Could not create NeuronAnnotationResultNode"), + "Error creating directory="+resultNode->getDirectoryPath()); + return false; + } + annotationSession->setNeuronAnnotatorResultNode(resultNode); + + // Load session + if (!annotationSession->loadOriginalImageStack()) { + return false; + } + if (!annotationSession->loadNeuronMaskStack()) { + return false; + } + if (!annotationSession->loadMaskLabelIndexFile()) { + return false; + } + if (!annotationSession->populateMaskMipList()) { + return false; + } + createMaskGallery(); + + // ui.v3dr_glwidget->loadMy4DImage(annotationSession->getOriginalImageStackAsMy4DImage()); + if (! loadMy4DImage(annotationSession->getOriginalImageStackAsMy4DImage(), + annotationSession->getNeuronMaskAsMy4DImage()) ) + return false; + + if (!ui.v3dr_glwidget->populateNeuronMask(annotationSession->getNeuronMaskAsMy4DImage())) { + return false; + } + + ui.v3dr_glwidget->update(); + + // Annotation model update + ui.v3dr_glwidget->setAnnotationSession(annotationSession); + ui.naLargeMIPWidget->setAnnotationSession(annotationSession); + ui.naZStackWidget->setAnnotationSession(annotationSession); + + connect(annotationSession, SIGNAL(modelUpdated(QString)), ui.v3dr_glwidget, SLOT(annotationModelUpdate(QString))); + connect(annotationSession, SIGNAL(modelUpdated(QString)), ui.naLargeMIPWidget, SLOT(annotationModelUpdate(QString))); + connect(annotationSession, SIGNAL(modelUpdated(QString)), ui.naZStackWidget, SLOT(annotationModelUpdate(QString))); + + // Neuron Selector update + neuronSelector = new NeuronSelector(); + + connect(ui.v3dr_glwidget, SIGNAL(neuronSelected(double,double,double)), neuronSelector, SLOT(updateSelectedPosition(double,double,double))); + + neuronSelector->setAnnotationSession(annotationSession); + neuronSelector->init(); + + return true; +} + +bool NaMainWindow::closeAnnotationSession() { + if (annotationSession!=0) { + annotationSession->save(); + delete annotationSession; + } + return true; +} + +void NaMainWindow::on_actionLoad_Tiff_triggered() +{ + static QString tiffDirectory; + QString tiffFileName = QFileDialog::getOpenFileName(this, + "Select 3D TIFF file", + tiffDirectory, + tr("TIFF files (*.tif)")); + if (tiffFileName.isEmpty()) return; + QFile tiffFile(tiffFileName); + if (! tiffFile.exists()) return; + tiffDirectory = tiffFileName; + currentStackImage.loadImage(tiffFileName.toLocal8Bit().data()); + qDebug() << "currentStackImage x=" << currentStackImage.getXDim() << " y=" << currentStackImage.getYDim() << " z=" << currentStackImage.getZDim() + << " c=" << currentStackImage.getCDim() << " d=" << currentStackImage.getDatatype(); + // renderer might not be created yet if 3D widget is not shown yet. + if (! ui.v3dr_glwidget->getRenderer()) + ui.v3dr_glwidget->createRenderer(); + RendererNeuronAnnotator* renderer = (RendererNeuronAnnotator*)ui.v3dr_glwidget->getRenderer(); + assert(renderer); + renderer->setMasklessSetupStackTexture(true); + loadMy4DImage(¤tStackImage); +} + +void NaMainWindow::on_actionCell_Counter_3D_2ch_lsm_triggered() { + static QString lsmDirectory; + QString lsmFileName = QFileDialog::getOpenFileName(this, + "Select 3D 2-channel lsm file", + lsmDirectory, + tr("LSM files (*.lsm)")); + if (lsmFileName.isEmpty()) return; + QFile lsmFile(lsmFileName); + lsmDirectory = lsmFileName; + My4DImage tmpImage; + tmpImage.loadImage(lsmFileName.toLocal8Bit().data()); + CellCounter3D::convertMy4DImage2channelToRGB(tmpImage, currentStackImage); + RendererNeuronAnnotator* renderer = (RendererNeuronAnnotator*)ui.v3dr_glwidget->getRenderer(); + renderer->setMasklessSetupStackTexture(true); + CellCounter3D cellCounter; + cellCounter.setInputFilePath(lsmFileName); + cellCounter.loadMy4DImage(¤tStackImage); + cellCounter.findCells(); + cellCounter.markImage(); + ui.v3dr_glwidget->loadMy4DImage(¤tStackImage); + cellCounter.writeOutputImageFile(); + cellCounter.writeOutputReportFile(); +} + +bool NaMainWindow::loadMy4DImage(const My4DImage * img, const My4DImage * neuronMaskImg) +{ + ui.naLargeMIPWidget->loadMy4DImage(img, neuronMaskImg); + ui.v3dr_glwidget->loadMy4DImage(img, neuronMaskImg); + ui.naZStackWidget->loadMy4DImage(img, neuronMaskImg); + setZRange(1, img->getZDim()); + // Need at least two colors for use of the color buttons to make sense + ui.HDRRed_pushButton->setEnabled(img->getCDim() > 1); + ui.HDRGreen_pushButton->setEnabled(img->getCDim() > 1); + ui.HDRBlue_pushButton->setEnabled(img->getCDim() > 2); + return true; +} + +// local setButtonGamma() method used to support multithreaded version of updateThumbnailGamma() +static volatile double buttonGamma = 1.00; +static GalleryButton* setButtonGamma(GalleryButton* & button) { + button->setGamma(buttonGamma); +} + +void NaMainWindow::updateThumbnailGamma(double gamma) +{ + bool bUseConcurrent = true; + if (bUseConcurrent) { // asynchronous update + buttonGamma = gamma; + QtConcurrent::map(mipGalleryButtonList, setButtonGamma); + } + else { // serial update + foreach(GalleryButton* button, mipGalleryButtonList) { + button->setGamma(gamma); + } + } +} + +void NaMainWindow::createMaskGallery() { + qDebug() << "createMaskGallery() start"; + QList * maskMipList = annotationSession->getMaskMipList(); + + // Step 1: Add background MIP + QFrame* ui_maskFrame = qFindChild(this, "maskFrame"); + QHBoxLayout *managementLayout = new QHBoxLayout(); + ui_maskFrame->setLayout(managementLayout); + + GalleryButton* backgroundButton = new GalleryButton(maskMipList->at(0), "Background", 0); + backgroundButton->setChecked(true); // since full image loaded initially + annotationSession->setNeuronMaskStatus(0, true); + managementLayout->addWidget(backgroundButton); + mipGalleryButtonList.append(backgroundButton); + connect(backgroundButton, SIGNAL(declareChange(int,bool)), annotationSession, SLOT(neuronMaskUpdate(int,bool))); + + // Step 2: Add Neuron-Mask Gallery + QFrame* ui_maskGallery = qFindChild(this, "maskGallery"); + QHBoxLayout *galleryLayout = new QHBoxLayout(); + ui_maskGallery->setLayout(galleryLayout); + for (int i = 1; i < maskMipList->size(); ++i) { + GalleryButton* button = new GalleryButton(maskMipList->at(i), QString("Neuron %1").arg(i), i); + mipGalleryButtonList.append(button); + galleryLayout->addWidget(button); + button->setChecked(true); // start as checked since full image loaded initially + annotationSession->setNeuronMaskStatus(i, true); + connect(button, SIGNAL(declareChange(int,bool)), annotationSession, SLOT(neuronMaskUpdate(int,bool))); + } + + qDebug() << "createMaskGallery() end size=" << maskMipList->size(); +} + + + + + diff --git a/v3d_main/neuron_annotator/NaMainWindow.h b/v3d_main/neuron_annotator/NaMainWindow.h new file mode 100644 index 0000000000..7410de71f1 --- /dev/null +++ b/v3d_main/neuron_annotator/NaMainWindow.h @@ -0,0 +1,103 @@ +#ifndef NAMAINWINDOW_H +#define NAMAINWINDOW_H + +#include +#include +#include +#include +#include "ui_NaMainWindow.h" +#include "AnnotationSession.h" +#include "GalleryButton.h" + +class NutateThread; +class NeuronSelector; + +class NaMainWindow : public QMainWindow +{ + Q_OBJECT + +public: + NaMainWindow(); + void setV3DDefaultModeCheck(bool checkState); + void setNeuronAnnotatorModeCheck(bool checkState); + void handleCoordinatedCloseEvent(QCloseEvent *event); + bool loadAnnotationSessionFromDirectory(QDir imageInputDirectory); + bool closeAnnotationSession(); + bool loadMy4DImage(const My4DImage * img, const My4DImage * neuronMaskImg = NULL); + +public slots: + void on_actionV3DDefault_triggered(); + void on_actionNeuronAnnotator_triggered(); + void on_actionQuit_triggered(); + void on_actionOpen_triggered(); + void on_actionLoad_Tiff_triggered(); + void on_actionCell_Counter_3D_2ch_lsm_triggered(); + + void setZRange(int minZ, int maxZ); // update number of z slices + void unifyCameras(bool bDoUnify); // keep all zoom, focus, rotate the same + void setNutate(bool bDoNutate); + void nutate(const Rotation3D&); + +protected slots: + void updateThumbnailGamma(double gamma); + +protected: + void closeEvent(QCloseEvent *event); + +private: + AnnotationSession* annotationSession; + Ui::NaMainWindow ui; + void createMaskGallery(); + QList mipGalleryButtonList; + My4DImage currentStackImage; + CameraModel sharedCameraModel; // optional camera sharing + NutateThread * nutateThread; + + NeuronSelector* neuronSelector; +}; + +class NutateThread : public QThread +{ + Q_OBJECT + +public: + NutateThread(qreal cyclesPerSecond, QObject * parent = NULL) + : QThread(parent) + , speed(cyclesPerSecond) + , interval(0.200) // update every 200 milliseconds + , currentAngle(0.0) + { + deltaAngle = 2.0 * 3.14159 * cyclesPerSecond * interval; + } + + void run() + { + while(true) { + if (paused) { + sleep(0.5); + continue; + } + // qDebug() << "nutation angle = " << currentAngle; + rot = deltaNutation(currentAngle, deltaAngle); + emit nutate(rot); + currentAngle += deltaAngle; + while (currentAngle > 2.0 * 3.14159) currentAngle -= 2.0 * 3.14159; + msleep( (1000.0 * deltaAngle) / (2.0 * 3.14159 * speed) ); + } + } + void pause() {paused = true;} + void unpause() {paused = false;} + +signals: + void nutate(const Rotation3D&); + +protected: + bool paused; + qreal speed; + qreal currentAngle; + qreal interval; + qreal deltaAngle; + Rotation3D rot; +}; + +#endif // NAMAINWINDOW_H diff --git a/v3d_main/neuron_annotator/NaMainWindow.ui b/v3d_main/neuron_annotator/NaMainWindow.ui new file mode 100644 index 0000000000..b24c425251 --- /dev/null +++ b/v3d_main/neuron_annotator/NaMainWindow.ui @@ -0,0 +1,1330 @@ + + + NaMainWindow + + + + 0 + 0 + 1042 + 819 + + + + V3D NeuronAnnotator + + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + 0 + + + 0 + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + 1 + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + 2 + + + + + 0 + + + + + + + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + + + background-color: rgb(255, 156, 166); + + + + + + + 0 + + + 0 + + + Qt::Horizontal + + + + + + + + + + + + 0 + + + 0 + + + + + + 640 + 480 + + + + background-color: rgb(22, 16, 45); + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + QFrame::StyledPanel + + + + 0 + + + 0 + + + + + 2 + + + + MIP + + + View Maximum Intensity Projection + + + + 0 + + + + + + 0 + 30 + + + + + + + + Qt::Vertical + + + + 20 + 500 + + + + + + + + + Z stack + + + View 3D Z-stack + + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + + + Qt::Vertical + + + + 20 + 190 + + + + + + + + HDR Tool + + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + -1 + + + 0 + + + + + false + + + color: rgb(255, 0, 0); + + + R + + + true + + + true + + + true + + + false + + + false + + + + + + + false + + + color: rgb(0, 128, 0); + + + G + + + true + + + true + + + + + + + false + + + color: rgb(0, 0, 255); + + + B + + + true + + + false + + + true + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + + + Box Size + + + + + + + 1000 + + + 25 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 189 + + + + + + + + Z Slice + + + + 0 + + + + + + 0 + 0 + + + + 0 + + + 0 + + + + + + + + 60 + 0 + + + + of 0 + + + Qt::PlainText + + + Qt::TextSelectableByMouse + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + 3D + + + View 3D volume + + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + 0 + + + + + + 0 + 0 + + + + Colors + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 12 + + + + + r + + + true + + + true + + + + + + + g + + + true + + + true + + + + + + + b + + + true + + + true + + + + + + + R + + + true + + + true + + + + + + + + + + + 0 + 25 + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + -1 + + + + + + Filters + + + + + + + + Restore default color intensities. + + + Reset + + + + + + + + + + + + + + 0 + 0 + + + + + 16777215 + 300 + + + + Rotation + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + + + 360 + + + 15 + + + 45 + + + Qt::Vertical + + + false + + + false + + + true + + + 10.000000000000000 + + + true + + + + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + + + + + 360 + + + 15 + + + 45 + + + Qt::Vertical + + + true + + + 10.000000000000000 + + + true + + + + + + + + 50 + 16777215 + + + + + + + + 360 + + + 15 + + + 45 + + + true + + + 10.000000000000000 + + + true + + + + + + + + 50 + 16777215 + + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + + + Reset + + + + + + + Lock + + + + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + + + + 100 + 100 + + + + + + + + + + + + + + Nutate + + + true + + + + + + + Qt::Vertical + + + + 158 + 83 + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 200 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + 1 + + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 300 + 0 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + 1 + + + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + true + + + + + 0 + 0 + 540 + 198 + + + + + 0 + + + 0 + + + + + QFrame::StyledPanel + + + QFrame::Raised + + + 1 + + + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + QFrame::NoFrame + + + QFrame::Raised + + + 1 + + + + + + + + + 0 + 0 + 1042 + 22 + + + + + File + + + + + + + + + + + Help + + + + + + Edit + + + + + + View + + + + Mode + + + + + + + + + + + + + + + + + + Annotate MultiColor Stack... + + + false + + + + + Log off + + + + + About NeuronAnnotator... + + + QAction::AboutRole + + + + + Quit + + + QAction::QuitRole + + + + + true + + + V3D default + + + + + true + + + Neuron Annotator + + + + + Load 3D TIFF image... + + + + + Load 2D MIP image... + + + + + Cell Counter 3D 2ch lsm... + + + + + Preferences... + + + QAction::PreferencesRole + + + + + V3D default + + + + + Neuron annotator + + + + + true + + + V3D default + + + + + true + + + Neuron Annotator + + + + + true + + + true + + + Link viewers + + + + + true + + + true + + + Show Crosshair + + + + + + Na3DWidget + QWidget +
../neuron_annotator/Na3DWidget.h
+ 1 +
+ + NaZStackWidget + QWidget +
../neuron_annotator/NaZStackWidget.h
+ 1 +
+ + NaLargeMIPWidget + QWidget +
../neuron_annotator/NaLargeMIPWidget.h
+ 1 +
+ + GammaWidget + QWidget +
../neuron_annotator/GammaWidget.h
+ 1 +
+
+ + + + viewerControlTabWidget + currentChanged(int) + viewerStackedWidget + setCurrentIndex(int) + + + 653 + 30 + + + 615 + 25 + + + + + ZSlice_horizontalScrollBar + valueChanged(int) + ZSlice_spinBox + setValue(int) + + + 100 + 52 + + + 668 + 587 + + + + + ZSlice_spinBox + valueChanged(int) + ZSlice_horizontalScrollBar + setValue(int) + + + 680 + 576 + + + 100 + 52 + + + + +
diff --git a/v3d_main/neuron_annotator/NaViewer.cpp b/v3d_main/neuron_annotator/NaViewer.cpp new file mode 100644 index 0000000000..976506c862 --- /dev/null +++ b/v3d_main/neuron_annotator/NaViewer.cpp @@ -0,0 +1,41 @@ +#include "NaViewer.h" + +void NaViewer::synchronizeWithCameraModel(CameraModel* externalCamera) +{ + // Two-way connection for all data members + QObject::connect(&cameraModel, SIGNAL(scaleChanged(qreal)), + externalCamera, SLOT(setScale(qreal))); + QObject::connect(externalCamera, SIGNAL(scaleChanged(qreal)), + &cameraModel, SLOT(setScale(qreal))); + QObject::connect(&cameraModel, SIGNAL(focusChanged(const Vector3D&)), + externalCamera, SLOT(setFocus(const Vector3D&))); + QObject::connect(externalCamera, SIGNAL(focusChanged(const Vector3D&)), + &cameraModel, SLOT(setFocus(const Vector3D&))); + QObject::connect(&cameraModel, SIGNAL(rotationChanged(const Rotation3D&)), + externalCamera, SLOT(setRotation(const Rotation3D&))); + QObject::connect(externalCamera, SIGNAL(rotationChanged(const Rotation3D&)), + &cameraModel, SLOT(setRotation(const Rotation3D&))); +} + +void NaViewer::decoupleCameraModel(CameraModel* externalCamera) +{ + cameraModel.disconnect(externalCamera); + externalCamera->disconnect(&cameraModel); +} + +void NaViewer::setAnnotationSession(AnnotationSession* annotationSession) { + this->annotationSession=annotationSession; +} + +void NaViewer::wheelZoom(double delta) +{ + bMouseIsDragging = false; + double numDegrees = delta/8.0; + double numTicks = numDegrees/15.0; + if (numTicks == 0) return; + // Though internet map services generally zoom IN when scrolling UP, + // 3D viewers generally zoom OUT when scrolling UP. So we zoom out. + double factor = std::pow(1.10, -numTicks); + cameraModel.setScale(cameraModel.scale() * factor); +} + diff --git a/v3d_main/neuron_annotator/NaViewer.h b/v3d_main/neuron_annotator/NaViewer.h new file mode 100644 index 0000000000..36385ef277 --- /dev/null +++ b/v3d_main/neuron_annotator/NaViewer.h @@ -0,0 +1,45 @@ +#ifndef NAVIEWER_H +#define NAVIEWER_H + +#include "../v3d/v3d_core.h" +#include "CameraModel.h" +#include +#include "AnnotationSession.h" + +// Base class for 3DViewer, ZStack viewer, and MIP viewer. +// Do not attempt to derive this class from QObject; such folly will create a troublesome diamond pattern in the 3D viewer. +class NaViewer +{ +public: + NaViewer() : bMouseIsDragging(false), defaultScale(1.0), bPaintCrosshair(true) {} + virtual ~NaViewer() {} + // TODO replace loadMy4DImage() method with observer relationship to a lighter interface + virtual bool loadMy4DImage(const My4DImage* my4DImage, const My4DImage* neuronMaskImage = NULL) = 0; + // Methods to support optional linking of zoom, focus, and rotation between viewers + virtual void synchronizeWithCameraModel(CameraModel* externalCamera); + virtual void decoupleCameraModel(CameraModel* externalCamera); + void setAnnotationSession(AnnotationSession* annotationSession); + bool mouseIsDragging() const {return bMouseIsDragging;} + virtual void showCrosshair(bool b) {bPaintCrosshair = b;} + +public slots: + virtual void annotationModelUpdate(QString updateType) = 0; + +public: + // Each viewer has an internal CameraModel that can optionally be synchronized with an external CameraModel + CameraModel cameraModel; + +protected: + // Helper method for consistent zooming with mouse wheel + // Zoom using mouse wheel + virtual void wheelZoom(double delta); + + bool bMouseIsDragging; + int oldDragX; + int oldDragY; + float defaultScale; // view-pixels per image-voxel to exactly fill window + AnnotationSession* annotationSession; + bool bPaintCrosshair; +}; + +#endif // NAVIEWER_H diff --git a/v3d_main/neuron_annotator/NaZStackWidget.cpp b/v3d_main/neuron_annotator/NaZStackWidget.cpp new file mode 100644 index 0000000000..8312060f30 --- /dev/null +++ b/v3d_main/neuron_annotator/NaZStackWidget.cpp @@ -0,0 +1,889 @@ +#include "NaZStackWidget.h" +#include +#include +#include +#include + +#define INF 1e9 + +// funcs for converting data and create pixmap +// func converting kernel +template +void converting(Tpre *pre1d, Tpost *pPost, V3DLONG imsz) { + for(V3DLONG i=0; i QPixmap getXYPlane(const T * pdata, V3DLONG sx, V3DLONG sy, V3DLONG sz, V3DLONG sc, V3DLONG curz, float *p_vmax, float *p_vmin) +{ + QImage tmpimg = QImage(sx, sy, QImage::Format_RGB32); + + // qDebug()<=3) + { + tmpb = p_vmax[2]-p_vmin[2]; tmpb = (tmpb==0)?1:tmpb; + tmpb_min = p_vmin[2]; + } + + if (sc>=2) + { + tmpg = p_vmax[1]-p_vmin[1]; tmpg = (tmpg==0)?1:tmpg; + tmpg_min = p_vmin[1]; + } + + if (sc>=1) + { + tmpr = p_vmax[0]-p_vmin[0]; tmpr = (tmpr==0)?1:tmpr; + tmpr_min = p_vmin[0]; + } + int pagesz = sx*sy*sz; + long offset_k = sx*sy; + + switch (sc) + { + case 1: + + // qDebug()<<"r ..."; + + for (long j = 0; j < sy; j ++) + { + long offset = curz*offset_k + j*sx; + for (long i=0; isetPen(Qt::yellow ); + painter->setBrush(Qt::NoBrush); + + if(b_mousemove) + { + if(b_mouseright) + { + QRect r( startMousePosR, curMousePosR ); + painter->drawRect( r ); + } + else if(b_mouseleft) + { + if(bMouseDone) + { + QSizeF sz(2*cr, 2*cr); + QRectF square = rectangle_around(m_square_pos, sz); + painter->drawRect(square); + } + } + } + else if(bMouseDone) + { + QSizeF sz(2*cr, 2*cr); + QRectF square = rectangle_around(m_square_pos,sz); + painter->drawRect(square); + } + + if( checkROIchanged() ) + { + do_HDRfilter(); + } + } + else + { + // qDebug()<<"initial a square roi ..."; + + // init a square + cx = sx/2; + cy = sy/2; + cr = 25; + + start_x = cx - cr; + end_x = cx + cr; + + if(start_x<0) start_x = 0; + if(end_x>=sx) end_x = sx-1; + + start_y = cy -cr; + end_y = cy + cr; + + if(start_y<0) start_y = 0; + if(end_y>=sy) end_y = sy-1; + + startMousePos.setX(start_x); + startMousePos.setY(start_y); + + endMousePos.setX(end_x); + endMousePos.setY(end_y); + + QSizeF sz(cr, cr); + QRectF square = rectangle_around(m_square_pos,sz); + painter->drawRect(square); + } + +} + +void NaZStackWidget::enterEvent (QEvent * e) // mouse found +{ + bMouseCurorIn = true; + update(); +} + +void NaZStackWidget::mouseLeftButtonPressEvent(QMouseEvent *e) // mouse left button +{ + if (bMouseCurorIn) + { + //if(cursorInRoi(e)) + { + b_mouseleft = true; + b_mouseright = false; + b_mousemove = false; + bMouseDone = true; + + startMousePosL = e->pos(); + + startMousePosL = viewportXYToImageXY(startMousePosL); + + QRectF square = rectangle_around(m_square_pos); + + if (square.contains(startMousePosL)) + { + m_offset = square.center() - startMousePosL; + } + + // qDebug()<<"left press ..."<< startMousePosL.x() << startMousePosL.y(); + + setCursor(Qt::CrossCursor); + update(); + } + } +} + +void NaZStackWidget::mouseRightButtonPressEvent(QMouseEvent *e) // mouse right button +{ + if (bMouseCurorIn) + { + b_mouseright = true; + b_mouseleft = false; + b_mousemove = false; + bMouseDone = false; + + startMousePosR = e->pos(); // + + startMousePosR = viewportXYToImageXY(startMousePosR); + // startMousePosR.setX( startMousePosR.x()/scale_x ); + // startMousePosR.setY( startMousePosR.y()/scale_y ); + + // qDebug()<<"right press ..."<< startMousePosR.x() << startMousePosR.y(); + + setCursor(Qt::CrossCursor); + update(); + } +} + +int NaZStackWidget::getCurrentZSlice() { + return cur_z + 1; // 1-based index for API; 0-based internal +} + +int NaZStackWidget::getCurrentBoxSize() { + return cr; // +} + +void NaZStackWidget::setCurrentZSlice(int slice) { + if (slice < 1) return; // value too small + if (slice > sz) return; // value too big + if (cur_z == slice - 1) return; // no change; ignore + cur_z = slice - 1; + do_HDRfilter(); + do_HDRfilter_zslice(); + update(); + // qDebug("Z slice updated"); + emit curZsliceChanged(slice); +} + +void NaZStackWidget::wheelEvent(QWheelEvent * e) // mouse wheel +{ + // qDebug("wheel"); + b_mousemove = false; + + int numDegrees = e->delta()/8; + int numTicks = numDegrees/15; + // Some mouse wheels have a finer scroll increment; at least move a bit. + if ((e->delta() != 0) && (numTicks == 0)) + numTicks = e->delta() > 0 ? 1 : -1; + // qDebug() << "number of ticks = " << numTicks; + + setCurrentZSlice(getCurrentZSlice() + numTicks); +} + +void NaZStackWidget::mouseMoveEvent (QMouseEvent * e) // mouse move +{ + if (bMouseCurorIn) + { + b_mousemove = true; + + if(b_mouseright) + { + bMouseDone = false; + + curMousePosR = e->pos(); + curMousePosR = viewportXYToImageXY(curMousePosR); + + if (curMousePosR.x() < 0) + { + curMousePosR.setX(0); + } + else if (curMousePosR.x() > sx) + { + curMousePosR.setX(sx); + } + + if (curMousePosR.y()<0) + { + curMousePosR.setY(0); + } + else if (curMousePosR.y() > sy) + { + curMousePosR.setY(sy); + } + + // curMousePosR.setX( curMousePosR.x()/scale_x ); + // curMousePosR.setY( curMousePosR.y()/scale_y ); + + // qDebug()<<"right press move ..."<< curMousePosR.x() << curMousePosR.y(); + } + + if(b_mouseleft) + { + bMouseDone = true; + + curMousePosL = e->pos(); + curMousePosL = viewportXYToImageXY(curMousePosL); + + if (curMousePosL.x() < 0) + { + curMousePosL.setX(0); + } + else if (curMousePosL.x() > sx) + { + curMousePosL.setX(sx); + } + + if (curMousePosL.y()<0) + { + curMousePosL.setY(0); + } + else if (curMousePosL.y() > sy) + { + curMousePosL.setY(sy); + } + + // curMousePosL.setX( curMousePosL.x()/scale_x ); + // curMousePosL.setY( curMousePosL.y()/scale_y ); + + setSquarePos(curMousePosL + m_offset); + } + + } + update(); +} + +void NaZStackWidget::mousePressEvent(QMouseEvent *e) // mouse button press +{ + switch (e->button()) + { + case Qt::LeftButton: + mouseLeftButtonPressEvent(e); + break; + case Qt::RightButton: + mouseRightButtonPressEvent(e); + default: + break; + } +} + +void NaZStackWidget::mouseReleaseEvent(QMouseEvent * e) // mouse button release +{ + b_mousemove = false; + + if (bMouseCurorIn) + { + if(b_mouseright) + { + endMousePosR = e->pos(); + endMousePosR = viewportXYToImageXY(endMousePosR); + setCursor(Qt::ArrowCursor); + + if (endMousePosR.x() < 0) + { + endMousePosR.setX(0); + } + else if (endMousePosR.x() > sx) + { + endMousePosR.setX(sx); + } + + if (endMousePosR.y()<0) + { + endMousePosR.setY(0); + } + else if (endMousePosR.y() > sy) + { + endMousePosR.setY(sy); + } + + // endMousePosR.setX( endMousePosR.x()/scale_x ); + // endMousePosR.setY( endMousePosR.y()/scale_y ); + + // qDebug()<<"right release ..."<< endMousePosR.x() << endMousePosR.y(); + + // adjust pos + float top_x, top_y, bottom_x, bottom_y; + + top_x = qMin( startMousePosR.x(), endMousePosR.x() ); + top_y = qMin( startMousePosR.y(), endMousePosR.y() ); + + bottom_x = qMax( startMousePosR.x(), endMousePosR.x() ); + bottom_y = qMax( startMousePosR.y(), endMousePosR.y() ); + + startMousePos.setX( top_x ); + startMousePos.setY( top_y ); + + endMousePos.setX( bottom_x ); + endMousePos.setY( bottom_y ); + + m_square_pos.setX( startMousePos.x() + (endMousePos.x() - startMousePos.x())/2 ); + m_square_pos.setY( startMousePos.y() + (endMousePos.y() - startMousePos.y())/2 ); + + int old_cr = cr; + cr = qMax((endMousePos.x() - startMousePos.x())/2, (endMousePos.y() - startMousePos.y())/2); + + bMouseDone = true; + + // qDebug()<<"x, y ..."<sx) bottom_x = sx; + if(bottom_y>sy) bottom_y = sy; + + startMousePos.setX( top_x ); + startMousePos.setY( top_y ); + + endMousePos.setX( bottom_x ); + endMousePos.setY( bottom_y ); + +} + +QRectF NaZStackWidget::rectangle_around(const QPointF &p, const QSizeF &size) +{ + QRectF rect(p, size); + rect.translate(-size.width()/2, -size.height()/2); + return rect; +} + +// +bool NaZStackWidget::checkROIchanged() +{ + bool flag = false; + + if(start_x != startMousePos.x()-1) + { + start_x = startMousePos.x()-1; + flag = true; + } + + if(end_x != endMousePos.x()-1) + { + end_x = endMousePos.x()-1; + flag = true; + } + + if(start_y != startMousePos.y()-1) + { + start_y = startMousePos.y()-1; + flag = true; + } + + if(end_y != endMousePos.y()-1) + { + end_y = endMousePos.y()-1; + flag = true; + } + + // + return flag; +} + +// HDR filter +void NaZStackWidget::do_HDRfilter() +{ + // widget might not be initialized + if (cur_c < 1) return; + if (cur_c > 3) return; + if (!pData1d) return; + + start_x = startMousePos.x()-1; + end_x = endMousePos.x()-1; + + start_y = startMousePos.y()-1; + end_y = endMousePos.y()-1; + + V3DLONG tmpsum = start_x + end_x; + start_x = start_x<=end_x?start_x:end_x; + end_x = tmpsum - start_x; + + tmpsum = start_y + end_y; + start_y = start_y<=end_y?start_y:end_y; + end_y = tmpsum - start_y; + + if(start_x<0) start_x = 0; + if(start_y<0) start_y = 0; + + if(end_x>sx) end_x = sx-1; + if(end_y>sy) end_y = sy-1; + + V3DLONG pagesz = sx*sy*sz; + + // min_max + V3DLONG c = cur_c-1; + + min_roi[c] = INF; + max_roi[c] = -INF; + + V3DLONG offset_c = c*pagesz; + + V3DLONG offset_z = cur_z * sx * sy; // current slice + + for(V3DLONG j=start_y; jcurval) min_roi[c] = curval; + if(max_roi[c]max_roi[c]) + { + pDispData1d[idx] = max_roi[c]; + } + else + { + pDispData1d[idx] = curval; + } + } + +} + +// copy data +void NaZStackWidget::copydata2disp() +{ + V3DLONG c = cur_c - 1; + + V3DLONG pagesz = sx*sy*sz; + + for(V3DLONG ic = 0; icgetXDim(), img->getYDim(), img->getZDim(), img->getCDim()}; + initHDRViewer(imageSize, img->getRawData(), img->getDatatype()); + // dispheight = sx; + // dispwidth = sy; + return true; +} + +void NaZStackWidget::initHDRViewer(const V3DLONG *imgsz, const unsigned char *data1d, ImagePixelType datatype) +{ + sx = imgsz[0]; + sy = imgsz[1]; + sz = imgsz[2]; + sc = imgsz[3]; + + ratio_x2y = (float)sx/(float)sy; + + cur_z = sz/2; // init here + + V3DLONG pagesz = sx*sy*sz; + V3DLONG imagesz = pagesz*sc; + + try + { + float *pFloatData = new float [imagesz]; + pDispData1d = new float [imagesz]; + + // + // qDebug()<<"run HDR filtering ..."; + + if(datatype == V3D_UINT8) + { + converting((unsigned char *)data1d, pFloatData, imagesz); + + // if(data1d) {delete []data1d; data1d = NULL;} + + pData1d = pFloatData; // keep original data in float datatype + + converting(pData1d, pDispData1d, imagesz); // copy data + + // min_max + for (V3DLONG c=0; cpFloatData[i+offset_c]) min_img[c] = pFloatData[i+offset_c]; + if(max_img[c]((unsigned short *)data1d, pFloatData, imagesz); + + // if(data1d) {delete []data1d; data1d = NULL;} + + pData1d = pFloatData; // keep original data in float datatype + + converting(pData1d, pDispData1d, imagesz); // copy data + + // min_max + for (V3DLONG c=0; cpFloatData[i+offset_c]) min_img[c] = pFloatData[i+offset_c]; + if(max_img[c]((float *)data1d, pFloatData, imagesz); + + // if(data1d) {delete []data1d; data1d = NULL;} + } + + } + catch(...) + { + printf("Error allocating memory. \n"); + } +} + +void NaZStackWidget::setColorChannel(NaZStackWidget::Color col) +{ + // Ensure there are enough channels to support this color + if ( (int)col > sc ) + return; // outside of range of available color channels + cur_c = col; + copydata2disp(); + emit curColorChannelChanged(col); + update(); +} + +void NaZStackWidget::setRedChannel() { + setColorChannel(COLOR_RED); +} + +void NaZStackWidget::setGreenChannel() { + setColorChannel(COLOR_GREEN); +} + +void NaZStackWidget::setBlueChannel() { + setColorChannel(COLOR_BLUE); +} + +void NaZStackWidget::updateROIsize(int boxSize) +{ + if (cr == boxSize) return; // no change => ignore + cr = boxSize; + update(); + // repaint(); + emit boxSizeChanged(boxSize); +} + +void NaZStackWidget::annotationModelUpdate(QString updateType) { + // Stub +} diff --git a/v3d_main/neuron_annotator/NaZStackWidget.h b/v3d_main/neuron_annotator/NaZStackWidget.h new file mode 100644 index 0000000000..697bf05560 --- /dev/null +++ b/v3d_main/neuron_annotator/NaZStackWidget.h @@ -0,0 +1,152 @@ +#ifndef NA_ZSTACK_WIDGET_H +#define NA_ZSTACK_WIDGET_H + +#include +#include +#include +class QPaintEvent; +class QPainter; +class QEvent; +class QPointF; +class QSizeF; +class QRectF; + +#include "../basic_c_fun/v3d_basicdatatype.h" +#include "../basic_c_fun/basic_4dimage.h" +#include "../v3d/v3d_core.h" +#include "NaViewer.h" + +// NaZStackWidget is a viewer for successive slices of a 3D volume. +// NaZStackWidget is based on HDRViewer class created by Yang Yu, +// refactored to be a standalone class for use in Neuron Annotator. +// NOTE - It does not work yet, as of April 25, 2011 - CMB + +class NaZStackWidget : public QWidget, public NaViewer +{ + Q_OBJECT + +public: + enum Color { + COLOR_RED = 1, + COLOR_GREEN = 2, + COLOR_BLUE = 3 + }; + + NaZStackWidget(QWidget* parent); + virtual ~NaZStackWidget(); + void paintEvent(QPaintEvent *event); + // ROI controller functions + void drawROI(QPainter *painter); + + void enterEvent (QEvent * e); // mouse found + void mouseLeftButtonPressEvent(QMouseEvent *e); + void mouseRightButtonPressEvent(QMouseEvent *e); + void wheelEvent(QWheelEvent * e); // mouse wheel + void mouseMoveEvent (QMouseEvent * e); // mouse move + void mousePressEvent(QMouseEvent *e); // mouse button press + void mouseReleaseEvent(QMouseEvent * e); // mouse button release + + void setSquarePos(const QPointF &pos); + QRectF rectangle_around(const QPointF &p, const QSizeF &size = QSize(25, 25)); + bool checkROIchanged(); + // Load image data from an in-memory image + bool loadMy4DImage(const My4DImage* my4DImage, const My4DImage* neuronMaskImage = NULL); + int getCurrentZSlice(); // 1-based slice index + int getCurrentBoxSize(); + + // Convert between image data coordinates and screen coordinates. + // * scale by scale_x, scale_y + // * translate so image_focus_[xy] is in center of viewport + // * shift by one pixel so image[0,0] maps to viewport[1,1] + QPointF viewportXYToImageXY(float vx, float vy) + { + float ix = (vx - width()/2.0 - 1) / scale_x + image_focus_x; + float iy = (vy - height()/2.0 - 1) / scale_y + image_focus_y; + // float ix = (vx - 1) / scale_x; + // float iy = (vy - 1) / scale_y; + return QPointF(ix, iy); + } + QPoint viewportXYToImageXY(const QPoint& vp) + { + QPointF ipf = viewportXYToImageXY(vp.x(), vp.y()); + return QPoint(int(ipf.x()), int(ipf.y())); + } + QPointF imageXYToViewportXY(float ix, float iy) { + float vx = (ix - image_focus_x) * scale_x + width()/2.0 + 1; + float vy = (iy - image_focus_y) * scale_y + height()/2.0 + 1; + // float vx = (ix) * scale_x + 1; + // float vy = (iy) * scale_y + 1; + return QPointF(vx, vy); + } + +public slots: + void do_HDRfilter(); + void do_HDRfilter_zslice(); + void copydata2disp(); + void updatePixmap(); + void setRedChannel(); + void setGreenChannel(); + void setBlueChannel(); + void setCurrentZSlice(int sliceNum); + void updateROIsize(int boxSize); + void annotationModelUpdate(QString updateType); + +signals: + void roiChanged(); + void curZsliceChanged(int); + void curColorChannelChanged(NaZStackWidget::Color); + void boxSizeChanged(int boxSize); + +public: + V3DLONG sx, sy, sz, sc; + +protected: + void initHDRViewer(const V3DLONG *imgsz, const unsigned char *data1d, ImagePixelType datatype); + void setColorChannel(NaZStackWidget::Color col); + + V3DLONG roi_top, roi_left, roi_bottom, roi_right; // ROI boundary of the search box + float roi_min, roi_max; // local min and max in the search box + + // mouse events handler + bool b_mouseleft, b_mouseright; + bool b_mousemove; + + bool bMouseCurorIn, bMouseDone; + + QPoint startMousePosL, curMousePosL, startMousePosR, curMousePosR; + QPoint endMousePosL, endMousePosR; + QPoint startMousePos, endMousePos; + int translateMouse_x, translateMouse_y; + float translateMouse_scale; + + QPointF m_square_pos; + QPointF m_offset; + + // disp geometry + // int dispwidth, dispheight; + // float dispscale; + + V3DLONG cx, cy, cz, cc, cr; + V3DLONG cur_x, cur_y, cur_z, cur_c; + + float *pDispData1d; // display + float *pData1d; // ori + + QPixmap pixmap; + + float min_img[5], max_img[5], scale_img[5]; // assume max color channel is 3 + + // roi + float min_roi[5], max_roi[5], scale_roi[5]; // + V3DLONG start_x, end_x, start_y, end_y; + + // gui + float ratio_x2y; // x/y + // parameters for mapping screen coordinates to image coordinates + // scale is viewport pixels per image voxel + float scale_x, scale_y; // assume scale_x = scale_y, i.e. keep the ratio x to y + // image coordinates of image point in center of viewport + float image_focus_x, image_focus_y; +}; + +#endif // NA_ZSTACK_WIDGET_H diff --git a/v3d_main/neuron_annotator/NeuronAnnotatorResultNode.cpp b/v3d_main/neuron_annotator/NeuronAnnotatorResultNode.cpp new file mode 100644 index 0000000000..a31399557c --- /dev/null +++ b/v3d_main/neuron_annotator/NeuronAnnotatorResultNode.cpp @@ -0,0 +1,41 @@ +#include "NeuronAnnotatorResultNode.h" +#include +#include +#include + +NeuronAnnotatorResultNode::NeuronAnnotatorResultNode(long objectId) +{ + this->objectId=objectId; +} + +bool NeuronAnnotatorResultNode::ensureDirectoryExists() { + QString path = getDirectoryPath(); + QDir dir(path); + return dir.mkpath(path); +} + +QDir NeuronAnnotatorResultNode::getUserNeuronAnnotatorHomeDir() { + QDir homeDir = QDir::home(); + QString neuronAnnotatorHomeDirPath = homeDir.absolutePath(); + neuronAnnotatorHomeDirPath.append("/"); + neuronAnnotatorHomeDirPath.append("NeuronAnnotator"); + QDir neuronAnnotatorHomeDir(neuronAnnotatorHomeDirPath); + return neuronAnnotatorHomeDir; +} + +QString NeuronAnnotatorResultNode::getDirectoryPath() { + if (directoryPath.isNull() || directoryPath.isEmpty()) { + QDir homeDir = getUserNeuronAnnotatorHomeDir(); + directoryPath = homeDir.absolutePath(); + directoryPath.append("/"); + directoryPath.append("NeuronAnnotatorResultNode"); + directoryPath.append("/"); + QString objectIdString = QString("%1").arg(objectId); + directoryPath.append(objectIdString); + } + return directoryPath; +} + + + + diff --git a/v3d_main/neuron_annotator/NeuronAnnotatorResultNode.h b/v3d_main/neuron_annotator/NeuronAnnotatorResultNode.h new file mode 100644 index 0000000000..3547bdd029 --- /dev/null +++ b/v3d_main/neuron_annotator/NeuronAnnotatorResultNode.h @@ -0,0 +1,22 @@ +#ifndef NEURONANNOTATORRESULTNODE_H +#define NEURONANNOTATORRESULTNODE_H + +#include +#include + +class NeuronAnnotatorResultNode +{ +public: + NeuronAnnotatorResultNode(long objectId); + long getObjectId() { return objectId; } + bool ensureDirectoryExists(); + QString getDirectoryPath(); + QDir getUserNeuronAnnotatorHomeDir(); + + +private: + long objectId; + QString directoryPath; +}; + +#endif // NEURONANNOTATORRESULTNODE_H diff --git a/v3d_main/neuron_annotator/NeuronMaskEntry.cpp b/v3d_main/neuron_annotator/NeuronMaskEntry.cpp new file mode 100644 index 0000000000..a43258663e --- /dev/null +++ b/v3d_main/neuron_annotator/NeuronMaskEntry.cpp @@ -0,0 +1,44 @@ +#include +#include "NeuronMaskEntry.h" +#include + +using namespace std; + +NeuronMaskEntry::NeuronMaskEntry() +{ +} + +bool NeuronMaskEntry::populateFromString(QString fromString) { + QRegExp regexp("(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\S.+\\S)"); + int matchPosition = regexp.indexIn(fromString); + if (matchPosition<0) { + cerr << "NeuronMaskEntry::populateFromString() : warning: could not construct NeuronMaskEntry from string=" << fromString.toStdString() << endl; + return false; + } + labelIndex=regexp.cap(1).toInt(); + segmentIndex=regexp.cap(2).toInt(); + neuronIndex=regexp.cap(3).toInt(); + filePath=regexp.cap(4); + return true; +} + +QString NeuronMaskEntry::toString() { + QString toString = QString("%1 %2 %3 %4").arg(labelIndex).arg(segmentIndex).arg(neuronIndex).arg(filePath); + return toString; +} + +bool NeuronMaskEntry::operator< (const NeuronMaskEntry &other) const { + if (labelIndex < other.labelIndex) { + return true; + } else if (labelIndex == other.labelIndex) { + if (segmentIndex < other.segmentIndex) { + return true; + } else if (segmentIndex == other.segmentIndex) { + if (neuronIndex < other.neuronIndex) { + return true; + } + } + } + return false; +} + diff --git a/v3d_main/neuron_annotator/NeuronMaskEntry.h b/v3d_main/neuron_annotator/NeuronMaskEntry.h new file mode 100644 index 0000000000..53d985e12f --- /dev/null +++ b/v3d_main/neuron_annotator/NeuronMaskEntry.h @@ -0,0 +1,26 @@ +#ifndef NEURONMASKENTRY_H +#define NEURONMASKENTRY_H + +#include + +class NeuronMaskEntry +{ +public: + NeuronMaskEntry(); + QString toString(); + bool populateFromString(QString fromString); + + int getLabelIndex() { return labelIndex; } + int getSegmentIndex() { return segmentIndex; } + int getNeuronIndex() { return neuronIndex; } + QString getFilePath() { return filePath; } + bool operator< (const NeuronMaskEntry &other) const; + +private: + int labelIndex; + int segmentIndex; + int neuronIndex; + QString filePath; +}; + +#endif // NEURONMASKENTRY_H diff --git a/v3d_main/neuron_annotator/NeuronSelector.cpp b/v3d_main/neuron_annotator/NeuronSelector.cpp new file mode 100644 index 0000000000..063a6cc844 --- /dev/null +++ b/v3d_main/neuron_annotator/NeuronSelector.cpp @@ -0,0 +1,278 @@ +#include "NeuronSelector.h" +#include +#include + +#include "../3drenderer/renderer_tex2.h" +#include "../3drenderer/v3dr_glwidget.h" + +using namespace std; + +// mouse left click to select neuron +XYZ Renderer_tex2::selectPosition(int x, int y) +{ + // _appendMarkerPos + MarkerPos pos; + pos.x = x; + pos.y = y; + for (int i=0; i<4; i++) + pos.view[i] = viewport[i]; + for (int i=0; i<16; i++) + { + pos.P[i] = projectionMatrix[i]; + pos.MV[i] = markerViewMatrix[i]; + } + + // getCenterOfMarkerPos + XYZ P1, P2; + + //_MarkerPos_to_NearFarPoint + Matrix P(4,4); P << pos.P; P = P.t(); // OpenGL is row-inner / C is column-inner + Matrix M(4,4); M << pos.MV; M = M.t(); + Matrix PM = P * M; + + double xd = (pos.x - pos.view[0])*2.0/pos.view[2] -1; + double yd = (pos.view[3]-pos.y - pos.view[1])*2.0/pos.view[3] -1; // OpenGL is bottom to top + //double z = 0,1; // the clip space depth from 0 to 1 + + ColumnVector pZ0(4); pZ0 << xd << yd << 0 << 1; + ColumnVector pZ1(4); pZ1 << xd << yd << 1 << 1; + if (bOrthoView) + { + pZ0(3) = -1; //100913 + } + ColumnVector Z0 = PM.i() * pZ0; //cout << "Z0 \n" << Z0 << endl; + ColumnVector Z1 = PM.i() * pZ1; //cout << "Z1 \n" << Z1 << endl; + Z0 = Z0 / Z0(4); + Z1 = Z1 / Z1(4); + + P1 = XYZ(Z0(1), Z0(2), Z0(3)); + P2 = XYZ(Z1(1), Z1(2), Z1(3)); + + // getCenterOfLineProfile + XYZ loc = (P1+P2)*.5; + + // + int chno; + + V3dR_GLWidget* w = (V3dR_GLWidget*)widget; + My4DImage* curImg = 0; + + if (w) + { + curImg = v3dr_getImage4d(_idep); + //when chno<0, then need to recheck the current chno + if (chno<0 || chno>dim4) chno = w->getNumKeyHolding()-1; + if (chno<0 || chno>dim4) chno = curChannel; //100802 RZC: default channel set by user + } + + double clipplane[4] = { 0.0, 0.0, -1.0, 0 }; + // [0, 1] ==> [+1, -1]*(s) + clipplane[3] = viewClip; + ViewPlaneToModel(markerViewMatrix, clipplane); + + if (curImg && data4dp && chno>=0 && chnogetDatatype()) + { + case V3D_UINT8: + vp = data4dp + (chno + volTimePoint*dim4)*(dim3*dim2*dim1); + break; + case V3D_UINT16: + vp = data4dp + (chno + volTimePoint*dim4)*(dim3*dim2*dim1)*sizeof(short int); + break; + case V3D_FLOAT32: + vp = data4dp + (chno + volTimePoint*dim4)*(dim3*dim2*dim1)*sizeof(float); + break; + default: + v3d_msg("Unsupported data type found. You should never see this.", 0); + return loc; + } + + for (int i=0; i<200; i++) // iteration, (2-f)^200 is big enough + { + double length = norm(P2-P1); + if (length < 0.5) // pixel + break; ////////////////////////////////// + + int nstep = int(length + 0.5); + double step = length/nstep; + + XYZ sumloc(0,0,0); + float sum = 0; + for (int i=0; i<=nstep; i++) + { + XYZ P = P1 + D*step*(i); + float value; + switch (curImg->getDatatype()) + { + case V3D_UINT8: + value = sampling3dAllTypesatBounding( vp, dim1, dim2, dim3, P.x, P.y, P.z, dataViewProcBox.box, clipplane); + break; + case V3D_UINT16: + value = sampling3dAllTypesatBounding( (short int *)vp, dim1, dim2, dim3, P.x, P.y, P.z, dataViewProcBox.box, clipplane); + break; + case V3D_FLOAT32: + value = sampling3dAllTypesatBounding( (float *)vp, dim1, dim2, dim3, P.x, P.y, P.z, dataViewProcBox.box, clipplane); + break; + default: + v3d_msg("Unsupported data type found. You should never see this.", 0); + return loc; + } + + sumloc = sumloc + P*(value); + sum = sum + value; + } + + if (sum) + loc = sumloc / sum; + else + break; ////////////////////////////////// + + P1 = loc - D*(length*f/2); + P2 = loc + D*(length*f/2); + } + } + + qDebug()<<"0-based pos ... "<getMaskStatusList().size(); + +// annotationSession->getNeuronSelectList().clear(); + +// bool neuronSelected = false; + +// for(int i=0; igetNeuronSelectList())->append(neuronSelected); +// qDebug()<<"append size ..."<getNeuronSelectList().size()<getNeuronSelectList().size()<getNeuronSelectList().at(index) == true) + { + annotationSession->getNeuronSelectList().replace(index, false); + } + else + { + annotationSession->getNeuronSelectList().replace(index, true); + } +} + +// get the index of selected neuron +int NeuronSelector::getIndexSetectedNeuron() +{ + // find in mask stack + V3DLONG sx = annotationSession->getNeuronMaskAsMy4DImage()->getXDim(); + V3DLONG sy = annotationSession->getNeuronMaskAsMy4DImage()->getYDim(); + V3DLONG sz = annotationSession->getNeuronMaskAsMy4DImage()->getZDim(); + + // sum of pixels of each neuron mask in the cube + int *sum = NULL; + + int numNeuron = annotationSession->getMaskStatusList().size(); + + qDebug()<<"how many neurons ... "<sx) xe = sx-1; + V3DLONG yb = ylc-NB; if(yb<0) yb = 0; + V3DLONG ye = ylc+NB; if(ye>sy) ye = sy-1; + V3DLONG zb = zlc-NB; if(zb<0) zb = 0; + V3DLONG ze = zlc+NB; if(ze>sz) ze = sz-1; + + for(V3DLONG k=zb; k<=ze; k++) + { + V3DLONG offset_k = k*sx*sy; + for(V3DLONG j=yb; j<=ye; j++) + { + V3DLONG offset_j = offset_k + j*sx; + for(V3DLONG i=xb; i<=xe; i++) + { + V3DLONG idx = offset_j + i; + + int cur_idx = annotationSession->getNeuronMaskAsMy4DImage()->getRawData()[idx]; // value of mask stack + + if(cur_idx>0 && annotationSession->getMaskStatusList().at(cur_idx)) + { + sum[cur_idx]++; + } + } + } + } + + // + index = 0; + for(V3DLONG i=1; i0 && sum[i]>sum[index]) + { + index = i; + } + } + + // de-alloc + if(sum) {delete []sum; sum = NULL;} + + // + qDebug()<<"index ..."<annotationSession=annotationSession; +} + +// +void NeuronSelector::updateSelectedPosition(double x, double y, double z) { + xlc = x + 0.5; + ylc = y + 0.5; + zlc = z + 0.5; + + qDebug()<<"test signal/slot passing parameters ..."< +#include "AnnotationSession.h" + +// cube of NB by NB by NB +#define NB 3 + +class NeuronSelector : public QObject +{ + + Q_OBJECT + +public: + NeuronSelector(){} + ~NeuronSelector(){} + +public: + void switchSelectedNeuron(int index); + int getIndexSetectedNeuron(); // find nearest neuron + + void setAnnotationSession(AnnotationSession* annotationSession); + + void init(); + + void highlightSelectedNeuron(); + +public slots: + void updateSelectedPosition(double x, double y, double z); + +private: + int index; + + V3DLONG xlc, ylc, zlc; // current mouse left click location in 3D + + AnnotationSession* annotationSession; + +}; + +#endif // NEURONSELECTOR_H diff --git a/v3d_main/neuron_annotator/RendererNeuronAnnotator.cpp b/v3d_main/neuron_annotator/RendererNeuronAnnotator.cpp new file mode 100644 index 0000000000..5c17e11ba3 --- /dev/null +++ b/v3d_main/neuron_annotator/RendererNeuronAnnotator.cpp @@ -0,0 +1,559 @@ +#include "../3drenderer/Renderer_gl2.h" +#include "RendererNeuronAnnotator.h" + +RendererNeuronAnnotator::RendererNeuronAnnotator(void* widget) : Renderer_gl2(widget) +{ + neuronMask=0; + texture3DAll=0; + texture3DBackground=0; + texture3DBlank=0; + texture3DCurrent=0; + textureSetAlreadyLoaded=false; + masklessSetupStackTexture=false; + + // black background for consistency with other viewers + RGBA32f bg_color; + bg_color.r = bg_color.g = bg_color.b = 0.0f; + bg_color.a = 1.0f; + color_background = bg_color; + color_background2 = bg_color; + + // remove decorations from 3D viewer + bShowAxes = false; + bShowBoundingBox = false; + bShowBoundingBox2 = false; +} + +RendererNeuronAnnotator::~RendererNeuronAnnotator() { + +} + +void RendererNeuronAnnotator::loadVol() { + Renderer_tex2::loadVol(); +} + +// This function resamples the original mask to the same dimensions +// as the texture buffer. It returns false if the source image is smaller +// than the target buffer because this isn't implemented. + +bool RendererNeuronAnnotator::populateNeuronMask(const My4DImage* my4Dmask) { + + qDebug() << "Start RendererNeuronAnnotator::populateNeuronMask()"; + + // Clean previous data + if (neuronMask!=0) { + delete [] neuronMask; + } + + if (my4Dmask==0) { + qDebug() << "RendererNeuronAnnotator::populateNeuronMask() can't process NULL my4Dmask"; + return false; + } + + int sourceX=my4Dmask->getXDim(); + int sourceY=my4Dmask->getYDim(); + int sourceZ=my4Dmask->getZDim(); + + float sx, sy, sz; + V3DLONG dx, dy, dz; + sx = float(sourceX)/realX; + sy = float(sourceY)/realY; + sz = float(sourceZ)/realZ; + + if (!(sx>=1.0 && sy>=1.0 && sz>=1.0)) { + qDebug() << "RendererNeuronAnnotator::populateNeuronMask() source image must be equal or larger dimension than texture with current implementation"; + return false; + } + + neuronMask=new unsigned char[realX*realY*realZ]; + + memset(neuronMask, 0, realX*realY*realZ); + + V3DLONG ox, oy, oz; + V3DLONG ix, iy, iz; + + // Because we are mapping a mask, we do NOT want to 'sample' the data, + // but rather condense it without missing any of the mask elements. Therefore, + // we will iterate over the source mask, and then direct the contents to the + // equivalent target voxel. + + // Note that the first mask entry is not overwritten by subsequent entries. + + for (iz = 0; iz < sourceZ; iz++) + for (iy = 0; iy < sourceY; iy++) + for (ix = 0; ix < sourceX; ix++) { + ox = CLAMP(0,realX-1, IROUND(ix/sx)); + oy = CLAMP(0,realY-1, IROUND(iy/sy)); + oz = CLAMP(0,realZ-1, IROUND(iz/sz)); + + V3DLONG offset = oz*realX*realY + oy*realX + ox; + if (neuronMask[offset]==0) { + neuronMask[offset] = my4Dmask->at(ix,iy,iz); + } + } + + qDebug() << "RendererNeuronAnnotator::populateNeuronMask() done"; + + return true; +} + +bool RendererNeuronAnnotator::populateBaseTextures() { + + qDebug() << "RendererNeuronAnnotator::populateBaseTextures() start"; + + // Sanity check + if (texture3DAll==0) { + qDebug() << "RendererNeuronAnnotator::populateBaseTextures() requires that texture3DAll be pre-populated"; + return false; + } + + // Clean + if (texture3DBlank!=0) + delete [] texture3DBlank; + if (texture3DBackground!=0) + delete [] texture3DBackground; + + texture3DBlank=new RGBA8[realZ*realY*realX]; + texture3DBackground=new RGBA8[realZ*realY*realX]; + + + // Blank case + RGBA8 blankRgba; + blankRgba.r = 0; + blankRgba.g = 0; + blankRgba.b = 0; + blankRgba.a = 0; + int z,y,x; + for (z = 0; z < realZ; z++) + for (y = 0; y < realY; y++) + for (x = 0; x < realX; x++) + { + texture3DBlank[z*realY*realX + y*realX + x] = blankRgba; + } + + // Background case + for (z = 0; z < realZ; z++) + for (y = 0; y < realY; y++) + for (x = 0; x < realX; x++) + { + V3DLONG index=z*realY*realX + y*realX + x; + unsigned char maskValue=neuronMask[index]; + if (maskValue==0) { + texture3DBackground[index] = texture3DAll[index]; + } else { + texture3DBackground[index] = blankRgba; + } + } + + qDebug() << "RendererNeuronAnnotator::populateBaseTextures() end"; + + return true; +} + +// This is originally based on version from Renderer_tex2 +void RendererNeuronAnnotator::setupStackTexture(bool bfirst) +{ + qDebug() << "RendererNeuronAnnotator::setupStackTexture() - start"; + + if (masklessSetupStackTexture) { + + Renderer_tex2::setupStackTexture(true); + + } else { + + if (texture3DAll!=0) + delete [] texture3DAll; + + texture3DAll = _safeReference3DBuf(rgbaBuf, imageX, imageY, imageZ, safeX, safeY, safeZ); //081008 + realX = safeX; + realY = safeY; + realZ = safeZ; + + fillX = _getTexFillSize(realX); + fillY = _getTexFillSize(realY); + fillZ = _getTexFillSize(realZ); + + qDebug(" texture: real = %dx%dx%d fill = %dx%dx%d", realX, realY, realZ, fillX, fillY, fillZ); + } + + qDebug() << "RendererNeuronAnnotator::setupStackTexture() - end"; +} + +bool RendererNeuronAnnotator::initializeTextureMasks() { + + if (!populateBaseTextures()) { + return false; + } + + QList initialMaskList; + for (int i=1;i<256;i++) { + initialMaskList.append(i); + } + + QProgressDialog progressDialog( QString("Setting up textures"), 0, 0, 100, NULL, Qt::Tool | Qt::WindowStaysOnTopHint); + progressDialog.setAutoClose(true); + + setBackgroundBaseTexture(initialMaskList, progressDialog); + + return true; +} + + +// This function assumes the size realX,Y,Z should be used +void RendererNeuronAnnotator::load3DTextureSet(RGBA8* tex3DBuf, QProgressDialog & dialog) { + + int sliceCount=0; + + for (int stack_i=1; stack_i<=3; stack_i++) + { + + int n_slice = 0; + RGBA8* p_slice = 0; + GLuint* p_tex = 0; + int w = 0, h =0; + int sw = 0, sh = 0; + + switch (stack_i) + { + case 1: //Z[y][x] + n_slice = realZ; + p_slice = Zslice_data; + p_tex = Ztex_list; + w = fillX, h = fillY; + sw = COPY_X, sh = COPY_Y; + break; + case 2: //Y[z][x] + n_slice = realY; + p_slice = Yslice_data; + p_tex = Ytex_list; + w = fillX, h = fillZ; + sw = COPY_X, sh = COPY_Z; + break; + case 3: //X[z][y] + n_slice = realX; + p_slice = Xslice_data; + p_tex = Xtex_list; + w = fillY, h = fillZ; + sw = COPY_Y, sh = COPY_Z; + break; + } + + MESSAGE_ASSERT(imageX>=realX && imageY>=realY && imageZ>=realZ); + MESSAGE_ASSERT(COPY_X>=realX && COPY_Y>=realY && COPY_Z>=realZ); +// sw+=1, sh+=1; // to get rid of artifacts at sub-tex border // or use NPT tex +// if (sw>w) sw = w; +// if (sh>h) sh = h; + + for (int i = 0; i < n_slice; i++) + + { + glBindTexture(GL_TEXTURE_2D, p_tex[i+1]); //[0] reserved for pbo tex + RGBA8* p_first = NULL; + + if (!textureSetAlreadyLoaded) + { + p_first = p_slice; + if (p_first) _copySliceFromStack(tex3DBuf, realX,realY,realZ, p_first, w, stack_i, i); + + setTexParam2D(); + glTexImage2D(GL_TEXTURE_2D, // target + 0, // level + texture_format, // texture format + w, // width + h, // height + 0, // border + image_format, // image format + image_type, // image type + p_first); + CHECK_GLErrorString_throw(); // can throw const char* exception, RZC 080925 + } + // Notice: compressed texture is corrupted with TexSubImage2D but TexSubImage3D !!! + else + { + _copySliceFromStack(tex3DBuf, realX,realY,realZ, p_slice, sw, stack_i, i); + + glTexSubImage2D(GL_TEXTURE_2D, // target + 0, // level + 0,0, // offset + sw, // sub width + sh, // sub height + image_format, // image format + image_type, // image type + p_slice); + CHECK_GLErrorString_throw(); // can throw const char* exception, RZC 080925 + } + sliceCount++; + int progress=sliceCount*100 / (realX + realY + realZ); + updateProgressDialog(dialog, progress); + } + + }//tex2D + + if (!textureSetAlreadyLoaded) { + textureSetAlreadyLoaded=true; + } + +} + +void RendererNeuronAnnotator::setBackgroundBaseTexture(QList maskIndexList, QProgressDialog & dialog) { + cleanExtendedTextures(); + RGBA8* texture=extendTextureFromMaskList(texture3DBackground, maskIndexList); + load3DTextureSet(texture, dialog); + texture3DCurrent=texture; +} + +void RendererNeuronAnnotator::setAllBaseTexture(QProgressDialog & dialog) { + cleanExtendedTextures(); + load3DTextureSet(texture3DAll, dialog); + texture3DCurrent=texture3DAll; +} + +void RendererNeuronAnnotator::setBlankBaseTexture(QList maskIndexList, QProgressDialog & dialog) { + cleanExtendedTextures(); + RGBA8* texture=extendTextureFromMaskList(texture3DBlank, maskIndexList); + load3DTextureSet(texture, dialog); + texture3DCurrent=texture; +} + +void RendererNeuronAnnotator::cleanExtendedTextures() { + if (texture3DCurrent!=0 && + texture3DCurrent!=texture3DAll && + texture3DCurrent!=texture3DBackground && + texture3DCurrent!=texture3DBlank) { + delete [] texture3DCurrent; + } +} + +RGBA8* RendererNeuronAnnotator::extendTextureFromMaskList(RGBA8* sourceTexture, const QList & maskIndexList) { + qDebug() << "RendererNeuronAnnotator::extendTextureFromMaskList() start"; + RGBA8* newTexture=new RGBA8[realZ*realY*realX]; + int* quickList=new int[256]; + for (int m=0;m<256;m++) { + quickList[m]=0; + } + for (int m=0;m255) { + qDebug() << "Error: ignoring mask entry greater than 255"; + } else { + quickList[value]=value; + } + } + for (int z=0;z maskIndexList, QProgressDialog & dialog); + void setAllBaseTexture(QProgressDialog & dialog); + void setBlankBaseTexture(QList maskIndexList, QProgressDialog & dialog); + void updateCurrentTextureMask(int maskIndex, int state, QProgressDialog & dialog); + bool initializeTextureMasks(); + void setMasklessSetupStackTexture(bool state) { masklessSetupStackTexture=state; } + // useful value for computing zoom level + float getZoomedPerspectiveViewAngle() const {return viewAngle * zoomRatio;} + void setInternalZoomRatio(float z) {zoomRatio = z;} + float glUnitsPerImageVoxel() const { + return 2.0 / boundingBox.Dmax(); + } + +protected: + virtual void setupStackTexture(bool bfirst); + void load3DTextureSet(RGBA8* tex3DBuf, QProgressDialog & dialog); + RGBA8* extendTextureFromMaskList(RGBA8* sourceTexture, const QList & maskIndexList); + void cleanExtendedTextures(); + void updateProgressDialog(QProgressDialog & dialog, int level); + bool populateBaseTextures(); + + // We want all of these OFF for now to keep the texture handling constant across different hardware environments + virtual bool supported_TexStream() {return false;} + virtual void setupTexStreamBuffer() {tex_stream_buffer = false;} + virtual void cleanTexStreamBuffer() {tex_stream_buffer = false;} + virtual bool _streamingTex() {return false;} + virtual void _streamTex(int stack_i, int slice_i, int step, int slice0, int slice1) {} + virtual void _streamTex_end() {} + +private: + unsigned char* neuronMask; // sized to texture buffer dimensions realX,Y,Z + RGBA8* texture3DAll; + RGBA8* texture3DBackground; + RGBA8* texture3DBlank; + RGBA8* texture3DCurrent; + bool textureSetAlreadyLoaded; + bool masklessSetupStackTexture; +}; + +#endif // RENDERERNEURONANNOTATOR_H diff --git a/v3d_main/neuron_annotator/Rotation3D.cpp b/v3d_main/neuron_annotator/Rotation3D.cpp new file mode 100644 index 0000000000..113efecb2e --- /dev/null +++ b/v3d_main/neuron_annotator/Rotation3D.cpp @@ -0,0 +1,251 @@ +#include "Rotation3D.h" +#include +#include + +//////////////////////// +// Quaternion methods // +//////////////////////// + +Quaternion& Quaternion::setQuaternionFromAngleAxis( const qreal& a, const UnitVector3D& v ) +{ + /// The cost of this method is approximately 80 flops (one sin and one cos). + qreal ca2 = std::cos(a/2), sa2 = std::sin(a/2); + + // Multiplying an entire quaternion by -1 produces the same Rotation matrix + // (each element of the Rotation element involves the product of two quaternion elements). + // The canonical form is to make the first element of the quaternion positive. + if( ca2 < 0 ) { ca2 = -ca2; sa2 = -sa2; } + Quaternion& q = *this; + q[0] = ca2; + Vector3D v2 = sa2*v; + q[1] = v2[0]; + q[2] = v2[1]; + q[3] = v2[2]; + return *this; +} + +//////////////////////// +// Rotation3D methods // +//////////////////////// + +qreal Rotation3D::Eps = Rotation3D::getEps(); + +Rotation3D::Rotation3D() +{ + Rotation3D& t = *this; + for (int r = 0; r < 3; ++r) + for (int c = 0; c < 3; ++c) + t[r][c] = 0.0; + t[0][0] = t[1][1] = t[2][2] = 1.0; +} + +Rotation3D::Rotation3D(const GLdouble mRot[16]) { + for (int r = 0; r < 3; ++r) + for (int c = 0; c < 3; ++c) + // TODO - is the GLdouble matrix transposed with respect to normal rotation? + (*this)[r][c] = mRot[4*c + r]; // transpose +} + +void Rotation3D::setGLMatrix(GLdouble mRot[16]) const { + for(int i = 0; i < 3; ++i) + for (int j = 0; j < 3; ++j) + mRot[4*j + i] = (*this)[i][j]; // transpose +} + +// compose rotation matrices +Rotation3D Rotation3D::operator*(const Rotation3D& rhs) const +{ + const Rotation3D& lhs = *this; + Rotation3D answer; + for(int i = 0; i < 3; ++i) + for(int j = 0; j < 3; ++j) { + answer[i][j] = 0.0; + for(int k = 0; k < 3; ++k) + answer[i][j] += lhs[i][k] * rhs[k][j]; + } + return answer; +} + +// rotate vector by rotation +Vector3D Rotation3D::operator*(const Vector3D& rhs) const +{ + const Rotation3D& lhs = *this; + Vector3D answer; + for(int i = 0; i < 3; ++i) { + answer[i] = 0.0; + for(int j = 0; j < 3; ++j) + answer[i] += lhs[i][j] * rhs[j]; + } + return answer; +} + +// inverse/transpose of rotation +Rotation3D Rotation3D::operator~() const +{ + Rotation3D answer; + for(int i = 0; i < 3; ++i) + for(int j = 0; j < 3; ++j) + answer[i][j] = (*this)[j][i]; + return answer; +} + +bool Rotation3D::operator==(const Rotation3D& rhs) const { + const Rotation3D& lhs = *this; + return !(lhs != rhs); +} + +bool Rotation3D::operator!=(const Rotation3D& rhs) const { + const Rotation3D& lhs = *this; + if (lhs[0] != rhs[0]) return true; + if (lhs[1] != rhs[1]) return true; + if (lhs[2] != rhs[2]) return true; + return false; +} + +/* static */ +const qreal& Rotation3D::getEps() { + static const qreal c = std::numeric_limits::epsilon(); + return c; +} + +static qreal square(qreal x) {return x*x;} + +Vector3D Rotation3D::convertBodyFixedXYZRotationToThreeAngles() const +{ + const int i = 0; + const int j = 1; + const int k = 2; + + // Shortcut to the elements of the rotation matrix + const Rotation3D& R = *this; + + // Calculate theta2 using lots of information in the rotation matrix + qreal Rsum = std::sqrt((square(R[i][i]) + square(R[i][j]) + square(R[j][k]) + square(R[k][k])) / 2.0); + qreal theta2 = std::atan2( R[i][k], Rsum ); // Rsum = abs(cos(theta2)) is inherently positive + qreal theta1, theta3; + + // There is a "singularity" when cos(theta2) == 0 + if( Rsum > 4*Eps ) { + theta1 = std::atan2( -R[j][k], R[k][k] ); + theta3 = std::atan2( -R[i][j], R[i][i] ); + } + else if( R[i][k] > 0 ) { + const qreal spos = R[j][i] + R[k][j]; // 2*sin(theta1 + theta3) + const qreal cpos = R[j][j] + -R[k][i]; // 2*cos(theta1 + theta3) + const qreal theta1PlusMinusTheta3 = std::atan2( spos, cpos ); + theta1 = theta1PlusMinusTheta3; // Arbitrary split + theta3 = 0; // Arbitrary split + } + else { + const qreal sneg = (R[k][j] - R[j][i]); // 2*sin(theta1 + minusPlus*theta3) + const qreal cneg = R[j][j] + R[k][i]; // 2*cos(theta1 + minusPlus*theta3) + const qreal theta1MinusPlusTheta3 = std::atan2( sneg, cneg ); + theta1 = theta1MinusPlusTheta3; // Arbitrary split + theta3 = 0; // Arbitrary split + } + + // Return values have the following ranges: + // -pi <= theta1 <= +pi + // -pi/2 <= theta2 <= +pi/2 (Rsum is inherently positive) + // -pi <= theta3 <= +pi + return Vector3D( theta1, theta2, theta3 ); +} + +Rotation3D& Rotation3D::setRotationFromBodyFixedXYZAngles(qreal rotX, qreal rotY, qreal rotZ) +{ + // Calculate the sines and cosines (some hardware can do this more + // efficiently as one Taylor series). + const qreal cosAngle1 = std::cos( rotX ), sinAngle1 = std::sin( rotX ); + const qreal cosAngle2 = std::cos( rotY ), sinAngle2 = std::sin( rotY ); + const qreal cosAngle3 = std::cos( rotZ ), sinAngle3 = std::sin( rotZ ); + + // Repeated calculations (for efficiency) + qreal s1c3 = sinAngle1 * cosAngle3; + qreal s3c1 = sinAngle3 * cosAngle1; + qreal s1s3 = sinAngle1 * sinAngle3; + qreal c1c3 = cosAngle1 * cosAngle3; + + const int i = 0; + const int j = 1; + const int k = 2; + + Rotation3D& R = *this; + R[i][i] = cosAngle2 * cosAngle3; + R[i][j] = -sinAngle3 * cosAngle2; + R[i][k] = sinAngle2; + R[j][i] = s3c1 + sinAngle2 * s1c3; + R[j][j] = c1c3 - sinAngle2 * s1s3; + R[j][k] = -sinAngle1 * cosAngle2; + R[k][i] = s1s3 - sinAngle2 * c1c3; + R[k][j] = s1c3 + sinAngle2 * s3c1; + R[k][k] = cosAngle1 * cosAngle2; + + return *this; +} + +Rotation3D& Rotation3D::setRotationFromAngleAboutUnitVector( qreal angleInRadians, const UnitVector3D& unitVector ) +{ + Quaternion q; + q.setQuaternionFromAngleAxis( angleInRadians, unitVector ); + return setRotationFromQuaternion( q ); +} + +Rotation3D& Rotation3D::setRotationFromQuaternion( const Quaternion& q ) +{ + const qreal q00=q[0]*q[0], q11=q[1]*q[1], q22=q[2]*q[2], q33=q[3]*q[3]; + const qreal q01=q[0]*q[1], q02=q[0]*q[2], q03=q[0]*q[3]; + const qreal q12=q[1]*q[2], q13=q[1]*q[3], q23=q[2]*q[3]; + + setElements( q00+q11-q22-q33, 2*(q12-q03) , 2*(q13+q02), + 2*(q12+q03) , q00-q11+q22-q33, 2*(q23-q01), + 2*(q13-q02) , 2*(q23+q01) , q00-q11-q22+q33); + return *this; +} + +Rotation3D& Rotation3D::setElements(qreal r00, qreal r01, qreal r02, + qreal r10, qreal r11, qreal r12, + qreal r20, qreal r21, qreal r22) +{ + Rotation3D& R = *this; + R[0][0] = r00; + R[0][1] = r01; + R[0][2] = r02; + R[1][0] = r10; + R[1][1] = r11; + R[1][2] = r12; + R[2][0] = r20; + R[2][1] = r21; + R[2][2] = r22; + return *this; +} + +std::ostream& operator<<(std::ostream& os, const Rotation3D& rot) { + for (int i = 0; i < 3; ++i) { + os << "["; + for (int j = 0; j < 3; ++j) { + if (j > 0) + os << ", "; + os << rot[i][j]; + } + os << "]" << std::endl; + } + return os; +} + +// transformation for one position in a nutation sequence +Rotation3D nutation(qreal angleInRadians, qreal coneAngleInRadians) +{ + UnitVector3D axis(std::cos(angleInRadians), std::sin(angleInRadians), 0.0); + return Rotation3D().setRotationFromAngleAboutUnitVector(coneAngleInRadians, axis); +} + +// change in transformation between two positions in a nutation sequence +Rotation3D deltaNutation(qreal angleInRadians, qreal angleChangeInRadians, qreal coneAngleInRadians) +{ + Rotation3D R0 = nutation(-angleInRadians + angleChangeInRadians, coneAngleInRadians); + Rotation3D R1 = nutation(-angleInRadians, coneAngleInRadians); + return R1 * ~R0; +} + + + diff --git a/v3d_main/neuron_annotator/Rotation3D.h b/v3d_main/neuron_annotator/Rotation3D.h new file mode 100644 index 0000000000..3275a682a6 --- /dev/null +++ b/v3d_main/neuron_annotator/Rotation3D.h @@ -0,0 +1,82 @@ +#ifndef ROTATION_CMB_H +#define ROTATION_CMB_H + +#include "Vector3D.h" +// I had to remove the gl.h include to get linux to compile - Mac seems to be OK without it also - Sean +// Hmm. Doesn't compile on my Mac..., perhaps including QGLWidget instead of gl.h will succeed on linux. - Christopher +// My mac needs one of these to define the symbol "GLdouble" +#include +#include +#include + +class Quaternion +{ +public: + // Default constructor yields the identity quaternion + Quaternion() : m_w(1.0), m_x(0), m_y(0), m_z(0) {} + Quaternion& setQuaternionFromAngleAxis( const qreal& angleInRadians, const UnitVector3D& axis ); + // read-only access to preserve special properties + const qreal& operator[](int index) const {return m_data[index];} + +protected: + qreal& operator[](int index) {return m_data[index];} + + union { + qreal m_data[4]; + struct {qreal m_w, m_x, m_y, m_z;}; + // struct {qreal m_s; Vector3D m_v;}; // scalar, vector // oops, can't put Vector3D in a union + }; +}; + +// rotation matrix +class Rotation3D +{ +public: + class Row : public UnitVector3D { + friend class Rotation3D; + }; + + Rotation3D(); + Rotation3D(const GLdouble mRot[16]); + // read-only version of index operator is public + const Row& operator[](int r) const {return data[r];} + // compose rotation matrices + Rotation3D operator*(const Rotation3D& rhs) const; + // rotate vector by rotation + Vector3D operator*(const Vector3D& rhs) const; + // inverse/transpose of rotation + Rotation3D operator~() const; + bool operator==(const Rotation3D& rhs) const; + bool operator!=(const Rotation3D& rhs) const; + // Interconvert body-centered XYZ Euler angles and rotation matrix. + // These mathematics are lifted from the SimTK tool kit, and were + // previously unavailable in V3D. + // Returns body centered X->Y->Z Euler angles in radians. + Vector3D convertBodyFixedXYZRotationToThreeAngles() const; + // Sets rotation matrix from Euler angles in radians. + Rotation3D& setRotationFromBodyFixedXYZAngles(qreal rotX, qreal rotY, qreal rotZ); + Rotation3D& setRotationFromAngleAboutUnitVector( qreal angleInRadians, const UnitVector3D& unitVector ); + Rotation3D& setRotationFromQuaternion( const Quaternion& q ); + void setGLMatrix(GLdouble mRot[16]) const; + +protected: + static const qreal& getEps(); // machine precision + static qreal Eps; // machine precision + Rotation3D& setElements(qreal r00, qreal r01, qreal r02, + qreal r10, qreal r11, qreal r12, + qreal r20, qreal r21, qreal r22); + // Writable access is protected, to prevent user from spoiling special properties + Row& operator[](int r) {return data[r];} + + Row data[3]; +}; + +std::ostream& operator<<(std::ostream& os, const Rotation3D& rot); + +// transformation for one position in a nutation sequence +Rotation3D nutation(qreal angleInRadians, qreal coneAngleInRadians); +// change in transformation between two positions in a nutation sequence +Rotation3D deltaNutation(qreal angleInRadians, qreal angleChangeInRadians, qreal coneAngleInRadians = 0.02); + +#endif // ROTATION_CMB_H + diff --git a/v3d_main/neuron_annotator/TimebasedIdentifierGenerator.cpp b/v3d_main/neuron_annotator/TimebasedIdentifierGenerator.cpp new file mode 100644 index 0000000000..a8dfa6a4e5 --- /dev/null +++ b/v3d_main/neuron_annotator/TimebasedIdentifierGenerator.cpp @@ -0,0 +1,7 @@ +#include "TimebasedIdentifierGenerator.h" + +long TimebasedIdentifierGenerator::lastId=0; + +TimebasedIdentifierGenerator::TimebasedIdentifierGenerator() +{ +} diff --git a/v3d_main/neuron_annotator/TimebasedIdentifierGenerator.h b/v3d_main/neuron_annotator/TimebasedIdentifierGenerator.h new file mode 100644 index 0000000000..b281e3fc9f --- /dev/null +++ b/v3d_main/neuron_annotator/TimebasedIdentifierGenerator.h @@ -0,0 +1,24 @@ +#ifndef TIMEBASEDIDENTIFIERGENERATOR_H +#define TIMEBASEDIDENTIFIERGENERATOR_H + +#include + +class TimebasedIdentifierGenerator +{ +public: + TimebasedIdentifierGenerator(); + + static long getSingleId() { + long currentTimeId=QDateTime::currentMSecsSinceEpoch(); + if (currentTimeId<=lastId) { + currentTimeId=lastId+1; + lastId=currentTimeId; + } + return currentTimeId; + } + +private: + static long lastId; +}; + +#endif // TIMEBASEDIDENTIFIERGENERATOR_H diff --git a/v3d_main/neuron_annotator/Vector3D.cpp b/v3d_main/neuron_annotator/Vector3D.cpp new file mode 100644 index 0000000000..4e7ee14f61 --- /dev/null +++ b/v3d_main/neuron_annotator/Vector3D.cpp @@ -0,0 +1,10 @@ +#include "Vector3D.h" +#include +#include + +////////////////////// +// Vector3D methods // +////////////////////// + + + diff --git a/v3d_main/neuron_annotator/Vector3D.h b/v3d_main/neuron_annotator/Vector3D.h new file mode 100644 index 0000000000..24662984f0 --- /dev/null +++ b/v3d_main/neuron_annotator/Vector3D.h @@ -0,0 +1,146 @@ +#ifndef VECTOR3D_CMB_H +#define VECTOR3D_CMB_H + +#include +#include +#include + +class Vector3D; +class UnitVector3D; + +// BaseVector3D is the common base class of Vector3D and UnitVector3D +// Many methods are defined in this header so they can be inlined by the compiler. +// I would prefer to avoid virtual methods in these classes to keep the memory layout simple. +class BaseVector3D +{ +public: + BaseVector3D(qreal x, qreal y, qreal z) : m_x(x), m_y(y), m_z(z) {} + BaseVector3D(const BaseVector3D& v) : m_x(v.m_x), m_y(v.m_y), m_z(v.m_z) {} + + qreal x() const {return m_x;} + qreal y() const {return m_y;} + qreal z() const {return m_z;} + qreal operator[](int i) const {return data[i];} + bool operator==(const BaseVector3D& rhs) const { + return ((m_x == rhs.m_x) + && (m_y == rhs.m_y) + && (m_z == rhs.m_z)); + } + bool operator!=(const BaseVector3D& rhs) const { + return ((m_x != rhs.m_x) + || (m_y != rhs.m_y) + || (m_z != rhs.m_z)); + } + qreal normSquared() const { + return m_x * m_x + m_y * m_y + m_z * m_z; + } + qreal norm() const { + return std::sqrt(normSquared()); + } + +protected: + BaseVector3D& operator/=(qreal s) { + m_x /= s; + m_y /= s; + m_z /= s; + } + + // Writeable access is OK for Vector3D, but not for UnitVector3D + // so these methods are protected in the base class BaseVector3D + qreal& operator[](int i) {return data[i];} + qreal& x() {return m_x;} + qreal& y() {return m_y;} + qreal& z() {return m_z;} + + union { + qreal data[3]; + struct {qreal m_x, m_y, m_z;}; + }; +}; + +class Vector3D : public BaseVector3D +{ +public: + Vector3D() : BaseVector3D(0,0,0) {} + Vector3D(qreal x, qreal y, qreal z) : BaseVector3D(x,y,z) {} + + // Expose writeable accessors, unlike UnitVector3D + using BaseVector3D::x; + using BaseVector3D::y; + using BaseVector3D::z; + using BaseVector3D::operator[]; + + // Methods that return Vector3D reference should not be defined in BaseVector3D + Vector3D& operator+=(const BaseVector3D& rhs) { + x() += rhs.x(); + y() += rhs.y(); + z() += rhs.z(); + return *this; + } + Vector3D& operator-=(const BaseVector3D& rhs) { + x() -= rhs.x(); + y() -= rhs.y(); + z() -= rhs.z(); + return *this; + } + Vector3D& operator*=(qreal s) { + x() *= s; + y() *= s; + z() *= s; + return *this; + } + Vector3D& operator/=(qreal s) { + x() /= s; + y() /= s; + z() /= s; + return *this; + } +}; + +// Length-modifying operators must return a Vector3D, even if a UnitVector3D was an argument +// scalar-times-vector cannot be a member operator +inline Vector3D operator*(qreal s, const BaseVector3D& rhs) { + return Vector3D(s*rhs.x(), s*rhs.y(), s*rhs.z()); +} +inline Vector3D operator*(const BaseVector3D& lhs, qreal s) { + return Vector3D(lhs.x()*s, lhs.y()*s, lhs.z()*s); +} +inline Vector3D operator/(const BaseVector3D& lhs, qreal s) { + return Vector3D(lhs.x()/s, lhs.y()/s, lhs.z()/s); +} +inline Vector3D operator+(const Vector3D& lhs, const Vector3D& rhs) { + return Vector3D(lhs.x() + rhs.x(), + lhs.y() + rhs.y(), + lhs.z() + rhs.z()); +} +inline Vector3D operator-(const Vector3D& lhs, const Vector3D& rhs) { + return Vector3D(lhs.x() - rhs.x(), + lhs.y() - rhs.y(), + lhs.z() - rhs.z()); +} + +// UnitVector3D has a length of 1.0 +// Writable accessors are protected to preserve this property +class UnitVector3D : public BaseVector3D +{ +public: + UnitVector3D() : BaseVector3D(1, 0, 0) {} + UnitVector3D(const UnitVector3D& v) : BaseVector3D(v) {} + // Expensive constructors scale to unit value + UnitVector3D(const Vector3D& v) : BaseVector3D(v / v.norm()) {} + UnitVector3D(qreal x, qreal y, qreal z) : BaseVector3D(x, y, z) + { + (*this) /= BaseVector3D::norm(); // don't use UnitVector3::norm()! + } + + qreal norm() const {return 1.0;} + qreal normSquared() const {return 1.0;} +}; + +inline std::ostream& operator<<(std::ostream& os, const BaseVector3D& v) { + os << "[" << v[0] << ", " << v[1] << ", " << v[2] << "]"; + return os; +} + +#endif /* VECTOR3D_CMB_H */ + diff --git a/v3d_main/v3d/CMakeLists.txt b/v3d_main/v3d/CMakeLists.txt index 506dcdf321..16b82d14af 100644 --- a/v3d_main/v3d/CMakeLists.txt +++ b/v3d_main/v3d/CMakeLists.txt @@ -1,5 +1,5 @@ set(V3D_SRCS - main.cpp + # main.cpp dialog_rotate.cpp # dialog_watershed_para.cpp idrawmain.cpp @@ -23,8 +23,9 @@ set(V3D_SRCS dialog_keypoint_features.cpp landmark_property_dialog.cpp DownloadManager.cpp - v3d_actions.cpp - ) + CommandManager.cpp + v3d_application.cpp + v3d_actions.cpp) set(V3D_RCCS v3d.qrc ../3drenderer/3drenderer.qrc) @@ -77,17 +78,23 @@ QT4_WRAP_CPP(QT_MOC_SRCS v3d_global_preference_dialog.h v3d_version_info.h v3d_actions.h + v3d_application.h ) include_directories( BEFORE "${CMAKE_CURRENT_BINARY_DIR}/../v3dbase" "${CMAKE_CURRENT_BINARY_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}/../neuron_annotator" + ../neuron_annotator + "${CMAKE_CURRENT_SOURCE_DIR}" ) add_library(v3dbase ${QT_UI_SRCS} ${QT_MOC_SRCS}) target_link_libraries( v3dbase v3dbase1 jba newmat11 multithreadimageIO ${QT_LIBRARIES} ) +add_library(v3dbase2 ${V3D_SRCS}) + if (WIN32) # Windows MSYS build # All this MYS stuff is just to compile in a program icon for windows set(CMAKE_RC_COMPILER_INIT windres) @@ -95,13 +102,17 @@ if (WIN32) # Windows MSYS build set(CMAKE_RC_COMPILE_OBJECT " -O coff -i -o ") add_executable( v3d # *not* WIN32, which causes MSVC to call WinMain() instead of main() - ${V3D_SRCS} ${V3D_RCC_SRCS} + main.cpp + ${V3D_RCC_SRCS} v3d_win.rc) else() - add_executable( v3d ${V3D_SRCS} ${V3D_RCC_SRCS} ) + add_executable( v3d + main.cpp + ${V3D_RCC_SRCS} ) endif() target_link_libraries( v3d + v3dbase2 v3dbase V3DInterface v3d_plugin_loader @@ -263,3 +274,5 @@ if (V3D_BUILD_BINARY_DIR) endif() endif() +target_link_libraries(v3d NeuronAnnotatorLib) + diff --git a/v3d_main/v3d/CommandManager.cpp b/v3d_main/v3d/CommandManager.cpp new file mode 100644 index 0000000000..b1b29cfcb3 --- /dev/null +++ b/v3d_main/v3d/CommandManager.cpp @@ -0,0 +1,69 @@ +#include +#include +#include +#include +#include "CommandManager.h" +#include "../neuron_annotator/ColorSeparatorConsolidator.h" +#include "../neuron_annotator/CellCounter3D.h" + +using namespace std; + +CommandManager::CommandManager(vector *argList) +{ + this->argList=argList; +} + +bool CommandManager::execute() { + if ((*argList).size()==0) { + // Nothing to do + cout << getUsageString(); + return false; + } + string firstArg=(*argList)[0]; + if (firstArg==ColorSeparatorConsolidator::getCommandLineDescription()) { + if ((*argList).size()<3) { + cout << getUsageString(); + return false; + } + QString separatorDirectory=(*argList)[1]; + QString outputFile=(*argList)[2]; + ColorSeparatorConsolidator csc(separatorDirectory, outputFile); + return csc.execute(); + } else if (firstArg==CellCounter3D::getCommandLineDescription()) { + CellCounter3D cellCounter; + int status=cellCounter.processArgs(argList); + if (status==CellCounter3D::ARG_STATUS_USAGE) { + cout << getUsageString(); + return false; + } else if (status==CellCounter3D::ARG_STATUS_HELP) { + cout << CellCounter3D::getHelp(); + return true; + } else if (status==CellCounter3D::ARG_STATUS_OK) { + cellCounter.loadInputFile(); + cellCounter.findCells(); + cellCounter.markImage(); + cellCounter.writeOutputImageFile(); + cellCounter.writeOutputReportFile(); + return true; + } + } else { + cout << getUsageString(); + return false; + } +} + +string CommandManager::getUsageString() { + string usage="The command interface permits v3d to run in production mode, without a viewer or human interface.\n"; + usage.append("To use the command interface, use '-cmd' followed by a command and appropriate options:\n"); + usage.append("\n"); + usage.append("-cmd\n"); + usage.append("\n"); + usage.append(ColorSeparatorConsolidator::getCommandLineDescription()); + usage.append(" \n"); + usage.append("\n"); + usage.append(CellCounter3D::getCommandLineDescription()); + usage.append("\n"); + usage.append(CellCounter3D::getUsage()); + usage.append("\n"); + return usage; +} diff --git a/v3d_main/v3d/CommandManager.h b/v3d_main/v3d/CommandManager.h new file mode 100644 index 0000000000..91527cf582 --- /dev/null +++ b/v3d_main/v3d/CommandManager.h @@ -0,0 +1,19 @@ +#ifndef COMMANDMANAGER_H +#define COMMANDMANAGER_H + +#include +#include + +class CommandManager +{ +public: + CommandManager(std::vector *argList); + bool execute(); + std::string getUsageString(); + +private: + std::vector *argList; + +}; + +#endif // COMMANDMANAGER_H diff --git a/v3d_main/v3d/Info.plist b/v3d_main/v3d/Info.plist index e1ac9cdd5f..52351084f8 100644 --- a/v3d_main/v3d/Info.plist +++ b/v3d_main/v3d/Info.plist @@ -11,9 +11,9 @@ CFBundleSignature ???? CFBundleExecutable - v3d + v3dwebservice CFBundleIdentifier - com.yourcompany.v3d + com.yourcompany.v3dwebservice NOTE This file was generated by Qt/QMake. diff --git a/v3d_main/v3d/main.cpp b/v3d_main/v3d/main.cpp index 523be79ac9..625f7a0bb6 100644 --- a/v3d_main/v3d/main.cpp +++ b/v3d_main/v3d/main.cpp @@ -55,6 +55,8 @@ Last update: 2011-04-19: fix some potential problem of null mainWin pointer #include #include "mainwindow.h" +#include "../neuron_annotator/NaMainWindow.h" +#include "v3d_application.h" #include using namespace std; @@ -71,6 +73,8 @@ void printHelp_align(); void printHelp_straight(); void printHelp_trace(); +V3dApplication* V3dApplication::theApp; + void printHelp_v3d() { //printf("\nV3D: a 3D image visualization and processing tool developed by Hanchuan Peng and colleagues.\n"); @@ -215,16 +219,17 @@ int main(int argc, char **argv) // ------ V3D GUI handling module --------------------- Q_INIT_RESOURCE(v3d); - QApplication app(argc, argv); + V3dApplication* app = V3dApplication::getInstance(argc, argv); + app->activateMainWindow(); + MainWindow* mainWin=app->getMainWindow(); - MainWindow* mainWin = new MainWindow; if (!mainWin) { v3d_msg("Unable to open the V3D main window. Quit."); return false; } - app.installEventFilter(mainWin); + app->installEventFilter(mainWin); if (mainWin) mainWin->show(); @@ -326,7 +331,7 @@ int main(int argc, char **argv) // launch v3d try { - return app.exec(); + return app->exec(); } catch (...) { diff --git a/v3d_main/v3d/mainwindow.cpp b/v3d_main/v3d/mainwindow.cpp index 1be40b8aed..bccba37a26 100644 --- a/v3d_main/v3d/mainwindow.cpp +++ b/v3d_main/v3d/mainwindow.cpp @@ -60,6 +60,7 @@ Sept 30, 2008: disable open in the same window function, also add flip image fu #include #include "mainwindow.h" +#include "v3d_application.h" #include "v3d_version_info.h" #include "../basic_c_fun/basic_surf_objs.h" @@ -88,6 +89,7 @@ MainWindow::MainWindow() fileMenu = 0; editMenu = 0; windowMenu = 0; + modeMenu = 0; helpMenu = 0; proc_export_menu = 0; @@ -235,6 +237,10 @@ MainWindow::MainWindow() procCellSeg_Gaussian_partition = 0; procCellSeg_manualCorrect = 0; + // Mode + procModeDefault = 0; + procModeNeuronAnnotator = 0; + setup_global_imgproc_parameter_default(); //set up the default parameter for some of the global parameters of image processing or viewing //set the drop function @@ -453,15 +459,62 @@ char *MainWindow::getPluginMethod() return pluginmethod; } -void MainWindow::closeEvent(QCloseEvent *event) +#ifdef __v3dwebservice__ + +// slot function for init web service thread +void MainWindow::initWebService(V3DWebService *pws) +{ + connect(pws, SIGNAL(finished()), pws, SLOT(deleteLater())); + pws->start(); +} + +// slot function for quit web service thread +void MainWindow::quitWebService(V3DWebService *pws) +{ + pws->exit(); +} + +// slot function for passing soap parameters +void MainWindow::setSoapPara(soappara *pSoapParaInput) { - qDebug("***v3d: MainWindow::closeEvent"); + pSoapPara = pSoapParaInput; +} + +// slot function for response web service +void MainWindow::webserviceResponse() +{ + qDebug()<<"web service response here ..."; + + this->setSoapPara(v3dws->getSoapPara()); + + if(pSoapPara) + { + if(string(pSoapPara->str_func) == "helloworld") + { + QMessageBox::information((QWidget *)0, QString("title: v3d web service"), QString(pSoapPara->str_message)); + } + else if(string(pSoapPara->str_func) == "v3dopenfile") + { + this->loadV3DFile(pSoapPara->str_message, true, false); + } + else + { + QMessageBox::information((QWidget *)0, QString("title: v3d web service"), QString("Wrong function to invoke!")); + } + } + +} - writeSettings(); //added on 090501 to save setting (default preferences) +#endif //__v3dwebservice__ - foreach (V3dR_MainWindow* p3DView, list_3Dview_win) p3DView->close(); //090812 RZC +void MainWindow::handleCoordinatedCloseEvent(QCloseEvent *event) { + qDebug("***v3d: MainWindow::closeEvent"); - //exit(1); //this is one bruteforce way to disable the strange seg fault. 080430. A simple to enhance this is to set a b_changedContent flag indicates if there is any unsaved edit of an image, + writeSettings(); //added on 090501 to save setting (default preferences) + + foreach (V3dR_MainWindow* p3DView, list_3Dview_win) p3DView->close(); //090812 RZC + + //exit(1); //this is one bruteforce way to disable the strange seg fault. 080430. A simple to enhance this is to set a b_changedContent flag indicates if there is any unsaved edit of an image, workspace->closeAllWindows(); if (activeMdiChild()) @@ -474,13 +527,11 @@ void MainWindow::closeEvent(QCloseEvent *event) //writeSettings(); event->accept(); } +} - //090812 still unsolved: QBasicAtomicInt::deref (this=0x0) at qatomic_i386.h:132 - //if(!testAttribute(Qt::WA_DeleteOnClose)) deleteLater();//090811 RZC replace the exit(1) - - //qApp->quit(); //this equal exit(0) - QCoreApplication::postEvent(qApp, new QEvent(QEvent::Quit)); // this more OK - +void MainWindow::closeEvent(QCloseEvent *event) +{ + V3dApplication::handleCloseEvent(event); } void MainWindow::dragEnterEvent(QDragEnterEvent *event) @@ -1642,6 +1693,13 @@ void MainWindow::updateMenus() proc3DLocalRoiViewer->setEnabled(hasMdiChild); //need to ensure the availability of roi later } +void MainWindow::updateModeMenu() +{ + modeMenu->clear(); + modeMenu->addAction(procModeDefault); + modeMenu->addAction(procModeNeuronAnnotator); +} + void MainWindow::updateWindowMenu() { windowMenu->clear(); @@ -2277,6 +2335,17 @@ void MainWindow::createActions() procPC_Atlas_view_atlas_computeVanoObjStat->setStatusTip(tr("re-compute image objects statistics for .ano files under a directory")); connect(procPC_Atlas_view_atlas_computeVanoObjStat, SIGNAL(triggered()), this, SLOT(func_procPC_Atlas_view_atlas_computeVanoObjStat())); + // Mode + procModeDefault = new QAction(tr("V3D Default"), this); + procModeDefault->setCheckable(true); + procModeDefault->setChecked(true); + connect(procModeDefault, SIGNAL(triggered()), this, SLOT(func_procModeDefault())); + + procModeNeuronAnnotator = new QAction(tr("Neuron Annotator"), this); + procModeNeuronAnnotator->setCheckable(true); + procModeNeuronAnnotator->setChecked(false); + connect(procModeNeuronAnnotator, SIGNAL(triggered()), this, SLOT(func_procModeNeuronAnnotator())); + } void MainWindow::createMenus() @@ -2364,6 +2433,10 @@ void MainWindow::createMenus() menuBar()->addSeparator(); + // Mode + modeMenu = menuBar()->addMenu(tr("Mode")); + connect(modeMenu, SIGNAL(aboutToShow()), this, SLOT(updateModeMenu())); + // helpMenu = menuBar()->addMenu(tr("&Help")); helpMenu->addAction( aboutAct ); @@ -2666,6 +2739,28 @@ void MainWindow::func_procCellSeg_Gaussian_fit_1_spot_N_Gauss(){if (activeMdiChi void MainWindow::func_procCellSeg_Gaussian_partition(){if (activeMdiChild()) activeMdiChild()->popupImageProcessingDialog(tr(" -- (available soon) Gaussian partition"));} void MainWindow::func_procCellSeg_manualCorrect(){if (activeMdiChild()) activeMdiChild()->popupImageProcessingDialog(tr(" -- (available soon) manual correction/identification of spherical structures"));} + +// Mode +void MainWindow::func_procModeDefault() +{ + V3dApplication::deactivateNaMainWindow(); + V3dApplication::activateMainWindow(); +} + +void MainWindow::func_procModeNeuronAnnotator() +{ + V3dApplication::deactivateMainWindow(); + V3dApplication::activateNaMainWindow(); +} + +void MainWindow::setV3DDefaultModeCheck(bool checkState) { + procModeDefault->setChecked(checkState); +} + +void MainWindow::setNeuronAnnotatorModeCheck(bool checkState) { + procModeNeuronAnnotator->setChecked(checkState); +} + //class V3D_PlugIn_Interface //{ //public: diff --git a/v3d_main/v3d/mainwindow.h b/v3d_main/v3d/mainwindow.h index ace9325df8..f4a900fb70 100644 --- a/v3d_main/v3d/mainwindow.h +++ b/v3d_main/v3d/mainwindow.h @@ -70,7 +70,6 @@ class V3DWebService; //110315 YuY class soappara; //110315 YuY #endif - class V3d_PluginLoader; class Image4DSimple; class My4DImage; @@ -103,6 +102,9 @@ class MainWindow : public QMainWindow // CMB 12-Nov-2010 // Intercept QFileOpenEvent on Mac - drag-onto-app bool eventFilter(QObject *obj, QEvent *event); + void setV3DDefaultModeCheck(bool checkState); + void setNeuronAnnotatorModeCheck(bool checkState); + void handleCoordinatedCloseEvent(QCloseEvent *event); protected: void closeEvent(QCloseEvent *event); @@ -127,6 +129,7 @@ public slots: // void about(); void openRecentFile(); void updateMenus(); + void updateModeMenu(); void updateWindowMenu(); void updateProcessingMenu(); @@ -248,6 +251,10 @@ public slots: void func_procTracing_clear(); void func_procTracing_update3Dview(); void func_procTracing_save(); + + // Mode + void func_procModeDefault(); + void func_procModeNeuronAnnotator(); // Dec-20-2010 YuY signals: @@ -299,6 +306,7 @@ public slots: QMenu *fileMenu; QMenu *editMenu; QMenu *windowMenu; + QMenu *modeMenu; QMenu *helpMenu; QMenu *basicProcMenu, *advancedProcMenu, *pipelineProcMenu, *visualizeProcMenu; @@ -451,7 +459,7 @@ public slots: QAction * procCellSeg_Gaussian_fit_1_spot_1_Gauss; QAction * procCellSeg_Gaussian_fit_1_spot_N_Gauss; QAction * procCellSeg_Gaussian_partition; - QAction * procCellSeg_manualCorrect; + QAction * procCellSeg_manualCorrect; #ifdef __v3dwebservice__ private: @@ -468,6 +476,10 @@ public slots: void switch3dviewercontrol(V3dR_MainWindow *existing_3dviewer); #endif + // Mode + QAction * procModeDefault; + QAction * procModeNeuronAnnotator; + public: //for image processing, some of the parameters should be globally set //080822 BDB_Minus_ConfigParameter flybrain_lobeseg_para; diff --git a/v3d_main/v3d/my4dimage.cpp b/v3d_main/v3d/my4dimage.cpp index 49d35e39ed..efc83a7ece 100644 --- a/v3d_main/v3d/my4dimage.cpp +++ b/v3d_main/v3d/my4dimage.cpp @@ -103,6 +103,7 @@ using namespace std; #include "compute_win_pca.h" #include "../3drenderer/barFigureDialog.h" +#include "../v3d/v3d_application.h" //#include "thread_regist.h" @@ -469,7 +470,7 @@ void **** My4DImage::getData(ImagePixelType & dtype) return NULL; //temnporarily allow only UINT8, UINT16, and FLOAT32 data } -double My4DImage::at(int x, int y, int z, int c) //return a double number because it can always be converted back to UINT8 and UINT16 without information loss +double My4DImage::at(int x, int y, int z, int c) const //return a double number because it can always be converted back to UINT8 and UINT16 without information loss { //return -1 in case error such as x,y,z,c are illegal values bool result = (!data4d_virtual || x<0 || y<0 || z<0 || c<0 || x >= this->getXDim() || y >= this->getYDim() || z>=this->getZDim() || c>=this->getCDim() ); @@ -506,14 +507,28 @@ void My4DImage::loadImage(char filename[]) #if defined _WIN32 b_useMylib = false; #else - if (getXWidget()) - b_useMylib = getXWidget()->getMainControlWindow()->global_setting.b_UseMylibTiff; - else - { - v3d_msg("The global setting cannot be accessed at this moment. Then use libTIFF for TIF/LSM reading in My4DImage::loadImage()."); - b_useMylib = false; - } + + bool lsmFlag = false; + bool tiffFlag = false; + QString qFilename = QString(filename); + + if (qFilename.endsWith("lsm") || qFilename.endsWith("LSM")) { + lsmFlag = true; + } else if (qFilename.endsWith("tif") || qFilename.endsWith("TIF") || qFilename.endsWith("tiff") || qFilename.endsWith("TIFF")) { + tiffFlag = true; + } + + if (lsmFlag) { + b_useMylib = true; + } else if (tiffFlag) { + b_useMylib = false; + } else if (V3dApplication::getMainWindow()) { + b_useMylib = V3dApplication::getMainWindow()->global_setting.b_UseMylibTiff; + qDebug() << "My4DImage::loadImage() set b_useMylib to value=" << b_useMylib << " based on global settings from MainWindow"; + } #endif + + qDebug() << "My4DImage::loadImage() calling Image4DSimple::loadImage() with b_useMylib=" << b_useMylib; Image4DSimple::loadImage(filename, b_useMylib); diff --git a/v3d_main/v3d/v3d.pro b/v3d_main/v3d/v3d.pro index 1f6224b9ea..2485a6b0d0 100644 --- a/v3d_main/v3d/v3d.pro +++ b/v3d_main/v3d/v3d.pro @@ -189,6 +189,33 @@ HEADERS += ../basic_c_fun/mg_utilities.h \ v3d_global_preference_dialog.h \ v3d_compile_constraints.h \ v3d_version_info.h \ + v3d_application.h \ + ../neuron_annotator/NaViewer.h \ + ../neuron_annotator/NaMainWindow.h \ + ../neuron_annotator/Na3DWidget.h \ + ../neuron_annotator/NaZStackWidget.h \ + ../neuron_annotator/NaLargeMIPWidget.h \ + ../neuron_annotator/ColorSeparatorConsolidator.h \ + ../neuron_annotator/FileTreeSearcher.h \ + ../neuron_annotator/AnnotationSession.h \ + ../neuron_annotator/NeuronMaskEntry.h \ + ../neuron_annotator/MultiColorImageStackNode.h \ + ../neuron_annotator/NeuronAnnotatorResultNode.h \ + ../neuron_annotator/TimebasedIdentifierGenerator.h \ + ../neuron_annotator/RendererNeuronAnnotator.h \ + ../neuron_annotator/GalleryButton.h \ + ../neuron_annotator/CellCounter3D.h \ + ../neuron_annotator/Vector3D.h \ + ../neuron_annotator/Rotation3D.h \ + ../neuron_annotator/CameraModel.h \ + ../neuron_annotator/GammaWidget.h \ + ../neuron_annotator/NeuronSelector.h \ + ../webservice/v3dwebservice.hpp \ + ../webservice/v3dwebserver.h \ + ../webservice/gsoap2/stdsoap2.h \ + ../webservice/soapdep/soapH.h \ + ../webservice/soapdep/soapStub.h \ + ../webservice/soapdep/soapv3dwebserverService.h \ colormap.h \ rotate_image.h \ dialog_rotate.h \ @@ -214,6 +241,7 @@ HEADERS += ../basic_c_fun/mg_utilities.h \ mainwindow.h \ DownloadManager.h \ v3d_actions.h \ + CommandManager.h \ ../worm_straighten_c/bdb_minus.h \ ../worm_straighten_c/mst_prim_c.h \ ../worm_straighten_c/bfs.h \ @@ -268,6 +296,31 @@ SOURCES += ../basic_c_fun/mg_utilities.cpp \ ../imaging/v3d_imaging.cpp \ ../multithreadimageIO/v3d_multithreadimageIO.cpp \ v3d_version_info.cpp \ + v3d_application.cpp \ + ../neuron_annotator/NaViewer.cpp \ + ../neuron_annotator/NaMainWindow.cpp \ + ../neuron_annotator/Na3DWidget.cpp \ + ../neuron_annotator/NaZStackWidget.cpp \ + ../neuron_annotator/NaLargeMIPWidget.cpp \ + ../neuron_annotator/ColorSeparatorConsolidator.cpp \ + ../neuron_annotator/FileTreeSearcher.cpp \ + ../neuron_annotator/AnnotationSession.cpp \ + ../neuron_annotator/NeuronMaskEntry.cpp \ + ../neuron_annotator/MultiColorImageStackNode.cpp \ + ../neuron_annotator/NeuronAnnotatorResultNode.cpp \ + ../neuron_annotator/TimebasedIdentifierGenerator.cpp \ + ../neuron_annotator/RendererNeuronAnnotator.cpp \ + ../neuron_annotator/GalleryButton.cpp \ + ../neuron_annotator/CellCounter3D.cpp \ + ../neuron_annotator/Vector3D.cpp \ + ../neuron_annotator/Rotation3D.cpp \ + ../neuron_annotator/CameraModel.cpp \ + ../neuron_annotator/GammaWidget.cpp \ + ../neuron_annotator/NeuronSelector.cpp \ + ../webservice/v3dwebservice.cpp \ + ../webservice/gsoap2/stdsoap2.cpp \ + ../webservice/soapdep/soapC.cpp \ + ../webservice/soapdep/soapv3dwebserverService.cpp \ main.cpp \ mainwindow.cpp \ mainwindow_interface.cpp \ @@ -288,6 +341,7 @@ SOURCES += ../basic_c_fun/mg_utilities.cpp \ atlas_viewer.cpp \ DownloadManager.cpp \ v3d_actions.cpp \ + CommandManager.cpp \ ../worm_straighten_c/bdb_minus.cpp \ ../worm_straighten_c/mst_prim_c.cpp \ ../worm_straighten_c/bfs_1root.cpp \ @@ -317,7 +371,9 @@ FORMS += landmark_property.ui \ dialog_update_list.ui \ dialog_update_options.ui \ dialog_update_downloading.ui \ - dialog_update_checking.ui + dialog_update_checking.ui \ + ../neuron_annotator/NaMainWindow.ui \ + ../neuron_annotator/GammaWidget.ui # FL_watershedSegPara.ui \ # FL_levelsetSegPara.ui @@ -325,7 +381,7 @@ RESOURCES += v3d.qrc RESOURCES += ../3drenderer/3drenderer.qrc QT += opengl QT += network -QT += xml +QT += xml svg LIBS += -L../jba/c++ diff --git a/v3d_main/v3d/v3d_application.cpp b/v3d_main/v3d/v3d_application.cpp new file mode 100644 index 0000000000..e890204b31 --- /dev/null +++ b/v3d_main/v3d/v3d_application.cpp @@ -0,0 +1,21 @@ +#include "v3d_application.h" + +MainWindow* V3dApplication::mainWindow; +NaMainWindow* V3dApplication::naMainWindow; +bool V3dApplication::mainWindowIsActive; +bool V3dApplication::naMainWindowIsActive; + +V3dApplication::V3dApplication(int & argc, char ** argv) : + QApplication(argc, argv) +{ + V3dApplication::mainWindow = new MainWindow(); + V3dApplication::mainWindowIsActive = false; + V3dApplication::naMainWindowIsActive = false; +} + +V3dApplication::~V3dApplication() { + // Assuming Qt will delete mainWindow, neuronAnnotatorMainWindow +} + + + diff --git a/v3d_main/v3d/v3d_application.h b/v3d_main/v3d/v3d_application.h new file mode 100644 index 0000000000..3389abb1b1 --- /dev/null +++ b/v3d_main/v3d/v3d_application.h @@ -0,0 +1,123 @@ +#ifndef V3D_APPLICATION_H +#define V3D_APPLICATION_H + +#include +#include +#include "mainwindow.h" +#include "../neuron_annotator/NaMainWindow.h" + +class V3dApplication : public QApplication +{ + Q_OBJECT + +private: + + static V3dApplication* theApp; + static MainWindow* mainWindow; + static NaMainWindow* naMainWindow; + static bool mainWindowIsActive; + static bool naMainWindowIsActive; + + explicit V3dApplication(int & argc, char ** argv); + + static void deactivateMainWindowHelper(QMainWindow* qMainWindow) { + if (qMainWindow!=0) { + theApp->removeEventFilter(qMainWindow); + qMainWindow->hide(); + } + } + + static void activateMainWindowHelper(QMainWindow* qMainWindow) { + if (qMainWindow!=0) { + theApp->installEventFilter(qMainWindow); + qMainWindow->show(); + } + } + +public: + ~V3dApplication(); + + static bool hasMainWindow() { + if (mainWindow==0) { + return false; + } + return true; + } + + static void handleCloseEvent(QCloseEvent* event) { + mainWindow->handleCoordinatedCloseEvent(event); + if (naMainWindow!=0) { + naMainWindow->handleCoordinatedCloseEvent(event); + } + QCoreApplication::postEvent(theApp, new QEvent(QEvent::Quit)); // this more OK + } + + static MainWindow* getMainWindow() { + return mainWindow; + } + + static NaMainWindow* getNaMainWindow() { + return naMainWindow; + } + + static void activateMainWindow() { + if (mainWindowIsActive==false) { + activateMainWindowHelper(mainWindow); + mainWindowIsActive=true; + } + if (naMainWindow!=0) { + naMainWindow->setV3DDefaultModeCheck(true); + } + mainWindow->setV3DDefaultModeCheck(true); + } + + static void deactivateMainWindow() { + if (mainWindowIsActive==true) { + deactivateMainWindowHelper(mainWindow); + mainWindowIsActive=false; + } + mainWindow->setV3DDefaultModeCheck(false); + if (naMainWindow!=0) { + naMainWindow->setV3DDefaultModeCheck(false); + } + } + + static void activateNaMainWindow() { + if (naMainWindowIsActive==false) { + if (naMainWindow==0) { + naMainWindow = new NaMainWindow(); + } + activateMainWindowHelper(naMainWindow); + naMainWindowIsActive=true; + } + naMainWindow->setNeuronAnnotatorModeCheck(true); + mainWindow->setNeuronAnnotatorModeCheck(true); + } + + static void deactivateNaMainWindow() { + if (naMainWindowIsActive==true) { + deactivateMainWindowHelper(naMainWindow); + naMainWindowIsActive=false; + } + if (naMainWindow!=0) { + naMainWindow->setNeuronAnnotatorModeCheck(false); + } + mainWindow->setNeuronAnnotatorModeCheck(false); + } + + static V3dApplication* getInstance(int & argc, char ** argv) { + if (theApp==0) { + theApp = new V3dApplication(argc, argv); + } + return theApp; + } + +signals: + +public slots: + + +}; + + +#endif // V3D_APPLICATION_H diff --git a/v3d_main/v3d/v3d_commandlineparser.h b/v3d_main/v3d/v3d_commandlineparser.h index 15748dc790..282a89d59a 100644 --- a/v3d_main/v3d/v3d_commandlineparser.h +++ b/v3d_main/v3d/v3d_commandlineparser.h @@ -38,6 +38,8 @@ Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) “Automatic reconstructi #ifndef __V3D_COMMANDLINEPARSER_H__ #define __V3D_COMMANDLINEPARSER_H__ +#include "CommandManager.h" + //#include #ifdef WIN32 #define OPTION_CHAR '/' @@ -58,17 +60,15 @@ class V3D_CL_INTERFACE } ~V3D_CL_INTERFACE(){} - - public: - vector fileList; - bool open3Dviewer; - bool openV3D; - bool clp_finished; // parsing finished - - char* pluginname; - char* pluginmethod; - - }; + + vector fileList; + vector cmdArgList; + bool open3Dviewer; + bool openV3D; + bool clp_finished; // parsing finished + char* pluginname; + char* pluginmethod; +}; // command line parser class class CLP @@ -180,7 +180,15 @@ int CLP :: parse(int argc, char *argv[], void (*help)()) } else { + bool cmdFlag=false; + for (int i=1;igetMainControlWindow()->global_setting.b_3dcurve_width_from_xyonly); //100415 + V3dApplication::getMainWindow()->global_setting.b_3dcurve_width_from_xyonly); //100415 smooth_radius(mUnit, smoothing_win_sz, false); // 090602, 090620 @@ -854,15 +855,15 @@ bool My4DImage::proj_trace_add_curve_segment(vector &mCoord, int chno) V3DLONG cur_segid = tracedNeuron.nsegs()-1; if (chno >=0) //100115, 100130: for solveCurveViews. - { - if (getXWidget()->getMainControlWindow()->global_setting.b_3dcurve_autodeform) + { + if (V3dApplication::getMainWindow()->global_setting.b_3dcurve_autodeform) proj_trace_smooth_downsample_last_traced_neuron(trace_para, cur_segid, cur_segid); bool b_use_shortestpath_rgnaroundcurve=true; //100130 if (b_use_shortestpath_rgnaroundcurve) proj_trace_shortestpath_rgnaroundcurve(trace_para, cur_segid, cur_segid); - if (getXWidget()->getMainControlWindow()->global_setting.b_3dcurve_autowidth) + if (V3dApplication::getMainWindow()->global_setting.b_3dcurve_autowidth) proj_trace_compute_radius_of_last_traced_neuron(trace_para, cur_segid, cur_segid, trace_z_thickness); } //