Giter VIP home page Giter VIP logo

itksnap's Introduction

ITK-SNAP README

Welcome!

Thank you for your interest in ITK-SNAP! By using this program you are joining an ever growing community of users from research labs around the world. ITK-SNAP is an open-source software application made possible by the committment of dedicated developers, who often make contributions on a volunteer basis. Original development of ITK-SNAP was supported by the U.S. National Library of Medicine through PO 467-MZ-202446-1. Subsequent development of ITK-SNAP version 2.0 has been supported by the U.S. National Institute of Biomedical Imaging and BioEngineering and the NIH Blueprint for Neuroscience through grant 1 R03 EB008200-01. Development of ITK-SNAP versions 3.0 - 3.6 has been supported by the NIH grant 1R01 EB014346.

ITK-SNAP is the result of over 15 years of work by many researchers, software engineers and students. Please visit the Credits page to learn about the team that made ITK-SNAP possible!

Please remember to cite ITK-SNAP

Citations in published work is the best way for us to gauge ITK-SNAP impact. As of the Fall of 2016, ITK-SNAP has been cited by over 2000 papers. If you use ITK-SNAP for a publication, please cite the paper below.

  • Paul A. Yushkevich, Joseph Piven, Heather Cody Hazlett, Rachel Gimpel Smith, Sean Ho, James C. Gee, and Guido Gerig. User-guided 3D active contour segmentation of anatomical structures: Significantly improved efficiency and reliability. Neuroimage. 2006 Jul 1; 31(3):1116-28.

Getting Started

ITK-SNAP was designed for ease of use. There are several resources to get started with it.

  • If you downloaded ITK-SNAP as a binary executable from itksnap.org, you can get started by reading the online tutorials.
  • If you downloaded ITK-SNAP source code, please follow these online instructions to compile and build ITK-SNAP.
  • You will need a 3D image to use this software. Images with which ITK-SNAP is known to work are found on the ITK-SNAP download page
  • There are also materials (images, exercises, video) from training courses available on the documentation page.

Asking Questions

If you have a question about ITK-SNAP, here are the places where you may find an answer. Keep in mind that since ITK-SNAP in not a commercial product, it may take some time for an answer to arrive.

  • If you have an question about how to use SNAP or why it's not doing what it should, post in on the ITK-SNAP Users' List.
  • If you have a technical question or a questing related to ITK, join the ITK Users' Mailing List and post your question there.

Get Involved!

Your participation as a user, developer or sponsor is essential to ensuring a bright future for ITK-SNAP. There are many ways in which you can contribute to the stability and quality of this program:

itksnap's People

Contributors

a-a-danilov avatar dzenanz avatar ghisvail avatar jilei-hao avatar jlasserv avatar jmargeta avatar kallitokaco avatar octaviansoldea avatar pyushkevich avatar thewtex avatar vicory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

itksnap's Issues

Help to find correct HU value

I have a nifti image that I opened using ITK-snap. When I read the meta data using nifticlib and Nifti-Reader-JS I got to know that the each voxel takes 16-bit. For example, 0x1DAA (7594) corresponds to an HU value of -101 in itk-snap. After using c3d I got to know that it is -101.012. After using 3D Slicer I got to know that it is -101.01152. So how do I calculate from this hexadecimal value to the required HU value?

Thanks for your help in advance!

Hello, I tried to add region-grow feature, but I couldn't embed it in the software.

First of all, thank you very much for your last reply!

I've been trying to add region-grow for a while now, but I'm having a bit of a problem.
As you can see, in my code below, I was forced to load the image file by reading the file name.
Of course, I tried to map the file by using the GuidedNativeImageIO pointer, and then using CastNativeImage as a CurvatureFlowImageFilter input. But this can only be used when reading the main image. When the main image is loaded, the IO pointer is removed... I wouldn't be able to use it as a CurvatureFlowImageFilter input.
I read the relevant source code, but I don't know how to transform m_mainImageWrapper CurvatureFlowImageFilterType: : Pointer input at the same time how to shows on the screen? Do I need to convert the data format?
I am looking forward to your reply.

Here is my complete code:

