Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Scene2D/CopyStyleConfigurator.cpp @ 2012:637d6373127a
width of the vertical slider has doubled to ease user interactions
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 02 Dec 2022 18:49:06 +0100 |
parents | 7053b8a0aaec |
children | 07964689cb0b |
rev | line source |
---|---|
1773
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Stone of Orthanc |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
1871
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium |
7053b8a0aaec
upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1870
diff
changeset
|
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1773
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * modify it under the terms of the GNU Lesser General Public License |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * as published by the Free Software Foundation, either version 3 of |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * the License, or (at your option) any later version. |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * Lesser General Public License for more details. |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU Lesser General Public |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 * License along with this program. If not, see |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 * <http://www.gnu.org/licenses/>. |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 **/ |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 #include "CopyStyleConfigurator.h" |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
25 |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 #include "FloatTextureSceneLayer.h" |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
27 #include "ColorTextureSceneLayer.h" |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
28 |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 namespace OrthancStone |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 { |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 TextureBaseSceneLayer* CopyStyleConfigurator::CreateTextureFromImage( |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 const Orthanc::ImageAccessor& image) const |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 { |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 if (image.GetFormat() == Orthanc::PixelFormat_RGB24) |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 { |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 return new ColorTextureSceneLayer(image); |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 } |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 else |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 { |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 return new FloatTextureSceneLayer(image); |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 } |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 } |
34eb41352dff
added missing Scene2D/CopyStyleConfigurator.cpp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 } |