コード例 #1
0
bool FluxCalibrationInstance::CanExecuteOn( const View& view, pcl::String& whyNot ) const
{
   if ( view.Image().IsComplexSample() )
   {
      whyNot = "FluxCalibration cannot be executed on complex images.";
      return false;
   }

   if ( view.Image()->IsColor() )
   {
      whyNot = "FluxCalibration cannot be executed on color images.";
      return false;
   }

   FITSKeywordArray inputKeywords;
   view.Window().GetKeywords( inputKeywords );

   if ( FluxCalibrationEngine::KeywordExists( inputKeywords, "FLXMIN" ) ||
        FluxCalibrationEngine::KeywordExists( inputKeywords, "FLXRANGE" ) ||
        FluxCalibrationEngine::KeywordExists( inputKeywords, "FLX2DN" ) )
   {
      whyNot = "FluxCalibration cannot be executed on an already flux-calibrated image.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #2
0
bool CurvesTransformationInstance::CanExecuteOn( const View& view, pcl::String& whyNot ) const
{
   if ( view.Image().IsComplexSample() )
   {
      whyNot = "CurvesTransformation cannot be executed on complex images.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #3
0
bool BinarizeInstance::CanExecuteOn( const View& view, pcl::String& whyNot ) const
{
   if ( view.Image().IsComplexSample() )
   {
      whyNot = "Binarize cannot be executed on complex images.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #4
0
bool ImageIdentifierInstance::CanExecuteOn( const View& v, pcl::String& whyNot ) const
{
   if ( !v.IsMainView() )
   {
      whyNot = "ImageIdentifier can only be executed on main views, not on previews.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #5
0
bool HDRCompositionInterface::ValidateProcess( const ProcessImplementation& p, pcl::String& whyNot ) const
{
   const HDRCompositionInstance* r = dynamic_cast<const HDRCompositionInstance*>( &p );
   if ( r == 0 )
   {
      whyNot = "Not an HDRComposition instance.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #6
0
bool ExponentialTransformationInterface::ValidateProcess( const ProcessImplementation& p, pcl::String& whyNot ) const
{
   const ExponentialTransformationInstance* r = dynamic_cast<const ExponentialTransformationInstance*>( &p );
   if ( r == 0 )
   {
      whyNot = "Not an ExponentialTransformation instance.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #7
0
bool GradientsMergeMosaicInterface::ValidateProcess( const ProcessImplementation& p, pcl::String& whyNot ) const
{
   const GradientsMergeMosaicInstance* r = dynamic_cast<const GradientsMergeMosaicInstance*>( &p );
   if ( r == 0 )
   {
      whyNot = "Not a GradientMergeMosaic instance.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #8
0
bool ExtractAlphaChannelsInterface::ValidateProcess( const ProcessImplementation& p, pcl::String& whyNot ) const
{
   const ExtractAlphaChannelsInstance* r = dynamic_cast<const ExtractAlphaChannelsInstance*>( &p );

   if ( r == 0 )
   {
      whyNot = "Not an ExtractAlphaChannels instance.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #9
0
bool ImageIdentifierInterface::ValidateProcess( const ProcessImplementation& p, pcl::String& whyNot ) const
{
   const ImageIdentifierInstance* r = dynamic_cast<const ImageIdentifierInstance*>( &p );

   if ( r == 0 )
   {
      whyNot = "Not an ImageIdentifier instance.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #10
0
bool ConvertToGrayscaleInstance::CanExecuteOn( const View& view, pcl::String& whyNot ) const
{
   if ( view.Image().IsComplexSample() )
   {
      whyNot = "ConvertToGrayscale cannot be executed on complex images.";
      return false;
   }

   if ( view.Image().ColorSpace() == ColorSpace::Gray )
   {
      whyNot = "ConvertToGrayscale cannot be executed on grayscale images.";
      return false;
   }

   whyNot.Clear();
   return true;
}
コード例 #11
0
bool ImageIdentifierInstance::Validate( pcl::String& info )
{
   id.Trim();

   // The identifier can either be empty, meaning that a default image
   // identifier will be automatically assigned by the PixInsight core
   // application, or a valid C identifier.
   //
   // We only have to check validity of our identifier here. Uniqueness in any
   // particular naming context is enforced by the core application.

   if ( !id.IsEmpty() && !id.IsValidIdentifier() ) // String::IsValidIdentifier() does the job
   {
      info = '\'' + id + "' is not a valid identifier.";
      return false;
   }

   info.Clear();
   return true;
}
コード例 #12
0
ファイル: CCDFrameInstance.cpp プロジェクト: SunGong1993/PCL
bool CCDFrameInstance::CanExecuteGlobal( pcl::String& whyNot ) const
{
   whyNot.Clear();
   return true;
}
コード例 #13
0
ファイル: INDIMountInstance.cpp プロジェクト: eprimucci/PCL
bool INDIMountInstance::CanExecuteGlobal( pcl::String& whyNot ) const
{
   whyNot.Clear();
   return true;
}