#include "itkConfidenceConnectedImageFilter.h"
#include "itkImage.h"
#include "itkCastImageFilter.h"
#include "itkCurvatureFlowImageFilter.h"
#include "itkImageFileReader.h"
#include "itkImageFileWriter.h"
#include "ImageWrapperBase.h"

static void testFunc(std::string filename) {
    typedef   float           InternalPixelType;
    // 3 or 4
    const     unsigned int    Dimension = 3; 
    typedef itk::Image< InternalPixelType, Dimension >  InternalImageType;

    typedef unsigned char                            OutputPixelType;
    typedef itk::Image< OutputPixelType, Dimension > OutputImageType;
    typedef itk::CastImageFilter< InternalImageType, OutputImageType > CastingFilterType;
    CastingFilterType::Pointer caster = CastingFilterType::New();

    typedef  itk::ImageFileWriter<  OutputImageType  > WriterType;
    WriterType::Pointer writer = WriterType::New();

    typedef  itk::ImageFileReader< InternalImageType > ReaderType;
    ReaderType::Pointer reader = ReaderType::New();
    reader->SetFileName(filename);

    writer->SetFileName("E:\\DATA\\tmp\\output001.mha");

    typedef itk::CurvatureFlowImageFilter< InternalImageType, InternalImageType > CurvatureFlowImageFilterType;
    CurvatureFlowImageFilterType::Pointer smoothing = CurvatureFlowImageFilterType::New();

    typedef itk::ConfidenceConnectedImageFilter<InternalImageType, InternalImageType> ConnectedFilterType;
    ConnectedFilterType::Pointer confidenceConnected = ConnectedFilterType::New();

    ImageWrapperBase::FloatImageType* tmp = reader->GetOutput(); 
    smoothing->SetInput(tmp);
    //smoothing->SetInput(filename);
    confidenceConnected->SetInput(smoothing->GetOutput());
    caster->SetInput(confidenceConnected->GetOutput());
    writer->SetInput(caster->GetOutput());

    smoothing->SetNumberOfIterations(2);
    smoothing->SetTimeStep(0.05);

    confidenceConnected->SetMultiplier(2.5);
    confidenceConnected->SetNumberOfIterations(5);
    confidenceConnected->SetInitialNeighborhoodRadius(2);
    confidenceConnected->SetReplaceValue(6);

    InternalImageType::IndexType  indexSeed1;
    // m_Driver->GetCursorPosition()
    indexSeed1[0] = atoi("56");
    indexSeed1[1] = atoi("116");
    indexSeed1[2] = atoi("118");
    confidenceConnected->AddSeed(indexSeed1);

    try
    {
        writer->Update();
    }
    catch (itk::ExceptionObject& excep)
    {
        std::cerr << "Exception caught !" << std::endl;
        std::cerr << excep << std::endl;
    }
}

Add Label Smoothing Feature

Introduce a segmentation smoothing option in the Tools -> Smooth Labels. The user should be able to select one, multiple, or all labels and apply smoothing to that label based on the user-defined standard deviation of the Gaussian kernel in either mm or vox.

The feature will have same effect as following c3d command:

c3d input_segmentation.nii.gz -split -foreach -smooth-fast 1mm -endfor -merge -o smoothed_segmentation.nii.gz

Writing segmentation/label file using third party program

I have a model that performs segmentation. I'd like to present the output of this model to the user using itk-snap. My approach will be to write a workplace folder, with it pointing to the main image as well as the segmentation file. The workplace file is in xml and seems straightforward to modify. The segmentation file is not human readable. How would you suggest I go about creating a segmentation file using a third party program?

4D continuous rendering issue

The current continuous mesh rendering logic is not working correctly during quick changes of time point while previous time point rendering is still in progress.

Since the mesh rendering is on label-by-label basis, a change of time point in the middle of a rendering can cause labels to be rendered taking segmentation data from a different time point. Then the scene will be rendered as labels from different time points, which is not correct.

libpng12 issue on Debian 10 (buster)

Hi,

First of all, great software. I am happily using and citing ITK-SNAP for a few years.

I have recently switched to Debian 10 (64-bit) in one of my computers. After installing ITK-SNAP it throws the following error upon calling itksnap:

/usr/lib/snap-3.8.0/ITK-SNAP: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

