SimpleITK  
sitkImageViewer.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef sitkImageViewer_h
19#define sitkImageViewer_h
20
21#include "sitkImage.h"
22#include "sitkPathType.h"
23#include "sitkIO.h"
24#include "sitkProcessObject.h"
25
26namespace itk::simple
27{
28
52{
53
54public:
56
58 virtual std::string
59 GetName() const
60 {
61 return std::string("ImageViewer");
62 }
63
64
68 static void
69 SetGlobalDefaultSearchPath(const std::vector<PathType> & path);
70 static const std::vector<PathType> &
73
77 static void
78 SetGlobalDefaultExecutableNames(const std::vector<PathType> & names);
79 static const std::vector<PathType> &
82
89 static void
90 SetGlobalDefaultFileExtension(const std::string & ext);
91 static const std::string &
94
98 static void
100 static const PathType &
103
122 void
123 SetApplication(const PathType & app, const std::string & command = "%a %f");
124
126 const PathType &
128
168 void
169 SetCommand(const std::string & command);
170
171 /* \brief Get the command string used to launch the viewing application */
172 const std::string &
173 GetCommand() const;
174
183 void
184 SetFileExtension(const std::string & ext);
185 const std::string &
186 GetFileExtension() const;
188
195 static void
196 SetGlobalDefaultDebug(const bool dbg);
197 static bool
199
200 static void
202 static void
205
212 static void
213 SetProcessDelay(const unsigned int delay);
214 static unsigned int
217
221 void
222 SetTitle(const std::string & t);
223 const std::string &
224 GetTitle() const;
226
229 void
230 Execute(const Image & image);
231
234 std::string
235 ToString() const;
236
237
238private:
239 std::string m_ViewCommand;
240 std::string m_CustomCommand;
244 std::string m_FileExtension;
246 std::string m_Title;
247};
248
249} // namespace itk::simple
250#endif
static void SetGlobalDefaultDebugOff()
Set/Get Debug flag.
static void SetGlobalDefaultDebug(const bool dbg)
Set/Get Debug flag.
static void SetGlobalDefaultSearchPath(const std::vector< PathType > &path)
Set/Get the search path used to find the viewing application.
static const std::string & GetGlobalDefaultFileExtension()
Set/Get the default file extension.
static void SetGlobalDefaultDebugOn()
Set/Get Debug flag.
void SetFileExtension(const std::string &ext)
Set/Get file extension of the temporary image file (default='.nii')
static const std::vector< PathType > & GetGlobalDefaultExecutableNames()
Set/Get name list used to find the viewing application.
const std::string & GetCommand() const
const PathType & GetApplication() const
Get the full path to the viewing application used in the command string.
static void SetGlobalDefaultApplication(const PathType &app)
Set/Get the default application used in the command string.
virtual std::string GetName() const
void SetTitle(const std::string &t)
Set/Get Title string on the ImageJ window.
static void SetProcessDelay(const unsigned int delay)
Set/Get Process delay, the wait time after launching the viewing application.
static void SetGlobalDefaultExecutableNames(const std::vector< PathType > &names)
Set/Get name list used to find the viewing application.
const std::string & GetFileExtension() const
Set/Get file extension of the temporary image file (default='.nii')
static bool GetGlobalDefaultDebug()
Set/Get Debug flag.
void Execute(const Image &image)
Launch the viewing application to display the given image.
static const PathType & GetGlobalDefaultApplication()
Set/Get the default application used in the command string.
const std::string & GetTitle() const
Set/Get Title string on the ImageJ window.
static unsigned int GetProcessDelay()
Set/Get Process delay, the wait time after launching the viewing application.
void SetApplication(const PathType &app, const std::string &command="%a %f")
Set the full path to the viewing application used in the command string.
void SetCommand(const std::string &command)
Set the command string used to launch the viewing application.
static const std::vector< PathType > & GetGlobalDefaultSearchPath()
Set/Get the search path used to find the viewing application.
std::string ToString() const
Print ourself out to a string.
static void SetGlobalDefaultFileExtension(const std::string &ext)
Set/Get the default file extension.
The Image class for SimpleITK.
Definition sitkImage.h:77
std::string PathType
#define SITKIO_EXPORT
Definition sitkIO.h:33