24 #if defined(__GNUC__) || defined(__clang__)
25 #pragma GCC diagnostic push
26 #pragma GCC diagnostic ignored "-Wunused-parameter"
28 #pragma GCC diagnostic pop
34 #include "OTBImageBaseExport.h"
40 template <
class ImageType>
43 typename ImageType::SpacingType spacing = input->GetSpacing();
44 typename ImageType::DirectionType direction = input->GetDirection();
45 for (
unsigned int i = 0; i < ImageType::ImageDimension; i++)
47 spacing[i] *= direction[i][i];
52 template <
class InputImage,
typename SpacingType>
56 typename InputImage::DirectionType direction = input->GetDirection();
57 for (
unsigned int i = 0; i < InputImage::ImageDimension; i++)
62 if (direction[i][i] > 0)
64 for (
unsigned int j = 0; j < InputImage::ImageDimension; j++)
66 direction[j][i] = -direction[j][i];
69 spacing[i] = -spacing[i];
72 input->SetDirection(direction);
73 input->SetSpacing(spacing);
88 template <
class TPixel,
unsigned int VImageDimension = 2>
89 class OTBImageBase_EXPORT_TEMPLATE
Image
90 :
public itk::Image<TPixel, VImageDimension>
136 itkStaticConstMacro(ImageDimension,
unsigned int, VImageDimension);
197 virtual VectorType GetGeoTransform(
void)
const;
224 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
227 void CopyInformation(
const itk::DataObject*)
override;
242 #ifndef OTB_MANUAL_INSTANTIATION
254 extern template class OTBImageBase_EXPORT_TEMPLATE
Image<int, 2>;
256 extern template class OTBImageBase_EXPORT_TEMPLATE
Image<char, 2>;
261 extern template class OTBImageBase_EXPORT_TEMPLATE Image<std::complex<int>, 2>;
262 extern template class OTBImageBase_EXPORT_TEMPLATE Image<std::complex<short>, 2>;
263 extern template class OTBImageBase_EXPORT_TEMPLATE Image<std::complex<float>, 2>;
264 extern template class OTBImageBase_EXPORT_TEMPLATE Image<std::complex<double>, 2>;
Creation of an "otb" image which contains metadata.
Superclass::ValueType ValueType
itk::Image< TPixel, VImageDimension > Superclass
Superclass::PixelType PixelType
Image(const Self &)=delete
Superclass::PixelContainer PixelContainer
Superclass::PointType PointType
itk::SmartPointer< Self > Pointer
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
Superclass::InternalPixelType InternalPixelType
Superclass::OffsetValueType OffsetValueType
Superclass::DirectionType DirectionType
Superclass::SpacingType SpacingType
void operator=(const Self &)=delete
PixelContainer::Pointer PixelContainerPointer
ImageMetadataInterfaceBase::VectorType VectorType
Superclass::IOPixelType IOPixelType
Superclass::SizeType SizeType
Superclass::RegionType RegionType
Superclass::IndexType IndexType
itk::SmartPointer< const Self > ConstPointer
itk::NeighborhoodAccessorFunctor< Self > NeighborhoodAccessorFunctorType
Superclass::OffsetType OffsetType
PixelContainer::ConstPointer PixelContainerConstPointer
itk::WeakPointer< const Self > ConstWeakPointer
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
void SetSignedSpacing(InputImage *input, SpacingType spacing)
ImageType::SpacingType GetSignedSpacing(const ImageType *input)
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
template class OTBImageBase_EXPORT_TEMPLATE Image< unsigned short, 2 >
template class OTBImageBase_EXPORT_TEMPLATE Image< short, 2 >
template class OTBImageBase_EXPORT_TEMPLATE Image< float, 2 >
template class OTBImageBase_EXPORT_TEMPLATE Image< unsigned char, 2 >
template class OTBImageBase_EXPORT_TEMPLATE Image< char, 2 >
template class OTBImageBase_EXPORT_TEMPLATE Image< int, 2 >
template class OTBImageBase_EXPORT_TEMPLATE Image< unsigned int, 2 >
template class OTBImageBase_EXPORT_TEMPLATE Image< double, 2 >