It seems that libpng12 is superseded by libpng16 in newer releases. I am wondering whether you could address this issue in the future or have any suggestions to have ITK-SNAP working on Debian 10.

Saving default window level and window width

I am doing some annotations with itksnap recently. Since for a set of data I am interested in a same foreground organ, it will be really handy if we can set default window level and window width when opening an image, like setting the default brush size. Wonder if this can be added to this great application.
PS: Thanks for the great work creating and maintaining this app!

Hi, I have an exception when opening dcm files.

In version 3.8, I was able to open the dcm file normally. But after updating to version 4.0, opening the dcm file will fail. I've rebuilt it many times and tried with friends on different devices, and it works if I just open a single dcm image, but a series of dcm images cannot be opened.
dcmIOerror

Here is the problem screenshot.

Is the module modified in version 4.0, or do I need to install additional plugins? I am referring to the 3.8 build tutorial for the 4.0 build.
I hope I can get your reply.

Incorrect intensities exported from DICOM

Hi, I've exported NIFTI files (standard nii and compressed nii.gz) from DICOMs and incorrect voxel intensities have been generated. Output voxel values are always 1-2 HU off, so it looks like there is an underlying rounding error. The comparison of the same voxel on all three images below (DICOMs loaded as image series and two NIFTIs):
image

Feature Request- have an option to tile segmentations.

Hi Devs,

I work on developing new methods for organ volume analysis in mouse embryos (mainly involved around mpi2/LAMA). This technique essentially uses registration based methods to label organs within uCT scans.

I'm a big fan of ITK-SNAP (used it for >3 years - especially for the semi-auto segmentation methods) but the only problem is that you can't tile segmentations. This would be really helpful for validating results and comparing organs between different embryos (such as below). I would also use it a bunch for result presentation / publications.

Is it possible for you to create an option for tiling segmentations (where each image has a seperate segmenation)

image

Kind Regards,
Kyle

Saving Camera State?

Hello!

I was wondering if there is any way to save the camera state in a workspace so that the meshes in the 3D viewer window appear in the same orientation on reloading. I've tried re-orienting the camera, saving a workspace, closing ITK-Snap, and reloading the workspace, but the camera always appears in the default axis-aligned orientation on reloading (and looking at the text of the *.itksnap workspace file, I don't see anything that looks like camera coordinates). I do see that there is a struct in the codebase which can be used to save camera state...

struct CameraState
{
Vector3d position, focal_point, view_up;
Vector2d clipping_range;
double view_angle, parallel_scale;
int parallel_projection;
};

...but as far as I can tell this is only used when synchronizing between sessions.

Is there a way to do this already? If not, would this be a welcome enhancement? If there is interest I'd be happy to attempt a pull request. By the way, I'm using 3.8.0 on osx 10.15.3.

Best, and thanks for the countless hours already poured into this excellent application.

--Davis

Menus open on wrong display

In a multi-display environment, menu dropdowns, context menus, and modal windows appear on the same display, regardless of which display shows the main ITK-SNAP window. This means one might need to move the mouse cursor to a different display to interact with the dropdown/menu/window.

Build date Thu02/16/2023
Git commit hash 3bc2bdc
Git commit date 2023-02-16 14:11:06 -0500
Git branch master
Build site name pylenovo_win11
Build OS Windows-10.0.22621 AMD64
Build type Release
ITK version 5.2.1
VTK version 9.1.0
Qt version 6.2.4
CMake version 3.25.1
C compiler MSVC 19.34.31935.0
C++ compiler MSVC 19.34.31935.0

The problem has been solved.

Crashing with huge DICOM datasets on Windows

Hello,

ITK-SNAP is crashing on multiple different systems using fresh installs of ITK-SNAP both Windows 10 and Windows 11 when using large datasets.

The dataset is a non-corrupted series of DICOM images (.dcm) with a total size of 14.9 GB. (Dimensions: 1832x1832x2399)

We can load smaller datasets of the same type with no problem. But when we try to load this large dataset, ITK-SNAP says "Reading Image..." and freezes at the end of the loading bar (I assume while its trying to open the next window). The machine has 32 GB of RAM and usage in task manager reaches 60% when it crashes. Let me know of any additional information or logs that I can provide.

Thanks!

Labels unhiding from 3D window

