From: Claire Mouton Date: Fri, 21 Sep 2012 08:46:11 +0000 (+0000) Subject: Improved the documentation and the error messages of ColorLayerImageView. X-Git-Tag: v1.0.4~3 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=39a96dbeaae51405291ce243690d2fd63cd6e12d;p=creaMaracasVisu.git Improved the documentation and the error messages of ColorLayerImageView. --- diff --git a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h index b6d5f29..128e6ea 100644 --- a/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h +++ b/bbtk/src/bbcreaMaracasVisuColorLayerImageView.h @@ -44,7 +44,7 @@ BBTK_CATEGORY("__CategoryBlackBox__"); BBTK_INPUT(ColorLayerImageView,WxVtkBaseView,"creaMaracasVisuViewer viewer",wxVtkBaseView*,""); BBTK_INPUT(ColorLayerImageView,In,"Input Image",vtkImageData*,""); BBTK_INPUT(ColorLayerImageView,lstBaseColor,"List of Base Colors in RGB format to define the color map. Requirement: must be of a size being a multiple of 3, with values between 0 and 1. For example, for 2 colors: \"1 0 0 0 0 1\". If not provided as required, the histogram is equally split into three areas, blue, yellow and red.",std::vector,""); -BBTK_INPUT(ColorLayerImageView,lstGreyLevelBoundaries,"List of the Grey Level Boundaries to define the color map. Requirement: Must have one more element than the number of colours. For example, for 2 colors: \"50 150 250\". If not provided as required, the histogram is equally split into areas, which number corresponds to the number of colors provided (3 by default).",std::vector,""); +BBTK_INPUT(ColorLayerImageView,lstGreyLevelBoundaries,"List of the Grey Level Boundaries to define the color map (grey level outside the color boundaries will not be disayed). Requirement: Must have one more element than the number of colours. For example, for 2 colors: \"50 150 250\". If not provided as required, the histogram is equally split into areas, which number corresponds to the number of colors provided (3 by default).",std::vector,""); BBTK_INPUT(ColorLayerImageView,PlainOrGradientColor,"Choose between Plain (true) or Gradient (false) colors. Default is false.",bool,""); BBTK_INPUT(ColorLayerImageView,FittingMode,"Choose the fitting mode between the images, the transformation can be either by Dimension (1), by Spacing (2) or by Pixel (3). If you want to make the choice through a dialog box, choose (-1). Default is by Pixel (3).",int,""); BBTK_END_DESCRIBE_BLACK_BOX(ColorLayerImageView); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx index c091b9d..91a6755 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx @@ -68,7 +68,7 @@ void ColorLayerImageView::SetBaseColors(std::vector & base_color) _base_color = base_color; // Otherwise, an exception should be thrown. else if (base_color.size() != 0) - std::cout << "CM ColorLayerImageView::SetBaseColors : ERROR!!! The base color vector has an inconsistent size. It must be of a size multiple of 3, different from 0, but its size is: "<< base_color.size() << "." << std::endl; + std::cout << "CM ColorLayerImageView::SetBaseColors : ERROR!!! The base color vector has an inconsistent size. It must be of a size multiple of 3, different from 0, but its size is: "<< base_color.size() << ". Therefore, the default values will be used as base colors." << std::endl; } //---------------------------------------------------------------------------- @@ -95,7 +95,7 @@ void ColorLayerImageView::SetGreyLevelBoundaries(std::vector & grey_leve } // Otherwise, an exception should be thrown. else if (grey_level_boundary.size() != 0) - std::cout << "CM ColorLayerImageView::SetGreyLevelBoundaries : ERROR!!! The grey level boundaries vector has an inconsistent size. It must be of a size greater than or equal to 2 (at least min and max must exist), but its size is: " << grey_level_boundary.size() << "." << std::endl; + std::cout << "CM ColorLayerImageView::SetGreyLevelBoundaries : ERROR!!! The grey level boundaries vector has an inconsistent size. It must be of a size greater than or equal to 2 (at least min and max must exist), but its size is: " << grey_level_boundary.size() << ". Therefore, the histogram will be equally split." << std::endl; } //----------------------------------------------------------------------------