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

#include <inviwo/core/ports/imageport.h>

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

Public Member Functions

 BaseImageInport (BaseImageInport &&)=delete
 
 BaseImageInport (const BaseImageInport &)=delete
 
 BaseImageInport (std::string_view identifier, bool outportDeterminesSize)
 
 BaseImageInport (std::string_view identifier, Document help={}, OutportDeterminesSize value=OutportDeterminesSize::No)
 
virtual std::string_view getClassIdentifier () const override
 
virtual std::shared_ptr< const ImagegetData () const override
 
virtual Document getInfo () const override
 
virtual std::vector< std::pair< Outport *, std::shared_ptr< const Image > > > getSourceVectorData () const override
 
virtual std::vector< std::shared_ptr< const Image > > getVectorData () const override
 
virtual bool hasData () const override
 
bool isOutportDeterminingSize () const
 
BaseImageInportoperator= (BaseImageInport &&)=delete
 
BaseImageInportoperator= (const BaseImageInport &)=delete
 
void setOutportDeterminesSize (bool outportDeterminesSize)
 
void setOutportDeterminesSize (OutportDeterminesSize outportDeterminesSize)
 
- Public Member Functions inherited from inviwo::DataInport< T, N, Flat >
iterator begin () const noexcept
 
virtual bool canConnectTo (const Port *port) const override
 
virtual void connectTo (Outport *port) override
 
 DataInport (const DataInport &)=delete
 
 DataInport (DataInport &&)=delete
 
 DataInport (std::string_view identifier, Document help={})
 
virtual void disconnectFrom (Outport *outport) override
 
iterator end () const noexcept
 
virtual uvec3 getColorCode () const override
 
OutportgetConnectedOutport () const
 
virtual OutportgetConnectedOutport (size_t i) const override
 
virtual OutportgetConnectedOutport (size_t i) const=0
 
virtual DataInfo getDataInfo () const override
 
virtual size_t getMaxNumberOfConnections () const override
 
virtual size_t getNumberOfConnections () const override
 
virtual bool isConnected () const override
 
DataInportoperator= (const DataInport &)=delete
 
DataInportoperator= (DataInport &&)=delete
 
- Public Member Functions inherited from inviwo::Inport
OutportgetConnectedOutport () const
 
auto getConnectedOutports () const
 
virtual bool isChanged () const
 
virtual bool isConnectedTo (const Outport *outport) const
 
bool isOptional () const
 
virtual bool isReady () const override
 
const BaseCallBack * onChange (std::function< void()> lambda)
 
std::shared_ptr< std::function< void()> > onChangeScoped (std::function< void()> lambda)
 
const BaseCallBack * onConnect (std::function< void()> lambda)
 
std::shared_ptr< std::function< void()> > onConnectScoped (std::function< void()> lambda)
 
const BaseCallBack * onDisconnect (std::function< void()> lambda)
 
std::shared_ptr< std::function< void()> > onDisconnectScoped (std::function< void()> lambda)
 
virtual void propagateEvent (Event *event, Outport *target=nullptr)
 
void readyUpdate ()
 
void removeOnChange (const BaseCallBack *callback)
 
void removeOnConnect (const BaseCallBack *callback)
 
void removeOnDisconnect (const BaseCallBack *callback)
 
void setIsReadyUpdater (std::function< bool()> updater)
 
void setOptional (bool optional)
 
- Public Member Functions inherited from inviwo::Port
virtual void deserialize (Deserializer &d) override
 
DocumentgetHelp ()
 
const DocumentgetHelp () const
 
const std::string & getIdentifier () const
 
std::string getPath () const
 Get the port path i.e. <processor identifier>.<port identifier>
 
void getPath (std::pmr::string &out) const
 
ProcessorgetProcessor () const
 
Portoperator= (const Port &)=delete
 
Portoperator= (Port &&)=delete
 
 Port (const Port &)=delete
 
 Port (Port &&)=delete
 
virtual void serialize (Serializer &s) const override
 
PortsetHelp (Document help)
 
void setIdentifier (const std::string &name)
 

Additional Inherited Members

- Public Types inherited from inviwo::DataInport< T, N, Flat >
using iterator = std::conditional_t<Flat, FlatInportIterator<T>, RegularInportIterator<T>>
 
using type = T
 
using value_type = std::shared_ptr<const T>
 
- Public Attributes inherited from inviwo::Inport
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)
 
- Static Public Attributes inherited from inviwo::DataInport< T, N, Flat >
static constexpr bool flattenData = Flat
 
static constexpr size_t maxConnections = N
 
- Protected Member Functions inherited from inviwo::Inport
void callOnChangeIfChanged () const
 
bool circularConnection (const Port *port) const
 
void doConnectTo (Outport *outport)
 
void doDisconnectFrom (Outport *outport)
 
 Inport (std::string_view identifier, Document help)
 
virtual void invalidate (InvalidationLevel invalidationLevel)
 
virtual void setChanged (bool changed)
 
- Protected Member Functions inherited from inviwo::Port
 Port (std::string_view identifier, Document help)
 
void setProcessor (Processor *processor)
 
- Static Protected Member Functions inherited from inviwo::Inport
static Document getDefaultPortInfo (const Inport *port, std::string_view portname)
 
- Protected Attributes inherited from inviwo::DataInport< T, N, Flat >
std::vector< DataOutportInterface< T > * > outports_
 
- Protected Attributes inherited from inviwo::Inport
StateCoordinator< bool > isOptional_
 
StateCoordinator< bool > isReady_
 
- Protected Attributes inherited from inviwo::Port
Document help_
 
std::string identifier_
 
Processorprocessor_
 

Detailed Description

template<size_t N = 1>
class inviwo::BaseImageInport< N >

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_view inviwo::BaseImageInport< N >::getClassIdentifier ( ) const
overridevirtual

Reimplemented from inviwo::DataInport< T, N, Flat >.

◆ getData()

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

Reimplemented from inviwo::DataInport< T, N, Flat >.

◆ 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< T, N, Flat >.

◆ 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< T, N, Flat >.

◆ getVectorData()

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

Reimplemented from inviwo::DataInport< T, N, Flat >.

◆ hasData()

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

Reimplemented from inviwo::DataInport< T, N, Flat >.


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