Just noticed this issue with rendering 3D labels. When you hide a label from the 3D window, segment a new object, the label gets rendered in the 3D view again.

Steps to reproduce:

  1. Open ITK-SNAP
  2. Use the snake tool to create a segmentation
  3. Go to the "Segmentation Label Editor" and check "Hide label in 3D window" for that label
  4. Use the snake tool to create a segmentation with a new label
  5. Once you finish, both labels will render in the 3D window. If you check the "Segmentation Label Editor", it still says the label is hidden.

Image Origin inconsistent in ITK-snap and Nifti image

Hello to anyone,
I got an origin inconsistent problem. I defined 3D volume origin as (0,0,0) in NIFTI image file, however, when imported into ITK-snap software, its origin show as (-0.5, -0.5, 0.5). I would like to ask how this happened and how to fix this problem.

Here is the detail of the problem:

I used MATLAB "Tools for NIfTI and ANALYZE image" to create an example Nifti file, like this:

voxel_size = [0.5,0.5,0.5];
origin = [0,0,0]; % In make_nii file, it said this is AC origin, I would like to ask what is AC?
nii = make_nii(bb.img,voxel_size,origin,datatype);
save_nii(nii,'test.nii');

Its header information .hdr result shows like this:
image

A better view of 'test.nii' header information in cmd is here:
image

However, when importing 'test.nii' into ITK-snap 3.8 software, image information show like this:
image

Origin changed from (0,0,0) to (-0.5, -0.5, 0.5). I would like to consult how this result come in ITK-snap, that bounding box calculation, and what should I do to correct this problem?

libpng12 not available anymore on CentOS Stream 9 systems

ITK-SNAP 3.8 does not run on CentOS Stream 9 systems due to missing libpng12 library. Is there a workaround to make ITK-SNAP work, please?

ITK-SNAP 4.0 does not run either, because it needs GLIBC_2.33/2.34, which are not available on Stream 9 systems. Do I need to try and build itksnap from source?

Any hint would be much appreciated!

Please enable MINC loading

ITK has underlying support for MINC, but the ITK-SNAP interface doesn't allow loading of a MINC file.

ITK 5.2.1 Bug Affecting NiFTI Loading in Current Version of ITK-Snap

Hi,

When loading certain Nifti files using the most recent binary release, I encounter the error:

/data/hippogang/build/buildbot/Nightly/itk/v5.2.1/itk/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx:1980:
ITK ERROR: ITK only supports orthonormal direction cosines.  No orthonormal definition found!

After doing a little digging, it looks like this started here in ITK upstream:

InsightSoftwareConsortium/ITK#3514

and was fixed by these PRs to ITK:

InsightSoftwareConsortium/ITK#3339

InsightSoftwareConsortium/ITK#2701

that means ITK 5.2.1 fell in the middle of the bug and the fix: https://github.com/InsightSoftwareConsortium/ITK/releases/tag/v5.2.1

Is it possible to release a new binary built against a more recent version of ITK?

Thank you.

Map Segmentation on Two Images Simultaneously

I have two dicom series of different modalities (CT and PET), different shapes and different spacing, and both are taken in the same study. When I open them simultaneously in itk-snap and open the segmentation for CT, itk-snap can map the segmentation on both series correctly. How did you do that? How did you map two images with different shapes to the same space?

Oblique volumes not displayed correctly with respect to anatomical axes

Summary When loading an oblique volume (in this example, the Euler angles of the oblique volume given by ITK are 18°, -22°, -10°), it is displayed as axis-aligned when loaded as main image. On the two snapshot below, the skull-stripped image is oblique, while the other one has an identity direction matrix.

Observed behavior In the first snapshot, the axis-aligned image is loaded first, and the oblique image is displayed correctly.

snapshot0001

In the second snapshot, the oblique volume is loaded first, it is displayed axis-aligned, while the axis-aligned volume is displayed as if it were oblique.

snapshot0002

Expected behavior I would have expected both screenshots to show the images in the same orientation.

Bubbles don't transfer to Evolution stage in Segment 3D pipeline

