Loading...
Searching...
No Matches
itkNDImageTemplate.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkNDImageTemplate_h
#define itkNDImageTemplate_h
#include "itkNDImageBase.h"
#include "itkImageFileReader.h"
namespace itk
{
template <class TPixel, unsigned int VDimension>
class ITK_TEMPLATE_EXPORT NDImageTemplate : public NDImageBase<TPixel>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(NDImageTemplate);
using Self = NDImageTemplate;
using Superclass = NDImageBase<TPixel>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(NDImageTemplate, NDImageBase);
itkStaticConstMacro(Dimension, unsigned int, VDimension);
using typename Superclass::DataObjectPointer;
using typename Superclass::PixelType;
using typename Superclass::ValueType;
using typename Superclass::InternalPixelType;
using typename Superclass::AccessorType;
using typename Superclass::PixelContainer;
using typename Superclass::PixelContainerPointer;
using typename Superclass::PixelContainerConstPointer;
using typename Superclass::SpacingValueType;
using typename Superclass::PointValueType;
using typename Superclass::OffsetValueType;
using typename Superclass::IndexType;
using typename Superclass::SizeType;
using typename Superclass::SpacingType;
using typename Superclass::PointType;
using typename Superclass::OffsetType;
using ImageType = Image<TPixel, VDimension>;
using ImagePointer = typename ImageType::Pointer;
using WriterType = ImageFileWriter<ImageType>;
using WriterPointer = typename WriterType::Pointer;
using ReaderType = ImageFileReader<ImageType>;
using ReaderPointer = typename ReaderType::Pointer;
using IndexTypeD = typename ImageType::IndexType;
using SizeTypeD = typename ImageType::SizeType;
using SpacingTypeD = typename ImageType::SpacingType;
using PointTypeD = typename ImageType::PointType;
using OffsetTypeD = typename ImageType::OffsetType;
void
SetRegions(SizeType size) override;
void
SetRequestedRegion(DataObject * data) override;
void
Allocate() override;
void
Initialize() override;
void
FillBuffer(const TPixel & value) override;
void
SetPixel(const IndexType & index, const TPixel & value) override;
const TPixel &
GetPixel(const IndexType & index) const override;
TPixel &
GetPixel(const IndexType & index) override;
TPixel *
GetBufferPointer() override;
const TPixel *
GetBufferPointer() const override;
PixelContainer *
GetPixelContainer() override;
const PixelContainer *
GetPixelContainer() const override;
void
SetPixelContainer(PixelContainer * container) override;
AccessorType
GetPixelAccessor() override;
const AccessorType
GetPixelAccessor() const override;
void
SetSpacing(const SpacingType & spacing) override;
void
SetOrigin(const PointType & origin) override;
SpacingType
GetSpacing() override;
PointType
GetOrigin() override;
void
CopyInformation(const DataObject * data) override;
const OffsetValueType *
GetOffsetTable() const override;
OffsetValueType
ComputeOffset(const IndexType & ind) const override;
IndexType
ComputeIndex(OffsetValueType offset) const override;
unsigned int
ImageDimension() override;
unsigned int
GetImageDimension() override;
itkGetModifiableObjectMacro(Image, DataObject);
itkGetModifiableObjectMacro(Writer, ProcessObject);
itkGetModifiableObjectMacro(Reader, ProcessObject);
void
Write() override;
void
Read() override;
void
CreateNewImage() override;
void
SetImageIOWriter(ImageIOBase * _arg) override;
ImageIOBase *
GetImageIOWriter() override;
void
SetImageIOReader(ImageIOBase * _arg) override;
ImageIOBase *
GetImageIOReader() override;
void
SetOutputFileName(const char * name) override;
void
SetInputFileName(const char * name) override;
const char *
GetOutputFileName() override;
const char *
GetInputFileName() override;
protected:
NDImageTemplate() = default;
~NDImageTemplate() override = default;
// virtual void PrintSelf(std::ostream& os, Indent indent) const;
ImagePointer m_Image{ nullptr };
WriterPointer m_Writer{ nullptr };
ReaderPointer m_Reader{ nullptr };
template <class TIn, class TOut>
class ITK_TEMPLATE_EXPORT ConvertToDynamicArray
{
public:
static TOut
DO(const TIn & in)
{
TOut out(VDimension);
for (unsigned int i = 0; i < VDimension; ++i)
{
out[i] = in[i];
}
return out;
}
};
template <class TIn, class TOut>
class ITK_TEMPLATE_EXPORT ConvertToStaticArray
{
public:
static TOut
DO(const TIn & in)
{
TOut out;
for (unsigned int i = 0; i < VDimension; ++i)
{
out[i] = in[i];
}
return out;
}
};
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkNDImageTemplate.hxx"
#endif
#endif // end #ifndef itkNDImageTemplate_h
ImageFileWriter
ImageIOBase
itk::NDImageBase::SpacingValueType
typename Spacing2DType::ValueType SpacingValueType
Definition itkNDImageBase.h:91
itk::NDImageBase::IndexType
Array< IndexValueType > IndexType
Definition itkNDImageBase.h:100
itk::NDImageBase::SizeType
Array< SizeValueType > SizeType
Definition itkNDImageBase.h:101
itk::NDImageBase::OffsetValueType
typename ImageBase< 2 >::OffsetValueType OffsetValueType
Definition itkNDImageBase.h:93
itk::NDImageBase::PixelContainer
typename Image< TPixel, 2 >::PixelContainer PixelContainer
Definition itkNDImageBase.h:84
itk::NDImageBase::OffsetType
Array< OffsetValueType > OffsetType
Definition itkNDImageBase.h:104
itk::NDImageBase::PointType
Array< PointValueType > PointType
Definition itkNDImageBase.h:103
itk::NDImageBase::PixelContainerConstPointer
typename Image< TPixel, 2 >::PixelContainerConstPointer PixelContainerConstPointer
Definition itkNDImageBase.h:86
itk::NDImageBase::SpacingType
Array< SpacingValueType > SpacingType
Definition itkNDImageBase.h:102
itk::NDImageBase::AccessorType
typename Image< TPixel, 2 >::AccessorType AccessorType
Definition itkNDImageBase.h:83
itk::NDImageBase::NDImageBase
NDImageBase()=default
itk::NDImageBase::InternalPixelType
typename Image< TPixel, 2 >::InternalPixelType InternalPixelType
Definition itkNDImageBase.h:82
itk::NDImageBase::PointValueType
typename Point2DType::ValueType PointValueType
Definition itkNDImageBase.h:92
itk::NDImageBase::ValueType
typename Image< TPixel, 2 >::ValueType ValueType
Definition itkNDImageBase.h:81
itk::NDImageBase::DataObjectPointer
DataObject::Pointer DataObjectPointer
Definition itkNDImageBase.h:77
itk::NDImageBase::PixelContainerPointer
typename Image< TPixel, 2 >::PixelContainerPointer PixelContainerPointer
Definition itkNDImageBase.h:85
itk::NDImageTemplate::ComputeIndex
IndexType ComputeIndex(OffsetValueType offset) const override
itk::NDImageTemplate::GetOrigin
PointType GetOrigin() override
itk::NDImageTemplate::SpacingTypeD
typename ImageType::SpacingType SpacingTypeD
Definition itkNDImageTemplate.h:101
itk::NDImageTemplate::m_Image
ImagePointer m_Image
Definition itkNDImageTemplate.h:233
itk::NDImageTemplate::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Image, DataObject)
itk::NDImageTemplate::GetBufferPointer
const TPixel * GetBufferPointer() const override
itk::NDImageTemplate::IndexType
Array< IndexValueType > IndexType
Definition itkNDImageBase.h:100
itk::NDImageTemplate::SizeType
Array< SizeValueType > SizeType
Definition itkNDImageBase.h:101
itk::NDImageTemplate::SetImageIOWriter
void SetImageIOWriter(ImageIOBase *_arg) override
itk::NDImageTemplate::SetOrigin
void SetOrigin(const PointType &origin) override
itk::NDImageTemplate::m_Writer
WriterPointer m_Writer
Definition itkNDImageTemplate.h:234
itk::NDImageTemplate::SetOutputFileName
void SetOutputFileName(const char *name) override
itk::NDImageTemplate::GetPixelContainer
PixelContainer * GetPixelContainer() override
itk::NDImageTemplate::ReaderPointer
typename ReaderType::Pointer ReaderPointer
Definition itkNDImageTemplate.h:96
itk::NDImageTemplate::Write
void Write() override
itk::NDImageTemplate::FillBuffer
void FillBuffer(const TPixel &value) override
itk::NDImageTemplate::itkStaticConstMacro
itkStaticConstMacro(Dimension, unsigned int, VDimension)
itk::NDImageTemplate::OffsetValueType
typename ImageBase< 2 >::OffsetValueType OffsetValueType
Definition itkNDImageBase.h:93
itk::NDImageTemplate::PixelContainer
typename Image< TPixel, 2 >::PixelContainer PixelContainer
Definition itkNDImageBase.h:84
itk::NDImageTemplate::PointTypeD
typename ImageType::PointType PointTypeD
Definition itkNDImageTemplate.h:102
itk::NDImageTemplate::GetPixel
const TPixel & GetPixel(const IndexType &index) const override
itk::NDImageTemplate::GetPixel
TPixel & GetPixel(const IndexType &index) override
itk::NDImageTemplate::SetRegions
void SetRegions(SizeType size) override
itk::NDImageTemplate::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(NDImageTemplate)
itk::NDImageTemplate::~NDImageTemplate
~NDImageTemplate() override=default
itk::NDImageTemplate::SetPixel
void SetPixel(const IndexType &index, const TPixel &value) override
itk::NDImageTemplate::ImagePointer
typename ImageType::Pointer ImagePointer
Definition itkNDImageTemplate.h:92
itk::NDImageTemplate::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Writer, ProcessObject)
itk::NDImageTemplate::itkGetModifiableObjectMacro
itkGetModifiableObjectMacro(Reader, ProcessObject)
itk::NDImageTemplate::PointType
Array< PointValueType > PointType
Definition itkNDImageBase.h:103
itk::NDImageTemplate::GetOffsetTable
const OffsetValueType * GetOffsetTable() const override
itk::NDImageTemplate::Initialize
void Initialize() override
itk::NDImageTemplate::GetPixelAccessor
AccessorType GetPixelAccessor() override
itk::NDImageTemplate::ImageType
Image< TPixel, VDimension > ImageType
Definition itkNDImageTemplate.h:91
itk::NDImageTemplate::GetImageIOReader
ImageIOBase * GetImageIOReader() override
itk::NDImageTemplate::IndexTypeD
typename ImageType::IndexType IndexTypeD
Definition itkNDImageTemplate.h:99
itk::NDImageTemplate::GetPixelContainer
const PixelContainer * GetPixelContainer() const override
itk::NDImageTemplate::SetInputFileName
void SetInputFileName(const char *name) override
itk::NDImageTemplate::WriterType
ImageFileWriter< ImageType > WriterType
Definition itkNDImageTemplate.h:93
itk::NDImageTemplate::Allocate
void Allocate() override
itk::NDImageTemplate::WriterPointer
typename WriterType::Pointer WriterPointer
Definition itkNDImageTemplate.h:94
itk::NDImageTemplate::GetOutputFileName
const char * GetOutputFileName() override
itk::NDImageTemplate::CreateNewImage
void CreateNewImage() override
itk::NDImageTemplate::NDImageTemplate
NDImageTemplate()=default
itk::NDImageTemplate::SpacingType
Array< SpacingValueType > SpacingType
Definition itkNDImageBase.h:102
itk::NDImageTemplate::AccessorType
typename Image< TPixel, 2 >::AccessorType AccessorType
Definition itkNDImageBase.h:83
itk::NDImageTemplate::Pointer
SmartPointer< Self > Pointer
Definition itkNDImageTemplate.h:53
itk::NDImageTemplate::SetRequestedRegion
void SetRequestedRegion(DataObject *data) override
itk::NDImageTemplate::GetPixelAccessor
const AccessorType GetPixelAccessor() const override
itk::NDImageTemplate::Self
NDImageTemplate Self
Definition itkNDImageTemplate.h:51
itk::NDImageTemplate::ReaderType
ImageFileReader< ImageType > ReaderType
Definition itkNDImageTemplate.h:95
itk::NDImageTemplate::Superclass
NDImageBase< TPixel > Superclass
Definition itkNDImageTemplate.h:52
itk::NDImageTemplate::GetImageDimension
unsigned int GetImageDimension() override
itk::NDImageTemplate::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkNDImageTemplate.h:54
itk::NDImageTemplate::SetPixelContainer
void SetPixelContainer(PixelContainer *container) override
itk::NDImageTemplate::Read
void Read() override
itk::NDImageTemplate::ImageDimension
unsigned int ImageDimension() override
itk::NDImageTemplate::SetImageIOReader
void SetImageIOReader(ImageIOBase *_arg) override
itk::NDImageTemplate::GetSpacing
SpacingType GetSpacing() override
itk::NDImageTemplate::GetBufferPointer
TPixel * GetBufferPointer() override
itk::NDImageTemplate::SetSpacing
void SetSpacing(const SpacingType &spacing) override
itk::NDImageTemplate::OffsetTypeD
typename ImageType::OffsetType OffsetTypeD
Definition itkNDImageTemplate.h:103
itk::NDImageTemplate::m_Reader
ReaderPointer m_Reader
Definition itkNDImageTemplate.h:235
itk::NDImageTemplate::GetImageIOWriter
ImageIOBase * GetImageIOWriter() override
itk::NDImageTemplate::SizeTypeD
typename ImageType::SizeType SizeTypeD
Definition itkNDImageTemplate.h:100
itk::NDImageTemplate::GetInputFileName
const char * GetInputFileName() override
itk::NDImageTemplate::CopyInformation
void CopyInformation(const DataObject *data) override
itk::NDImageTemplate::ComputeOffset
OffsetValueType ComputeOffset(const IndexType &ind) const override
itkNDImageBase.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |