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
using PixelType = unsigned short; | |
constexpr unsigned int Dimension = 5; | |
using ImageType = itk::Image< PixelType, Dimension >; | |
using ReaderType = itk::ImageFileReader< ImageType >; | |
ReaderType::Pointer reader = ReaderType::New(); | |
using InputImageType = itk::Image<PixelType, Dimension>; | |
reader->SetFileName("d:/pynrrd_test.nrrd"); | |
reader->Update(); |
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
import vtk, qt, ctk, slicer | |
from slicer.ScriptedLoadableModule import * | |
from slicer.util import VTKObservationMixin | |
# | |
# CalibrationPhantomSegmentation | |
# | |
class CalibrationPhantomSegmentation(ScriptedLoadableModule): | |
def __init__(self, parent): |
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
import logging | |
import vtk, qt, ctk, slicer | |
import Lib.MyAppParameters as Parameters | |
# | |
# AbstractModuleWidget | |
# | |
class AbstractMyAppModuleWidget(): |
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
def setPresetOffset(self, x, y, dontMoveFirstLast, presetsCombobox): | |
volRenWidget = slicer.modules.volumerendering.widgetRepresentation() | |
if volRenWidget is None: | |
logging.error('Failed to access volume rendering module') | |
return | |
# Make sure the proper volume property node is set | |
volumePropertyNode = presetsCombobox.mrmlVolumePropertyNode() | |
if volumePropertyNode is None: | |
logging.error('Failed to access volume properties') |
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 <ctype.h> /* NOLINT */ | |
#include <stdio.h> /* NOLINT */ | |
#include <stdlib.h> /* NOLINT */ | |
#include <string.h> /* NOLINT */ | |
#if defined(_MSC_VER) | |
#pragma warning(disable : 4996) /* deprecation */ | |
#endif | |
#include "vtkWin32OutputWindow.h" |
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
/*============================================================================== | |
Program: 3D Slicer | |
Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved. | |
See COPYRIGHT.txt | |
or http://www.slicer.org/copyright/copyright.txt for details. | |
Unless required by applicable law or agreed to in writing, software |