I have been experiencing this weird bug when segmenting. I spend quite some time going through the thresholded image, adding a lot of bubbles for high precision control (like 100-200). Then when I click next, it loads, then none of the bubbles show (in that light red color) in the Evolution stage. If I go back and delete all of the bubbles and create a single new bubble, then click next, it still doesn't appear in the Evolution stage. Even if I cancel the segmentation it doesn't work. I have to restart ITK-SNAP. This doesn't always happen, and might be related to high number of bubbles I create. I haven't been able to determine the cause of this issue.

Thanks for reading!

No warning if saving fails

I am using the latest ITK-SNAP version (3.8.0) for annotating MRI images, stored on a network drive. We are working in a team, and not all users have write permissions for the network drive, so some cannot save the segmentation masks. However, there is no message if saving fails. One user spend multiple hours annotating without recognizing that the work isn't saved.

Would it be possible for ITK-SNAP to check if it can write to the target directory before saving or check if the saved file exists?

Hello, why itksnap command line tool is not working?

I am trying to manipulate itksnap workspace file(.itksnap) via itksnap command line tool (itksnap-wt).
The first step is try to add another .nrrd image in to a workspace file. I trid this command:

itksnap-wt -i 1only.itksnap -layers-add-anat 2.nrrd
It give me this result

INFO: picked layer Layers.Layer[001]
But it still only has one layer:

itksnap-wt -i 1only.itksnap -layers-list
2> Layer  Role  Nickname  Filename                                  Tags  
2> 000    Main            /home/user/Desktop/ITK_PROJ/build/1.nrrd        

Why it is not working?

Nii segmentation z-flip in certain circumstances (4.0.0)

I have a CT in DICOM and a segmentation in Nifti (obtained by someone else in a previous version of itk-snap). When first loading the CT as main image and then the segmentation, there is a SI flip in how the segmentation is displayed. I can confirm that by loading the segmentation as additional image, which displays correctly.

DICOM with segmentation as layer
image

segmentation loaded as additional image and segmentation as layer
image

I have checked that if I convert the CT to Nifti using an external tool, load that as main image, and then load the segmentation, ITK-snap displays it alright.

Unfortunately I cannot share the CT, but could share the segmented nii (although that's unlikely to be any use).

(Maybe some flag that doesn't get re-initialised?)

Code logic of the using command line tool to set colormap

In the file itksnap/Logic/Common/ColorMap.cxx. FunctionColorMap::GetPresetName, the variable preset_names contains a lot of phrases separated by space. But the command line tool can not parse those phrases which contain space.
For example, If I want to set colormap as this
itksnap-wt -layers-set-main 1.nrrd -layers-add-anat 2.nrrd -props-set-colormap Black to red -layers-add-anat 3.nrrd -props-set-colormap Black to blue -o new.itksnap

This command will cause the error:
System exception for command : Expected a command at position 8, instead got 'to'.
Although people can add quotation marks around the color, such as "Black to red", but I think that is not a good idea.
I think the preset name should be changed from Black to red to Black-to-red or Black_to_red.

itk-snap does not work on Ubuntu20.04

Hello, I am trying to use the Linux binary release directly on Ubuntu20.04, and such an error was reported:

./itksnap -h
./itksnap: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./itksnap)
./itksnap: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./itksnap)

Search around I did not find a good answer--it looks like I need to build from source code? The tutorial from here is rather complicated, as before that I need to build ITK, VTK and QT.. and some documentation looks like is rather old.
I am looking for a suggestion --do I really need to build all these stuffs from scratch--or is there any other solution?

ITKSnap not working as expected on Windows server 2019

Hi

I installed ITKSnap v3.8 on Windows Server 2019 system and tried loading a sample image(GIPL) provided in the ITKSnap tutorial documentation. However, after the loading nothing works. When I double click on the uploaded image (attached screenshot), it does not go to the next screen (containing the 4 different planar views). Is there any compatibility issues for the software when its run on a Windows server edition instead of the usual windows 10 OS?
itksnap_issue

Thanks in advance for any potential suggestions :)

Real-time 3D echocardiography Import Feature

Real-time 3D echocardiography (4D echo) is exported from Philips’ QLAB software in Cartesian DICOM format. Philips’ Cartesian DICOMs are not readable by most programs.
The task is to create an image import feature that loads the Cartesian DICOM with an adjusted orientation and retain the frame time from the metadata of the Cartesian DICOM.

