~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/visualizator/visualizator/wxvtk/imprimevistasimple.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2011-05-02 08:09:26 UTC
  • Revision ID: james.westby@ubuntu.com-20110502080926-bql5wep49c7hg91t
Tags: upstream-2.4.1.1
ImportĀ upstreamĀ versionĀ 2.4.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  
 
3
 *  $Id: imprimevistasimple.cpp 3713 2011-04-15 12:55:23Z tovar $
 
4
 *  Ginkgo CADx Project
 
5
 *
 
6
 *  Copyright 2008-10 MetaEmotion S.L. All rights reserved.
 
7
 *  http://ginkgo-cadx.com
 
8
 *
 
9
 *  This file is licensed under LGPL v3 license.
 
10
 *  See License.txt for details
 
11
 *
 
12
 *
 
13
 */
 
14
#ifdef __DEPRECATED
 
15
#undef __DEPRECATED
 
16
#endif
 
17
//#define _GINKGO_TRACE
 
18
#include <api/globals.h>
 
19
#include <api/internacionalizacion.h>
 
20
 
 
21
#include <wx/config.h>
 
22
 
 
23
#include <vtkSmartPointer.h>
 
24
#include <vtkImageMapToRGBA.h>
 
25
#include <vtkObject.h>
 
26
 
 
27
#include "imprimevistasimple.h"
 
28
 
 
29
 
 
30
 
 
31
namespace GNKVisualizator {
 
32
 
 
33
        ImprimeVistaSimple::ImprimeVistaSimple(GNC::GCS::IWidgetsManager* pWidgetsManager, GnkPtr<GNC::GCS::IContextoEstudio> estudioAprimaria, int index ) : GNC::GCS::IImpresion (pWidgetsManager, estudioAprimaria, index)
 
34
        {
 
35
        }
 
36
 
 
37
        ImprimeVistaSimple::~ImprimeVistaSimple()
 
38
        {
 
39
        }
 
40
        
 
41
 
 
42
        void ImprimeVistaSimple::PrintImageRGB(GNC::GCS::IContratoExportacionImages::ImageType::Pointer& img, bool conWidgets, const GNC::GCS::Vector& size)
 
43
        {
 
44
                Imprimir(GetImage(), conWidgets, size, img);
 
45
        }
 
46
 
 
47
        void ImprimeVistaSimple::PrintImage(GNC::GCS::IContratoExportacionImages::ImageType::Pointer& img, bool conWidgets, vtkScalarsToColors* pLookUpTable, const GNC::GCS::Vector& size)
 
48
        {
 
49
                vtkImageMapToRGBA * pImageMap = vtkImageMapToRGBA::New();
 
50
                pImageMap->SetInput(GetImage());
 
51
                pImageMap->SetLookupTable(pLookUpTable);
 
52
                pImageMap->SetOutputFormatToRGB();
 
53
                pImageMap->Update();
 
54
                Imprimir(pImageMap->GetOutput(), conWidgets, size, img);
 
55
        }
 
56
 
 
57
//endregion
 
58
}
 
59