1

I'm working with a set of DICOM images that are 512(columns) X 384(rows)

Is there a tool that would make the images 512X512? That is, filling the rows in this case to make it 512.

I've researched VTK with no luck.

Thanks!

Matimont
  • 739
  • 3
  • 14
  • 33
  • You can already do this in C# see [this previous question](http://stackoverflow.com/questions/18084387/how-resize-image-without-losing-quality) but in your case you are _not_ maintaining aspect ratio. – Chris O Jul 23 '14 at 17:12
  • Thanks Chris, I should have clarified these are Dicom Images.. – Matimont Jul 23 '14 at 17:50
  • Right, then you are looking for an SDK that can directly manipulate the PixelData in the dicom file and do the image resize. – Chris O Jul 23 '14 at 18:42
  • If you make changes to image resolution, please update the appropriate DICOM tag (e.g. pixel spacing related tag such as Imager Pixel Spacing (0018,1164) to reflect the change. – LEADTOOLS Support Jul 28 '14 at 17:31

1 Answers1

2

Argh, you was almost there! In fact, VTK is not the proper tool for that. ITK is. To be precise, VTK is for 3D visualization (that is, rendering of 3D objects), while ITK is specifically concerned for image processing.

So, using ITK, you could use a padding filter, here's a complete example from the official wiki, ready to be compiled and executed: http://public.kitware.com/pub/itk/Examples/src/Filtering/ImageGrid/PadAnImageWithAConstant/Documentation.html.

But, if you want to do the things in an easier way, I suggest MATLAB (ITK could be difficult to configure). In this case, this post could help: Padding an image in MATLAB.

Good luck!

Community
  • 1
  • 1
Andrea
  • 6,032
  • 2
  • 28
  • 55
  • Thanks! Anything in C#? – Matimont Jul 22 '14 at 20:53
  • @Matimont: Well, I worked using ITK in C++ only. But there is SimpleITK, that is a wrapper (but maybe I've just misused this term, sorry) of ITK for C#. However, I don't know if the padding filter is implemented there (as the name suggests, SimpleITK should have less functionality than the "standard" library). – Andrea Jul 23 '14 at 09:33
  • Right, I tried SimpleITK and does not include padding. Do you know of another alternative? I may end up modifying the pixel data and adding "0" to pad the image – Matimont Jul 23 '14 at 13:55
  • Unfortunately not...I linked the solutions I know; plus, I'm not a C# expert. I'm sorry... – Andrea Jul 23 '14 at 14:03