Failed to load image with RPI anatomical orientation

I try to view a 3d mr image under a rotated coordinate system, the transform matrix (or direction, orientation) of which is not an identity matrix (with decimals between -1 and 1). The .mhd file shows that AnatomicalOrientation = RPI.
ITK-snap fails to load this image, and says "Image has an invalid orientation". Do you have any suggestions to solve this problem?

MacOS Ventura 13.3 SNAP 4.0 Crash Issue

Hello, I have been running ITK snap on my macbook pro with running Ventura 13.3 and recently have begun to experience frequent crashes (every 2-5 minutes). This issue started randomly after upgrading to version 4.0 but the crashes were much more infrequent at first (every 45 minutes to an hour). Now they have gotten so frequent it is difficult to use the software. Anyone else experiencing this?

Failed to load image "Image has an invalid orientation (code IRI) "

I am trying to open a .nii.gz image. For a specific set of 'affine' matrix, ITK snap throws the Image has an invalid orientation (code IRI) error. The header seems correct (Right-to-Left, Anterior-to-Posterior, Inferior-to-Superior) in which case it is an RAI orientation but I see the error as above. It seems like ITK-Snap internally computes the orientation based on the affine matrix which seems to be causing this issue. This works fine FSLEyes/3D Slicer. Your help is much appreciated.

The error can be replicated with the below snippet.

import nibabel as nib
import numpy as np

