Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions v3d_main/3drenderer/v3dr_control_signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1270,6 +1270,20 @@ void V3dR_MainWindow::initVolumeCutRange()
{
if (! glWidget) return;

// disable the connections before initialization, otherwise may crash --ZZH 2020/3/27
if (xcmaxSlider) {
disconnect(glWidget, SIGNAL(changeXCut1(int)), xcmaxSlider, SLOT(setValue(int)));
disconnect(xcmaxSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setXCut1(int)));
}
if (ycmaxSlider) {
disconnect(glWidget, SIGNAL(changeYCut1(int)), ycmaxSlider, SLOT(setValue(int)));
disconnect(ycmaxSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setYCut1(int)));
}
if (zcmaxSlider) {
disconnect(glWidget, SIGNAL(changeZCut1(int)), zcmaxSlider, SLOT(setValue(int)));
disconnect(zcmaxSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setZCut1(int)));
}

int d1, d2, d3;
d1 = MAX(0, glWidget->dataDim1()-1);
d2 = MAX(0, glWidget->dataDim2()-1);
Expand Down Expand Up @@ -1331,6 +1345,20 @@ void V3dR_MainWindow::initVolumeCutRange()
zCSSlider->setMaximum(d3);
zCSSlider->setValue((zCSSlider->minimum()+zCSSlider->maximum())/2);
}
// reenable the connections --ZZH 2020/3/27
if (xcmaxSlider) {
connect(glWidget, SIGNAL(changeXCut1(int)), xcmaxSlider, SLOT(setValue(int)));
connect(xcmaxSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setXCut1(int)));
}
if (ycmaxSlider) {
connect(glWidget, SIGNAL(changeYCut1(int)), ycmaxSlider, SLOT(setValue(int)));
connect(ycmaxSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setYCut1(int)));
}

if (zcmaxSlider) {
connect(glWidget, SIGNAL(changeZCut1(int)), zcmaxSlider, SLOT(setValue(int)));
connect(zcmaxSlider, SIGNAL(valueChanged(int)), glWidget, SLOT(setZCut1(int)));
}
}

void V3dR_MainWindow::initSurfaceCutRange()
Expand Down
6 changes: 3 additions & 3 deletions v3d_main/basic_c_fun/basic_surf_objs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ bool writeMarker_file(const QString & filename, const QList <ImageMarker> & list
{
//then save
p_pt = (ImageMarker *)(&(listMarker.at(i)));
fprintf(fp, "%5.3f, %5.3f, %5.3f, %d, %d, %s, %s, %d,%d,%d\n",
fprintf(fp, "%5.3f, %5.3f, %5.3f, %5.3f, %d, %s, %s, %d,%d,%d\n",
// 090617 RZC: marker file is 1-based
p_pt->x,
p_pt->y,
p_pt->z,
int(p_pt->radius), p_pt->shape,
p_pt->radius, p_pt->shape,
qPrintable(p_pt->name), qPrintable(p_pt->comment),
p_pt->color.r,p_pt->color.g,p_pt->color.b);
}
Expand All @@ -300,7 +300,7 @@ NeuronTree readSWC_file(const QString& filename)

int count = 0;
QList <NeuronSWC> listNeuron;
QHash <int, int> hashNeuron;
QHash <int, int> hashNeuron;
listNeuron.clear();
hashNeuron.clear();
QString name = "";
Expand Down
2 changes: 1 addition & 1 deletion v3d_main/basic_c_fun/basic_surf_objs.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ struct LabelSurf : public BasicSurfObj
struct NeuronTree : public BasicSurfObj
{
QList <NeuronSWC> listNeuron;
QHash <int, int> hashNeuron;
QHash <int, int> hashNeuron;
QString file;
bool editable;
int linemode; //local control if a neuron will displayed as line or tube mode(s). by PHC 20130926
Expand Down
7 changes: 6 additions & 1 deletion v3d_main/terafly/src/control/CAnnotations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,12 @@ QHash<V3DLONG, V3DLONG> getUniqueLUT(QList<NeuronSWC> &neurons)
cur_id++;
}
else{
LUT.insertMulti(neurons.at(i).n, LUT.value(neurons.at(j).n));
if(neurons.at(i).parent<0||neurons.at(j).parent<0)
LUT.insertMulti(neurons.at(i).n, LUT.value(neurons.at(j).n));
else{
LUT.insertMulti(neurons.at(i).n, cur_id);
cur_id++;
}
}

}
Expand Down
2 changes: 1 addition & 1 deletion v3d_main/v3d/v3d_version_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Peng, H, Ruan, Z., Atasoy, D., and Sternson, S. (2010) “Automatic reconstructi
namespace v3d {
// Set current version here.

VersionInfo thisVersionOfV3D("4.001");
VersionInfo thisVersionOfV3D("4.002");

QString versionnumber = "Vaa3D (3D Visualization-Assisted Analysis) (" +
thisVersionOfV3D.toQString() +
Expand Down