Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::BaseImageInport< size_t > Class Template Reference

#include <imageport.h>

+ Inheritance diagram for inviwo::BaseImageInport< size_t >:

Public Member Functions

 BaseImageInport (std::string_view identifier, Document help={}, OutportDeterminesSize value=OutportDeterminesSize::No)
 
 BaseImageInport (std::string_view identifier, bool outportDeterminesSize)
 
virtual std::string getClassIdentifier () const override
 
virtual std::shared_ptr< const ImagegetData () const override
 
virtual std::vector< std::shared_ptr< const Image > > getVectorData () const override
 
virtual std::vector< std::pair< Outport *, std::shared_ptr< const Image > > > getSourceVectorData () const override
 
virtual bool isOutportDeterminingSize () const override
 
virtual void setOutportDeterminesSize (bool outportDeterminesSize) override
 
void setOutportDeterminesSize (OutportDeterminesSize outportDeterminesSize)
 
void passOnDataToOutport (ImageOutport *outport) const
 
virtual Document getInfo () const override
 
bool hasData () const override
 
- Public Member Functions inherited from inviwo::DataInport< Image, N >
 DataInport (std::string_view identifier, Document help={})
 
virtual uvec3 getColorCode () const override
 
virtual size_t getMaxNumberOfConnections () const override
 
virtual bool canConnectTo (const Port *port) const override
 
virtual void connectTo (Outport *port) override
 
virtual bool isConnected () const override
 
- Public Member Functions inherited from inviwo::Inport
virtual bool isReady () const override
 
void setOptional (bool optional)
 
bool isOptional () const
 
virtual bool isChanged () const
 
virtual void disconnectFrom (Outport *outport)
 
virtual bool isConnectedTo (const Outport *outport) const
 
virtual OutportgetConnectedOutport () const
 
virtual const std::vector< Outport * > & getConnectedOutports () const
 
virtual size_t getNumberOfConnections () const
 
virtual const std::vector< const Outport * > & getChangedOutports () const
 
virtual void propagateEvent (Event *event, Outport *target=nullptr)
 
const BaseCallBack * onChange (std::function< void()> lambda)
 
std::shared_ptr< std::function< void()> > onChangeScoped (std::function< void()> lambda)
 
const BaseCallBack * onInvalid (std::function< void()> lambda)
 
std::shared_ptr< std::function< void()> > onInvalidScoped (std::function< void()> lambda)
 
const BaseCallBack * onConnect (std::function< void()> lambda)
 
const BaseCallBack * onDisconnect (std::function< void()> lambda)
 
std::shared_ptr< std::function< void()> > onConnectScoped (std::function< void()> lambda)
 
std::shared_ptr< std::function< void()> > onDisconnectScoped (std::function< void()> lambda)
 
std::shared_ptr< std::function< void(Outport *)> > onConnectScoped (std::function< void(Outport *)> lambda)
 
std::shared_ptr< std::function< void(Outport *)> > onDisconnectScoped (std::function< void(Outport *)> lambda)
 
void removeOnChange (const BaseCallBack *callback)
 
void removeOnInvalid (const BaseCallBack *callback)
 
void removeOnConnect (const BaseCallBack *callback)
 
void removeOnDisconnect (const BaseCallBack *callback)
 
void readyUpdate ()
 
void setIsReadyUpdater (std::function< bool()> updater)
 
- Public Member Functions inherited from inviwo::Port
 Port (const Port &)=delete
 
Portoperator= (const Port &)=delete
 
 Port (Port &&)=delete
 
Portoperator= (Port &&)=delete
 
const std::string & getIdentifier () const
 
void setIdentifier (const std::string &name)
 
ProcessorgetProcessor () const
 
std::string getPath () const
 Get the port path i.e. <processor identifier>.<port identifier>
 
const DocumentgetHelp () const
 
DocumentgetHelp ()
 
PortsetHelp (Document help)
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 
- Public Member Functions inherited from inviwo::Serializable
- Public Member Functions inherited from inviwo::InportIterable< DataInport< Image, N, false >, Image, false >
util::iter_range< const_iterator_port > outportAndData () const
 
util::iter_range< const_iterator_changed > changedAndData () const
 
const_iterator begin () const
 
const_iterator end () const
 
- Public Member Functions inherited from inviwo::ImagePortBase

Additional Inherited Members

- Public Types inherited from inviwo::DataInport< Image, N >
using type
 
using value_type
 
- Static Public Attributes inherited from inviwo::DataInport< Image, N >
static constexpr bool flattenData
 
