Exemplo n.º 1
0
SingleParticle2dx::DataStructures::Particle::Particle (Particle const& rhs)
{
	m_fourier_data.reset ( new fft_array_type( *(rhs.m_fourier_data.get())) );
	
	m_orientation_original =rhs.m_orientation_original;
	m_orientation_new = rhs.m_orientation_new;
	m_orientation_old = rhs.m_orientation_old;
	m_global_information = rhs.m_global_information;
	m_class_information = rhs.m_class_information;
	m_ctf_information = rhs.m_ctf_information;
	m_optimal_shift = rhs.m_optimal_shift;
	m_use_for_reconstruction = rhs.m_use_for_reconstruction;
	m_sim_measure = rhs.m_sim_measure;
	m_qual = rhs.m_qual;
	m_consistency = rhs.m_consistency;
	m_weight = rhs.m_weight;
	m_neighbors = rhs.m_neighbors;
	m_distances = rhs.m_distances;
	m_force_dont_use = rhs.m_force_dont_use;
	m_container_number = rhs.m_container_number;
	m_reject_tree_alignment = rhs.m_reject_tree_alignment;
	m_reject_tree_splitting = rhs.m_reject_tree_splitting;
	m_is_cm_particle = rhs.m_is_cm_particle;
	
	setupFromConfig();
}
Exemplo n.º 2
0
SingleParticle2dx::DataStructures::Projection2d::Projection2d (Projection2d const& rhs)
 : m_orientation ( rhs.m_orientation )
{
	m_fourier_data.reset ( new fft_array_type(*(rhs.m_fourier_data.get())) );
	
	setupFromConfig();
}
Exemplo n.º 3
0
SingleParticle2dx::DataStructures::Projection2d::Projection2d (size_type size_x, size_type size_y, SingleParticle2dx::DataStructures::Orientation o)
 : m_orientation ( o )
{
	m_fourier_data.reset ( new fft_array_type(boost::extents[size_x][size_y]) ),
	SingleParticle2dx::DataStructures::Abstract2dData::resetData();
	
	setupFromConfig();
}
Exemplo n.º 4
0
SingleParticle2dx::DataStructures::Projection2d::Projection2d ()
 : m_orientation ( SingleParticle2dx::DataStructures::Orientation() )
{
	m_fourier_data.reset ( new fft_array_type(boost::extents[1][1]) );
	SingleParticle2dx::DataStructures::Abstract2dData::resetData();
	
	setupFromConfig();
}
Exemplo n.º 5
0
SingleParticle2dx::DataStructures::Particle::Particle (size_type size_x, size_type size_y)
 : m_orientation_original ( SingleParticle2dx::DataStructures::Orientation() ),
   m_orientation_new ( SingleParticle2dx::DataStructures::Orientation() ),
   m_orientation_old ( SingleParticle2dx::DataStructures::Orientation() ),
   m_global_information ( SingleParticle2dx::DataStructures::GlobalParticleInformation() ),
   m_class_information ( SingleParticle2dx::DataStructures::ClassInformation() ),
   m_ctf_information ( SingleParticle2dx::DataStructures::CTFParticleInformation() ),
   m_optimal_shift ( SingleParticle2dx::DataStructures::ParticleShift() ),
   m_use_for_reconstruction ( true ),
   m_sim_measure ( value_type(0) ),
   m_qual ( value_type(1) ),
   m_consistency ( value_type(1) ),
   m_weight ( value_type(1) ),
   m_force_dont_use( false ),
   m_container_number( size_type(0) ),
   m_reject_tree_alignment(false),
   m_reject_tree_splitting(false),
   m_is_cm_particle(false)
{
	m_fourier_data.reset ( new fft_array_type(boost::extents[size_x][size_y]) );
	SingleParticle2dx::DataStructures::Abstract2dData::resetData();
	
	setupFromConfig();
}
Exemplo n.º 6
0
UseOrnamentDialog::UseOrnamentDialog(QWidget *parent,
                                     Composition *composition) :
        QDialog(parent),
        m_composition(composition)
{
    setModal(true);
    setWindowTitle(tr("Use Ornament"));
    QGridLayout *metagrid = new QGridLayout;
    setLayout(metagrid);
    QWidget *vbox = new QWidget(this);
    QVBoxLayout *vboxLayout = new QVBoxLayout;
    metagrid->addWidget(vbox, 0, 0);


    QLabel *label;

    QGroupBox *notationBox = new QGroupBox(tr("Notation"));
    vboxLayout->addWidget(notationBox);

    notationBox->setContentsMargins(5, 5, 5, 5);
    QGridLayout *layout = new QGridLayout;
    layout->setSpacing(5);

    label = new QLabel(tr("Display as:  "));
    layout->addWidget(label, 0, 0);

    m_mark = new QComboBox;
    layout->addWidget(m_mark, 0, 1);

    m_marks.push_back(Marks::Trill);
    m_marks.push_back(Marks::LongTrill);
    m_marks.push_back(Marks::TrillLine);
    m_marks.push_back(Marks::Turn);
    m_marks.push_back(Marks::Mordent);
    m_marks.push_back(Marks::MordentInverted);
    m_marks.push_back(Marks::MordentLong);
    m_marks.push_back(Marks::MordentLongInverted);

    const QString markLabels[] = {
                                     tr("Trill"), tr("Trill with line"), tr("Trill line only"),
                                     tr("Turn"), tr("Mordent"), tr("Inverted mordent"),
                                     tr("Long mordent"), tr("Long inverted mordent"),
                                 };

    for (size_t i = 0; i < m_marks.size(); ++i) {
        m_mark->addItem(NotePixmapFactory::makeMarkMenuPixmap(m_marks[i]),
                        markLabels[i]);
    }
    m_mark->addItem(tr("Text mark"));

    connect(m_mark, SIGNAL(activated(int)), this, SLOT(slotMarkChanged(int)));

    m_textLabel = new QLabel(tr("   Text:  "));
    layout->addWidget(m_textLabel, 0, 2);

    m_text = new LineEdit;
    layout->addWidget(m_text, 0, 3);
    notationBox->setLayout(layout);

    QGroupBox *performBox = new QGroupBox(tr("Performance"));
    vboxLayout->addWidget(performBox);
    vbox->setLayout(vboxLayout);

    performBox->setContentsMargins(5, 5, 5, 5);
    layout = new QGridLayout;
    layout->setSpacing(5);

    label = new QLabel(tr("Perform using triggered segment: "));
    layout->addWidget(label, 0, 0);

    m_ornament = new QComboBox;
    layout->addWidget(m_ornament, 0, 1);

    int n = 1;
    for (Composition::triggersegmentcontaineriterator i =
                m_composition->getTriggerSegments().begin();
            i != m_composition->getTriggerSegments().end(); ++i) {
        m_ornament->addItem
        (QString("%1. %2").arg(n++).arg(strtoqstr((*i)->getSegment()->getLabel())));
    }

    label = new QLabel(tr("Perform with timing: "));
    layout->addWidget(label, 1, 0);

    m_adjustTime = new QComboBox;
    layout->addWidget(m_adjustTime, 1, 1);

    m_adjustTime->addItem(tr("As stored"));
    m_adjustTime->addItem(tr("Truncate if longer than note"));
    m_adjustTime->addItem(tr("End at same time as note"));
    m_adjustTime->addItem(tr("Stretch or squash segment to note duration"));

    m_retune = new QCheckBox(tr("Adjust pitch to note"));
    m_retune->setChecked(true);

    layout->addWidget(m_retune, 2, 1);
    performBox->setLayout(layout);

    setupFromConfig();

    QDialogButtonBox *buttonBox
        = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
    metagrid->addWidget(buttonBox, 1, 0);
    metagrid->setRowStretch(0, 10);
    connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
}