Skip to content

Commit

Permalink
COMP: Change IOComponentType to IOComponentEnum
Browse files Browse the repository at this point in the history
Change last few usages of pre ITK v5 IOComponentType enums to
IOComponentEnum enum classes to make ITK compile with ITK_LEGACY_REMOVE.
  • Loading branch information
kislinsk authored and dzenanz committed Aug 5, 2022
1 parent b1e080d commit abc6a27
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Modules/Video/BridgeOpenCV/include/itkOpenCVVideoIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class ITKVideoBridgeOpenCV_EXPORT OpenCVVideoIO : public VideoIOBase
const std::vector<SizeValueType> & dim,
const char * fourCC,
unsigned int nChannels,
IOComponentType componentType);
IOComponentEnum componentType);

protected:
OpenCVVideoIO();
Expand Down
4 changes: 2 additions & 2 deletions Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,15 @@ OpenCVVideoIO::SetWriterParameters(TemporalRatioType fps,
const std::vector<SizeValueType> & dim,
const char * fourCC,
unsigned int nChannels,
IOComponentType componentType)
IOComponentEnum componentType)
{
if (this->m_ReaderOpen || this->m_WriterOpen)
{
itkExceptionMacro("Can not set the writer's parameters when either reader or writer is already open");
}

// Make sure componentType is acceptable (right now we only support char)
if (componentType != UCHAR)
if (componentType != IOComponentEnum::UCHAR)
{
itkExceptionMacro("OpenCV IO only supports writing video with pixels of UCHAR");
}
Expand Down
2 changes: 1 addition & 1 deletion Modules/Video/BridgeVXL/include/itkVXLVideoIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class VXLVideoIO : public VideoIOBase
const std::vector<SizeValueType> & dim,
const char * fourCC,
unsigned int nChannels,
IOComponentType componentType) override;
IOComponentEnum componentType) override;

protected:
VXLVideoIO();
Expand Down
4 changes: 2 additions & 2 deletions Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,14 @@ VXLVideoIO::SetWriterParameters(TemporalRatioType fps,
const std::vector<SizeValueType> & dim,
const char * fourCC,
unsigned int nChannels,
IOComponentType componentType)
IOComponentEnum componentType)
{
if (this->m_ReaderOpen || this->m_WriterOpen)
{
itkExceptionMacro("Can not set the writer's parameters when either reader or writer is already open");
}

if (componentType != UCHAR && componentType != UINT)
if (componentType != IOComponentEnum::UCHAR && IOComponentEnum::componentType != UINT)
{
itkExceptionMacro("VXL IO only supports writing video with pixels of UCHAR and UINT");
}
Expand Down

0 comments on commit abc6a27

Please sign in to comment.