static constexpr size_t maxConnections
 
- Protected Member Functions inherited from inviwo::Inport
 Inport (std::string_view identifier, Document help)
 
bool circularConnection (const Port *port) const
 
virtual void invalidate (InvalidationLevel invalidationLevel)
 
virtual void setValid (const Outport *source)
 
virtual void setChanged (bool changed=true, const Outport *source=nullptr)
 
void callOnChangeIfChanged () const
 
- Protected Member Functions inherited from inviwo::Port
 Port (std::string_view identifier, Document help)
 
void setProcessor (Processor *processor)
 
- Protected Attributes inherited from inviwo::Inport
StateCoordinator< bool > isReady_
 
StateCoordinator< bool > isOptional_
 
std::vector< Outport * > connectedOutports_
 
- Protected Attributes inherited from inviwo::Port
std::string identifier_
 
Processorprocessor_
 
Document help_
 

Detailed Description

template<size_t>
class inviwo::BaseImageInport< size_t >

BaseImageInport extends DataInport<Image> with extra functionality for handing ResizeEvents. The following table explains the behaviors:

*                                                 ImageOutport
*                                           isHandlingResizeEvents()
*
*                               True (default)                          False
*                    ┌──────────────────────────────────┬──────────────────────────────────┐
*                    │ Outport::Size = max(Inports      │ Outport::Size = Outport::size    │
*                    │ requested sizes)                 │ (no resize of data)              │
*                    │ (resize the data in the outport  │                                  │
*             False  │ if needed)                       │                                  │
*           (default)│                                  │                                  │
*                    │ Inport::Size = Inport requested  │ Inport::Size = Inport requested  │
*                    │ size                             │ size                             │
*  ImageInport       │ (return a resized copy if        │ (return a resized copy if        │
*                    │ needed)                          │ needed)                          │
*   isOutport-       │                                  │                                  │
*  Determining-      ├──────────────────────────────────┼──────────────────────────────────┤
*     Size()         │ Outport::Size = max(all inports  │ Outport::Size = Outport::Size    │
*                    │ requested sizes)                 │ (no resize of data)              │
*                    │ (resize the data in the outport  │                                  │
*              True  │ if needed)                       │                                  │
*                    │                                  │                                  │
*                    │ Inport::Size = Outport::size     │ Inport::Size = Outport::size     │
*                    │ (no copy)                        │ (no copy)                        │
*                    │                                  │                                  │
*                    │                                  │                                  │
*                    └──────────────────────────────────┴──────────────────────────────────┘
* 
See also
ImageOutport
ResizeEvent

Member Function Documentation

◆ getClassIdentifier()

template<size_t N>
std::string inviwo::BaseImageInport< N >::getClassIdentifier ( ) const
overridevirtual

Reimplemented from inviwo::DataInport< Image, N >.

◆ getData()

template<size_t N>
std::shared_ptr< const Image > inviwo::BaseImageInport< N >::getData ( ) const
overridevirtual

Reimplemented from inviwo::DataInport< Image, N >.

◆ getInfo()

template<size_t N>
Document inviwo::BaseImageInport< N >::getInfo ( ) const
overridevirtual

This function should describe the state of the port and the data it holds. Derived ports should extend this function and add information about their state. The port help is usually included in this information. The description is usually shown as a tooltip in the GUI.

Reimplemented from inviwo::DataInport< Image, N >.

◆ getSourceVectorData()

template<size_t N>
std::vector< std::pair< Outport *, std::shared_ptr< const Image > > > inviwo::BaseImageInport< N >::getSourceVectorData ( ) const
overridevirtual

Reimplemented from inviwo::DataInport< Image, N >.

◆ getVectorData()

template<size_t N>
std::vector< std::shared_ptr< const Image > > inviwo::BaseImageInport< N >::getVectorData ( ) const
overridevirtual

Reimplemented from inviwo::DataInport< Image, N >.

◆ hasData()

template<size_t N>
bool inviwo::BaseImageInport< N >::hasData ( ) const
overridevirtual

Reimplemented from inviwo::DataInport< Image, N >.

◆ isOutportDeterminingSize()

template<size_t N>
bool inviwo::BaseImageInport< N >::isOutportDeterminingSize ( ) const
overridevirtual

Implements inviwo::ImagePortBase.

◆ setOutportDeterminesSize()

template<size_t N>
void inviwo::BaseImageInport< N >::setOutportDeterminesSize ( bool outportDeterminesSize)
overridevirtual

Implements inviwo::ImagePortBase.


The documentation for this class was generated from the following files: