17 #ifndef MITK_BASE_DATA_SOURCE_H
18 #define MITK_BASE_DATA_SOURCE_H
21 #include <itkProcessObject.h>
24 #define mitkBaseDataSourceGetOutputDeclarations \
25 OutputType *GetOutput(); \
26 const OutputType *GetOutput() const; \
27 OutputType *GetOutput(DataObjectPointerArraySizeType idx); \
28 const OutputType *GetOutput(DataObjectPointerArraySizeType idx) const;
30 #define mitkBaseDataSourceGetOutputDefinitions(className) \
31 className::OutputType *className::GetOutput(void) \
33 return itkDynamicCastInDebugMode<OutputType *>(this->GetPrimaryOutput()); \
35 const className::OutputType *className::GetOutput(void) const \
37 return itkDynamicCastInDebugMode<const OutputType *>(this->GetPrimaryOutput()); \
39 className::OutputType *className::GetOutput(DataObjectPointerArraySizeType idx) \
41 OutputType *out = dynamic_cast<OutputType *>(this->ProcessObject::GetOutput(idx)); \
42 if (out == NULL && this->ProcessObject::GetOutput(idx) != NULL) \
44 itkWarningMacro(<< "Unable to convert output number " << idx << " to type " << typeid(OutputType).name()); \
48 const className::OutputType *className::GetOutput(DataObjectPointerArraySizeType idx) const \
50 const OutputType *out = dynamic_cast<const OutputType *>(this->ProcessObject::GetOutput(idx)); \
51 if (out == NULL && this->ProcessObject::GetOutput(idx) != NULL) \
53 itkWarningMacro(<< "Unable to convert output number " << idx << " to type " << typeid(OutputType).name()); \
108 GraftOutput(OutputType *output);
116 virtual
void GraftOutput(const DataObjectIdentifierType &key, OutputType *output);
127 virtual
void GraftNthOutput(
unsigned int idx, OutputType *output);
132 virtual DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override = 0;
137 virtual DataObjectPointer MakeOutput(const DataObjectIdentifierType &name) override = 0;
146 bool Updating() const;
150 virtual ~BaseDataSource();
itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
Base of all data objects.
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
#define mitkBaseDataSourceGetOutputDeclarations
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.