Loading...
Searching...
No Matches
elxProgressCommand.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 elxProgressCommand_h
#define elxProgressCommand_h
#include "itkProcessObject.h"
#include "itkCommand.h"
namespace elastix
{
class ProgressCommand : public itk::Command
{
public:
using Self = ProgressCommand;
using Superclass = itk::Command;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
itkTypeMacro(ProgressCommand, Command);
itkNewMacro(Self);
using ProcessObjectType = itk::ProcessObject;
using ProcessObjectPointer = ProcessObjectType::Pointer;
virtual void
SetUpdateFrequency(const unsigned long numberOfVoxels, const unsigned long numberOfUpdates);
virtual void
ConnectObserver(itk::ProcessObject * filter);
void
DisconnectObserver(itk::ProcessObject * filter);
void
Execute(itk::Object * caller, const itk::EventObject & event) override;
void
Execute(const itk::Object * caller, const itk::EventObject & event) override;
void
PrintProgress(const float progress) const;
void
UpdateAndPrintProgress(const unsigned long currentVoxelNumber) const;
itkSetStringMacro(StartString);
itkGetStringMacro(StartString);
itkSetStringMacro(EndString);
itkGetStringMacro(EndString);
static Pointer
CreateAndSetUpdateFrequency(unsigned long numberOfVoxels);
static Pointer
CreateAndConnect(itk::ProcessObject &);
protected:
ProgressCommand();
~ProgressCommand() override;
private:
std::string m_StartString;
std::string m_EndString;
unsigned long m_Tag;
bool m_TagIsSet;
ProcessObjectPointer m_ObservedProcessObject;
unsigned long m_NumberOfVoxels;
unsigned long m_NumberOfUpdates;
};
} // end namespace elastix
#endif // end #ifndef elxProgressCommand_h
elastix::ProgressCommand::PrintProgress
void PrintProgress(const float progress) const
elastix::ProgressCommand::ProgressCommand
ProgressCommand()
elastix::ProgressCommand::ProcessObjectType
itk::ProcessObject ProcessObjectType
Definition elxProgressCommand.h:104
elastix::ProgressCommand::m_StartString
std::string m_StartString
Definition elxProgressCommand.h:163
elastix::ProgressCommand::m_NumberOfUpdates
unsigned long m_NumberOfUpdates
Definition elxProgressCommand.h:173
elastix::ProgressCommand::Superclass
itk::Command Superclass
Definition elxProgressCommand.h:95
elastix::ProgressCommand::~ProgressCommand
~ProgressCommand() override
elastix::ProgressCommand::SetUpdateFrequency
virtual void SetUpdateFrequency(const unsigned long numberOfVoxels, const unsigned long numberOfUpdates)
elastix::ProgressCommand::Pointer
itk::SmartPointer< Self > Pointer
Definition elxProgressCommand.h:96
elastix::ProgressCommand::Execute
void Execute(itk::Object *caller, const itk::EventObject &event) override
elastix::ProgressCommand::Self
ProgressCommand Self
Definition elxProgressCommand.h:94
elastix::ProgressCommand::Execute
void Execute(const itk::Object *caller, const itk::EventObject &event) override
elastix::ProgressCommand::CreateAndSetUpdateFrequency
static Pointer CreateAndSetUpdateFrequency(unsigned long numberOfVoxels)
elastix::ProgressCommand::m_EndString
std::string m_EndString
Definition elxProgressCommand.h:164
elastix::ProgressCommand::ProcessObjectPointer
ProcessObjectType::Pointer ProcessObjectPointer
Definition elxProgressCommand.h:105
elastix::ProgressCommand::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition elxProgressCommand.h:97
elastix::ProgressCommand::UpdateAndPrintProgress
void UpdateAndPrintProgress(const unsigned long currentVoxelNumber) const
elastix::ProgressCommand::m_Tag
unsigned long m_Tag
Definition elxProgressCommand.h:167
elastix::ProgressCommand::m_NumberOfVoxels
unsigned long m_NumberOfVoxels
Definition elxProgressCommand.h:172
elastix::ProgressCommand::CreateAndConnect
static Pointer CreateAndConnect(itk::ProcessObject &)
elastix::ProgressCommand::m_TagIsSet
bool m_TagIsSet
Definition elxProgressCommand.h:168
elastix::ProgressCommand::m_ObservedProcessObject
ProcessObjectPointer m_ObservedProcessObject
Definition elxProgressCommand.h:169
elastix::ProgressCommand::DisconnectObserver
void DisconnectObserver(itk::ProcessObject *filter)
elastix::ProgressCommand::ConnectObserver
virtual void ConnectObserver(itk::ProcessObject *filter)
elastix
Definition elxDefaultConstruct.h:25

Generated on 1768596610 for elastix by 1.15.0 |