This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For reference: | |
# CLIProgressBar is a qSlicerCLIProgressBar (https://www.slicer.org/doc/html/classqSlicerCLIProgressBar.html) | |
# self.CLIProgressBar = slicer.qSlicerProgressBar. | |
def getCLINode(self, module, name): | |
cliNode = slicer.mrmlScene.GetFirstNodeByName(name) | |
if cliNode == None: | |
cliNode = slicer.cli.createNode(module) | |
cliNode.SetName(name) | |
return cliNode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Jeu de la roulette du casino. | |
from random import randrange | |
from math import floor | |
from time import sleep | |
#Variables de configurations: | |
fourchette_mise = [1, 49] | |
fourchette_pari = [0, 49] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------------------------------------------------------------- | |
int main(int argc, char *argv[]) | |
{ | |
QApplication::setStyle( new QCDEStyle ); | |
QApplication app(argc, argv); | |
QCoreApplication::addLibraryPath("W:/TechTip/QtStyles/SecondPlugin_build/Debug"); | |
QApplication::setStyle(QStyleFactory::create("secondsimplestyle")); | |
QSpinBox spinBox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------------- | |
QStyle* StyleExamplePlugin::create( const QString & key ) | |
{ | |
if (key.toLower() == "simplestyle") | |
{ | |
return new QPlastiqueStyle(); | |
} | |
return 0; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Qt includes | |
#include <QApplication> | |
#include <QCDEStyle> | |
#include <QSpinBox> | |
#include <QStyleFactory> | |
//---------------------------------------------------------------------------- | |
int main(int argc, char *argv[]) | |
{ | |
QApplication::setStyle( new QCDEStyle ); // set default style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------------------------------------------------------------- | |
int main(int argc, char *argv[]) | |
{ | |
QApplication::setStyle("plastique"); | |
QApplication app(argc, argv); | |
QSpinBox spinBox; | |
spinBox.show(); | |
return app.exec(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------------- | |
vtkImageData* GrabNextColorFrame() | |
{ | |
NUI_IMAGE_FRAME kinectFrame; | |
if (sensor->NuiImageStreamGetNextFrame(rgbStream, 0, &kinectFrame) != EXIT_SUCCESS) | |
{ | |
return 0; | |
} | |
INuiFrameTexture* texture = kinectFrame.pFrameTexture; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------------- | |
int main (int argc, char* argv) | |
{ | |
// 1- init | |
if (!InitKinect()) | |
{ | |
std::cout<<"Could not Init Kinect"<<std::endl; | |
return EXIT_FAILURE; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> // WINDOWS MUST BE BEFORE ! | |
// -- Kinect -- | |
#include <NuiApi.h> | |
// -- STD -- | |
#include <iostream> | |
// Kinect variables | |
INuiSensor* sensor; // The kinect sensor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 2.6) | |
project (K) # Not a very inventive name | |
set (K_VERSION_MAJOR 1) | |
set (K_VERSION_MINOR 0) | |
include_directories("${PROJECT_BINARY_DIR}") | |
# Kinect dir |