<commit_before>/*
 * datasetfibers.cpp
 *
 *  Created on: Jan 16, 2014
 *      Author: schurade
 */

#include "datasetfibers.h"
#include "fiberselector.h"

#include "../models.h"
#include "../loadervtk.h"

#include "../properties/propertybool.h"
#include "../properties/propertycolor.h"
#include "../properties/propertyint.h"
#include "../properties/propertyfloat.h"
#include "../properties/propertypath.h"
#include "../properties/propertystring.h"
#include "../properties/propertyselection.h"

#include "../../gui/gl/fiberrenderer.h"
#include "../../gui/gl/tuberenderer.h"

DatasetFibers::DatasetFibers( QDir filename, Fn::DatasetType type ) :
    Dataset( filename, type ),
    m_kdVerts( 0 ),
    m_renderer( 0 ),
    m_tubeRenderer( 0 ),
    m_selector( 0 ),
    m_numPoints( 0 ),
    m_numLines( 0 )
{
}

DatasetFibers::DatasetFibers( QDir filename, std::vector<Fib> fibs, QList<QString> dataNames ) :
    Dataset( filename, Fn::DatasetType::FIBERS ),
    m_fibs( fibs ),
    m_dataNames( dataNames ),
    m_kdVerts( 0 ),
    m_renderer( 0 ),
    m_tubeRenderer( 0 ),
    m_selector( 0 ),
    m_numPoints( 0 ),
    m_numLines( 0 )
{
    createProps();
    calcBoundingBox();
}

DatasetFibers::DatasetFibers( QDir filename, LoaderVTK* lv ) :
    Dataset( filename, Fn::DatasetType::FIBERS ),
    m_kdVerts( 0 ),
    m_renderer( 0 ),
    m_tubeRenderer( 0 ),
    m_selector( 0 ),
    m_numPoints( 0 ),
    m_numLines( 0 )
{
    copyFromLoader( lv );<commit_msg>fixed crash with fiber downsampling<commit_after>/*
 * datasetfibers.cpp
 *
 *  Created on: Jan 16, 2014
 *      Author: schurade
 */

#include "datasetfibers.h"
#include "fiberselector.h"

#include "../models.h"
#include "../loadervtk.h"

#include "../properties/propertybool.h"
#include "../properties/propertycolor.h"
#include "../properties/propertyint.h"
#include "../properties/propertyfloat.h"
#include "../properties/propertypath.h"
#include "../properties/propertystring.h"
#include "../properties/propertyselection.h"

#include "../../gui/gl/fiberrenderer.h"
#include "../../gui/gl/tuberenderer.h"

DatasetFibers::DatasetFibers( QDir filename, Fn::DatasetType type ) :
    Dataset( filename, type ),
    m_kdVerts( 0 ),
    m_renderer( 0 ),
    m_tubeRenderer( 0 ),
    m_selector( 0 ),
    m_numPoints( 0 ),
    m_numLines( 0 )
{
}

DatasetFibers::DatasetFibers( QDir filename, std::vector<Fib> fibs, QList<QString> dataNames ) :
    Dataset( filename, Fn::DatasetType::FIBERS ),
    m_fibs( fibs ),
    m_dataNames( dataNames ),
    m_kdVerts( 0 ),
    m_renderer( 0 ),
    m_tubeRenderer( 0 ),
    m_selector( 0 ),
    m_numPoints( 0 ),
    m_numLines( 0 )
{
    if ( fibs.size() > 0 )
    {
        int count = fibs[0].getCountDataFields();
        m_dataMins = std::vector<float>( count, 0.0f );
        m_dataMaxes = std::vector<float>( count, 1.0f );
    }
    createProps();
    calcBoundingBox();
}

DatasetFibers::DatasetFibers( QDir filename, LoaderVTK* lv ) :
    Dataset( filename, Fn::DatasetType::FIBERS ),
    m_kdVerts( 0 ),
    m_renderer( 0 ),
    m_tubeRenderer( 0 ),
    m_selector( 0 ),
    m_numPoints( 0 ),
    m_numLines( 0 )
{
    copyFromLoader( lv );
{'fraction_non_alphanumeric': 0.1608502538071066, 'fraction_numerical': 0.01713197969543147, 'mean_word_length': 3.30150068212824, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3086747', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1162, 'n_words': 228}