<commit_before>#include "VectorFieldRenderer.hpp"
#include <FAST/Data/Image.hpp>
#include <FAST/Data/Mesh.hpp>

namespace fast {

VectorFieldRenderer::VectorFieldRenderer() {
    createInputPort<Image>(0, false);
}

void VectorFieldRenderer::execute() {
    std::unique_lock<std::mutex> lock(mMutex);
    if(mStop) {
        return;
    }

    // Check if current images has not been rendered, if not wait
    while(!mHasRendered) {
        mRenderedCV.wait(lock);
    }
    std::unordered_map<uint, SpatialDataObject::pointer> vectorImages;
    // This simply gets the input data for each connection and puts it into a data structure
    for(uint inputNr = 0; inputNr < getNrOfInputConnections(); inputNr++) {
        if(hasNewInputData(inputNr)) {
            SpatialDataObject::pointer input = getInputData<SpatialDataObject>(inputNr);

            mHasRendered = false;
            vectorImages[inputNr] = input;
        }
    }

    // Convert data to mesh
    for(uint inputNr = 0; inputNr < getNrOfInputConnections(); inputNr++) {
        Image::pointer image = std::dynamic_pointer_cast<Image>(vectorImages[inputNr]);
        auto imageAccess = image->getImageAccess(ACCESS_READ);
        std::vector<MeshVertex> vertices;
        std::vector<MeshLine> lines;<commit_msg>fixed issue with vector field renderer missing disabled mode<commit_after>#include "VectorFieldRenderer.hpp"
#include <FAST/Data/Image.hpp>
#include <FAST/Data/Mesh.hpp>

namespace fast {

VectorFieldRenderer::VectorFieldRenderer() {
    createInputPort<Image>(0, false);
}

void VectorFieldRenderer::execute() {
    std::unique_lock<std::mutex> lock(mMutex);
    if(m_disabled)
        return;
    if(mStop) {
        return;
    }

    // Check if current images has not been rendered, if not wait
    while(!mHasRendered && m_synchedRendering) {
        mRenderedCV.wait(lock);
    }
    std::unordered_map<uint, SpatialDataObject::pointer> vectorImages;
    // This simply gets the input data for each connection and puts it into a data structure
    for(uint inputNr = 0; inputNr < getNrOfInputConnections(); inputNr++) {
        if(hasNewInputData(inputNr)) {
            SpatialDataObject::pointer input = getInputData<SpatialDataObject>(inputNr);

            mHasRendered = false;
            vectorImages[inputNr] = input;
        }
    }

    // Convert data to mesh
    for(uint inputNr = 0; inputNr < getNrOfInputConnections(); inputNr++) {
        Image::pointer image = std::dynamic_pointer_cast<Image>(vectorImages[inputNr]);
        auto imageAccess = image->getImageAccess(ACCESS_READ);
        std::vector<MeshVertex> vertices;
        std::vector<MeshLine> lines;
{'fraction_non_alphanumeric': 0.1115702479338843, 'fraction_numerical': 0.002253944402704733, 'mean_word_length': 3.552136752136752, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '6890250', 'n_tokens_mistral': 810, 'n_tokens_neox': 799, 'n_words': 176}