data=np.random.random((256,256,56))
affine=[[-0.656692, -0.676962, 0.332383, -0.000000],
        [0.360389, -0.668844, -0.650205, -0.000000],
        [0.662477, -0.307197, 0.683194, 0.000000],
        [0.000000, 0.000000, 0.000000, 1.000000]
nifti_img=nib.Nifti1Image(data, affine=affine
nib.save(nifti_img, "orientation_test.nii.gz")

Below is the header information of that specific nifti file
sizeof_hdr 348
data_type FLOAT64
dim0 3
dim1 256
dim2 256
dim3 56
dim4 1
dim5 1
dim6 1
dim7 1
vox_units Unknown
time_units Unknown
datatype 64
nbyper 8
bitpix 64
pixdim0 1.000000
pixdim1 1.000000
pixdim2 1.000000
pixdim3 1.000000
pixdim4 1.000000
pixdim5 1.000000
pixdim6 1.000000
pixdim7 1.000000
vox_offset 352
cal_max 0.000000
cal_min 0.000000
scl_slope 1.000000
scl_inter 0.000000
phase_dim 0
freq_dim 0
slice_dim 0
slice_name Unknown
slice_code 0
slice_start 0
slice_end 0
slice_duration 0.000000
toffset 0.000000
intent Unknown
intent_code 0
intent_name
intent_p1 0.000000
intent_p2 0.000000
intent_p3 0.000000
qform_name Unknown
qform_code 0
qto_xyz:1 -0.656692 -0.676962 0.332383 -0.000000
qto_xyz:2 0.360389 -0.668844 -0.650205 -0.000000
qto_xyz:3 0.662477 -0.307197 0.683194 0.000000
qto_xyz:4 0.000000 0.000000 0.000000 1.000000
qform_xorient Right-to-Left
qform_yorient Anterior-to-Posterior
qform_zorient Inferior-to-Superior
sform_name Unknown
sform_code 2
sto_xyz:1 -0.656692 -0.676962 0.332383 -0.000000
sto_xyz:2 0.360389 -0.668844 -0.650205 -0.000000
sto_xyz:3 0.662477 -0.307197 0.683194 0.000000
sto_xyz:4 0.000000 0.000000 0.000000 1.000000
sform_xorient Right-to-Left
sform_yorient Anterior-to-Posterior
sform_zorient Inferior-to-Superior
file_type NIFTI-1+
file_code 1
descrip
aux_file

Any suggestions would be really helpful.

Thank you.
Regards,
Dhinesh

About using itksnap to display abnormal problems

Hello,
I am using itksnap to view my dicom file and it shows the result as follows:
xAODyD.jpg
It's clearly not normal!

I use other software to open my dicom file and it goes like this:
xAOcTA.jpg
Please how can I solve my problem?

Thank You!

Export screenshot series while in axial mode

When you try to Menu>Export>Screenshot Series>Coronal while in axial only mode you only get single slice snapshot as if in the single screenshot mode. When you switch back to tri plane view works well.

Build
Build date Feb21,2023
Git commit hash 476b643
Git commit date 2023-02-21 10:47:15 -0500
Git branch master
Build site name pymm21_macos
Build OS Darwin-20.5.0 arm64
Build type Release
ITK version 5.2.1
VTK version 9.1.0
Qt version 6.2.2
CMake version 3.22.1
C compiler Clang 13.0.0.13000029
C++ compiler Clang 13.0.0.13000029

Orientation issues with dummy nifti files

I am trying to load dummy nifti files (zeros everywhere other than the edges to create a volume border) into ITK-SNAP and overlay them on an anatomical scan. However, I am running into an issue where ITK-SNAP does not read the orientation information correctly if the dummy scan is overlaid on an anatomical. The scans instead look very large by comparison.

I am creating the dummy scans with nibabel and applying a rotation matrix to the qform, as I thought ITK-SNAP needs to read it. Here is the nibabel code to produce the scans:

# create outline data
data = np.ones((192, 192, 27))
data[1:-1, 1:-1, 1:-1] = 0   # creates an outline only

# create blank rotation with scaling
rot = np.diag([0.8, 0.8, 0.8, 1])

# create a nifti image and save
img = nb.Nifti1Image(data, rot)
img.set_qform(img.affine, 1)
img.set_sform(img.affine, 1)
img.to_filename('epi.nii.gz')

And the nifti headers that are produced look like this:

sizeof_hdr      : 348
data_type       : b''
db_name         : b''
extents         : 0
session_error   : 0
regular         : b''
dim_info        : 0
dim             : [  4 192 192  27   1   1   1   1]
intent_p1       : 0.0
intent_p2       : 0.0
intent_p3       : 0.0
intent_code     : none
datatype        : float64
bitpix          : 64
slice_start     : 0
pixdim          : [1.  0.8 0.8 0.8 1.  1.  1.  1. ]
vox_offset      : 0.0
scl_slope       : nan
scl_inter       : nan
slice_end       : 0
slice_code      : unknown
xyzt_units      : 0
cal_max         : 0.0
cal_min         : 0.0
slice_duration  : 0.0
toffset         : 0.0
glmax           : 0
glmin           : 0
descrip         : b''
aux_file        : b''
qform_code      : scanner
sform_code      : scanner
quatern_b       : 0.0
quatern_c       : 0.0
quatern_d       : 0.0
qoffset_x       : 0.0
qoffset_y       : 0.0
qoffset_z       : 0.0
srow_x          : [0.8 0.  0.  0. ]
srow_y          : [0.  0.8 0.  0. ]
srow_z          : [0.  0.  0.8 0. ]
intent_name     : b''
magic           : b'n+1'

Am I missing something that also needs added for ITK-SNAP to properly read these files?

Having a BSpline selection tool

Currently when we draw labels for segmentation we can use either the polygon selection tool or the paintbrush tool. It would be cool to have a bspline selection tool where we provide the list of points around the structure and the segmentation region is drawn by fitting a bspline to the points. I think it would be very time saving and flexible option to have

How do we use files?

Please help me run this source code. Which file do I run firstly? Thanh you very much.
image

Multi-Component Display menu grayed out when loading 4D NiFTI files

On version 4.0.0, when loading a 4D image file (NiFTI in my case), if I click on the arrow at the top of the viewport next to the filename, the Multi-Component Display menu item is grayed out. With the same image, on version 3.8.0 this item can be selected and the individual 4th dimension images can be chosen (as well as the Mag, Max, and Avg).

On version 4.0.0, Edit/4D DIsplay/Toggle 4D Replay does work, so the 4th dimension is being at least partially supported.

Build date Thu02/16/2023
Git commit hash 3bc2bdc
Git commit date 2023-02-16 14:11:06 -0500
Git branch master
Build site name pylenovo_win11
Build OS Windows-10.0.22621 AMD64
Build type Release
ITK version 5.2.1
VTK version 9.1.0
Qt version 6.2.4
CMake version 3.25.1
C compiler MSVC 19.34.31935.0
C++ compiler MSVC 19.34.31935.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.