void ChangeResolutionAction::DecreaseFrequency(TimeFrequencyData &timeFrequencyData)
	{
		size_t imageCount = timeFrequencyData.ImageCount();
		for(size_t i=0;i<imageCount;++i)
		{
			Image2DCPtr image = timeFrequencyData.GetImage(i);
			Image2DPtr newImage = image->ShrinkVertically(_frequencyDecreaseFactor);
			timeFrequencyData.SetImage(i, newImage);
		}
		size_t maskCount = timeFrequencyData.MaskCount();
		for(size_t i=0;i<maskCount;++i)
		{
			Mask2DCPtr mask = timeFrequencyData.GetMask(i);
			Mask2DPtr newMask = mask->ShrinkVertically(_frequencyDecreaseFactor);
			timeFrequencyData.SetMask(i, newMask);
		}
	}
	void ChangeResolutionAction::DecreaseFrequency(TimeFrequencyData& timeFrequencyData)
	{
		if(_useMaskInAveraging)
		{
			DecreaseFrequencyWithMask(timeFrequencyData);
		}
		else {
      size_t imageCount = timeFrequencyData.ImageCount();
      for(size_t i=0;i<imageCount;++i)
      {
        Image2DCPtr image = timeFrequencyData.GetImage(i);
        Image2DPtr newImage(new Image2D(image->ShrinkVertically(_frequencyDecreaseFactor)));
        timeFrequencyData.SetImage(i, std::move(newImage));
      }
      size_t maskCount = timeFrequencyData.MaskCount();
      for(size_t i=0;i<maskCount;++i)
      {
        Mask2DCPtr mask = timeFrequencyData.GetMask(i);
        Mask2DPtr newMask(new Mask2D(mask->ShrinkVertically(_frequencyDecreaseFactor)));
        timeFrequencyData.SetMask(i, std::move(newMask));
      }
    }
	}