[OpenWalnut-Dev] Display results from module output

Frank Zisko frank.zisko at gmx.net
Tue Feb 19 11:47:12 CET 2013


Hi,

I develop some modules for OW main application. My modules compile
without errors. But they work not as I want them to work.

For example I have a file reader for fiber data. After reading the file
there is no graphical output in the main window. I can connect other
modules (for example "Fiber Disply Simple").

My file reader for scalar data (anatomical 3d data set) has the same
problem, and also other modules, witch produce new output. I can connect
with other modules, but my ones does not display any data.

I've read code in "Data Module", "Dataset Manipulator" and others. I
don't get any solution. What can I do, to get graphical output?


Best Regards,

Frank



----------------------------------------
CODE EXAMPLE
----------------------------------------
WMReadFiberA.h
[...]

private:

    virtual boost::shared_ptr< WDataSet > readFiberA( std::string
fileName );

    boost::shared_ptr< WDataSet > m_dataSet;
    boost::shared_ptr< WModuleOutputData < WDataSet > > m_output;
    boost::shared_ptr< WCondition > m_propCondition;
    WPropTrigger  m_readTriggerProp;
    WPropFilename m_inputFilename;


----------------------------------------
WMReadFiberA.cpp
[...]

void WMReadFiberA::moduleMain()
{
    m_moduleState.setResetable( true, true );
    m_moduleState.add( m_propCondition );

    ready();
    while( !m_shutdownFlag() )
    {
        m_moduleState.wait();
        if( m_shutdownFlag() )
        {
            break;
        }

        m_readTriggerProp->set( WPVBaseTypes::PV_TRIGGER_READY, false );

	// Read file.
	debugLog() << "Loading data from \"" << m_inputFilename->get().string()
<< "\".";
	    m_dataSet = readFiberA( m_inputFilename->get().string() );


        // Update output.
        m_output->updateData( m_dataSet );
        //ready();//test if this do something...
        m_readTriggerProp->set( WPVBaseTypes::PV_TRIGGER_READY, true );
    }
}


----------------------------------------





More information about the OpenWalnut-Dev mailing list